Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC connection to SQL

Status
Not open for further replies.

AccessMoron

Programmer
Feb 15, 2002
30
GB
In a function I have a ODBC DAO connection to a SQL database. At point A the function uses Connection.Execute to write to the database, four lines later it trys to write to the DB again using the same connection object but returns an ODBC error.
The SQL it is tryinf to execute will work through the Quey builder.
Anyone any Ideas what could be going wrong?
 
What does you sql statement look like?
Scoty ::) "Learn from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
Solved the problem.
I was passing a boolean variable to the funcion, the INSERT INTO query was falling over because of this, however the access querry was happy with it (go figure).
I converted the boolean to 1 or 0 and the function is now working perfectly.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top