E
eric dugal
Hi all!!
I need your help.... i'm working since 2 hours on a simple insert statement,
but couldn't handle it.
Here is my code :
public int ExecQuery(string SqlString)
{
OleDbConnection oCoon = new OleDbConnection(connectionString);
oCoon.Open();
OleDbCommand cmd3 = new OleDbCommand();
cmd3.Connection = oCoon;
cmd3.CommandText = SqlString;
if(oCoon.State == ConnectionState.Closed)
{
oCoon.Open();
}
cmd3.ExecuteNonQuery();
return 1
}
When the code reach the cmd3.ExecuteNonQuery(); I always receive the
followin error :
SYNTAX ERROR IN INSERT INTO STATEMENT....
But, i tried to put some debug info (Debug.Write) and my SQL statement seem
ok.
SQL Statement : INSERT INTO COLORS (agent_no,primary,secondary) VALUES
(3,'fff','ALLO')
Any idea??
Thanks,
I need your help.... i'm working since 2 hours on a simple insert statement,
but couldn't handle it.
Here is my code :
public int ExecQuery(string SqlString)
{
OleDbConnection oCoon = new OleDbConnection(connectionString);
oCoon.Open();
OleDbCommand cmd3 = new OleDbCommand();
cmd3.Connection = oCoon;
cmd3.CommandText = SqlString;
if(oCoon.State == ConnectionState.Closed)
{
oCoon.Open();
}
cmd3.ExecuteNonQuery();
return 1
}
When the code reach the cmd3.ExecuteNonQuery(); I always receive the
followin error :
SYNTAX ERROR IN INSERT INTO STATEMENT....
But, i tried to put some debug info (Debug.Write) and my SQL statement seem
ok.
SQL Statement : INSERT INTO COLORS (agent_no,primary,secondary) VALUES
(3,'fff','ALLO')
Any idea??
Thanks,