Access VBA - ODBC Timeount on Sql command to update records Options

A

Aaron C

I usually just run a query and set the timeout value = 0 and well now
im runnign some code through Access VBA that is carrying string
values
through:

sql2 = "Update IBS_NUMBER SET LOCATION_ID = '" & locid!LOCATION_ID &
"' WHERE Box_NUMBER ='" & pal!BOX_NUMBER & "' AND LOCATION_ID = '" &
locid2!LOCATION_ID & "'"
DoCmd.RunSQL sql2


I started getting an odbc timeout error, so i researched it a little
and thought I found the answer:


CurrentProject.Connection.CommandTimeout = 0


I place this line in the code and it is still timing out, does anyone
have any ideas?
Id have to have to go back to running a straight query to do this
update.


Thanks,
Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top