[Solved]Insert statement against a FoxPro database isn't commited using ODBCConnection in C#
-
Hi everyone. I'm making a custom tool for registering working hours for my employer against a Visual FoxPro database. I've created a procedure for executing sql queries against the database, but my insert statments aren't commited. The return value (affected rows) says that the query was successfull. I'm using a normal _"insert into (col1, col2, col(n)) VALUES(val1, val2, val(n))" statement - so nothing fancy. I've tried using transactions and
myTransaction.Commit();
without success. I've also tried using keywords like "GO" or "COMMIT" in the query - but the FoxPro ODBC driver isn't too keen on those keywords. :) Am I missing something here? I thought ODBCCommand.ExecuteNonQuery() used the auto-commit property. Is there and specific properties that must be set, or keywords I must include to make it commit? Sidenote: If I copy/paste the query into an ODBC tool (freeware tool I just downloaded for testing purpouses) and execute the query, the row is added successfully. I'd really appreciate any feedback you've got. -Larantz- -- modified at 5:18 Monday 22nd October, 2007 I copied the database into a cvs folderstructure the other day. Forgot to update the configuration file with the connectionstring the very next day... *humble Larantz signing out* -Larantz-for those about to code, we salute you
http://www.itverket.noPlease refer to the Forum Guidelines for appropriate posting.
_