I am trying to write an insert statement in Access but it is not working
with the OleDBCommand object.
HEre is the code
string sqltxt= "INSERT INTO contacts ( Last_Name, First_Name,
Email_Address, [Note] )" +
" WHERE (Last_Name)='Testlast') AND (First_Name)='TestFirst') AND
(Email_Address)='TestEmail') AND (Note)='TestNote')";
Debug.WriteLine(sqltxt);
OleDbConnection myConnection = new OleDbConnection(connectString);
OleDbCommand myCommand = new OleDbCommand(sqltxt, myConnection);
myCommand.Connection.Open();
int ret = myCommand.ExecuteNonQuery()
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!