We have a bit of code in our Access 2007 app that we use to update records in a Sybase database table, via ODBC:
Set RecOut = db.OpenRecordset("dbo_udt_hist", dbOpenDynaset,dbAppendOnly)
RecOut!udt_hist_no = GetItn("udt_hist_no")
RecOut!udt_hist_dtime = GetServerDTime()
RecOut!user_name = gobjEnvironment.LogonUserName
RecOut!udt_obj_form_name = "UtilImport"
RecOut!intrn_key_val = IntrnKeyVal(strTblName, rec)
RecOut!short_hist_text = strShortHistText
It works very nicely when we use it to update the dbo_udt_hist table for a single record, and has worked for many years. We also use it inside a loop, where we may be updating a few hundred or even a thousand records. Of course, we have the open and close outside the loop, so we're not doing that repetitively.
Now we've got a situation where we're doing this for upwards of 13000 records, inside a loop (we need to store an itn for each record in the dbo_udt_hist table). It gets through about 2000 - 3000 iterations, and then blows up with this error.
-2147467259:[Sybase][ODBC Driver] Client unable to establish a connection.
Does anyone have any ideas? Thanks!