Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / September 2003

Tip: Looking for answers? Try searching our database.

ODBC error on multiple update Access 2000 to SQL 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ian Bayly - 19 Sep 2003 01:36 GMT
I have a very simple piece of ADO code updating a SQL
table from Access.
Under some circumstances I need run the code twice,
consectively, with different data.
I get an ODBC Call failed (-2147467259)on the second
update.
I've put a delay (approx 500 msecs) between each
repetition of code, and no error. Less than 500 ms, back
comes the error.
Here is some common code I use to open RS

Set myCn = CurrentProject.Connection
myCn.CursorLocation = adUseClient
Set MakeRS = New ADODB.Recordset
MakeRS.CursorType = adOpenKeyset
MakeRS.LockType = adLockPessimistic
MakeRS.Open sSQL, myCn, , adCmdTable

Any ideas appreciated - in 2003 I shouldn't need timing
loops in code!

Ian Bayly
Ian Bayly - 19 Sep 2003 04:28 GMT
Easy fix
I had a compoundkey including Now()
The now() was returning same date/time on second pass.

Ian B
>-----Original Message-----
>I have a very simple piece of ADO code updating a SQL
[quoted text clipped - 21 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.