|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Link Access 2000 to SQL Server 2000
I have a table on an SQL Server, have setup a DSN pointing to the SQL Server and then a link to the table in an Access 2000 database.
When using the following code keep getting the error message below: Run-time error '3622' You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY Column. Code:
Dim DB As Database Dim Rst As Recordset Dim SQL As String SQL = "SELECT * FROM dbo_tblStaffTimeSheetAlloc;" Set DB = CurrentDb Set Rst = DB.OpenRecordset(SQL, , dbSeeChanges) Have had a hunt in MSDN but can't seem to find anything that will work! Any pointers much appreciated... |
|
#2
|
|||
|
|||
|
Quote:
I think you need to use ado |
|
#3
|
|||
|
|||
|
Sorry I didn’t give you a more complete answer in my last post
Try using ADO instead of DOA. I am also upsizing a access database to sql server and I’m having to convert all my code to ado. ADO is confusing at first but I’m getting used to it. Dim sql As String Dim rst As ADODB.Recordset Dim Cnn As ADODB.Connection Set rst = New ADODB.Recordset sql = "SELECT * FROM dbo_tblStaffTimeSheetAlloc" Set Cnn = CurrentProject.Connection rst.Open sql, Cnn, adOpenKeyset, adLockOptimistic, dbSeeChanges Since your linking tables you will have to supply your own connection string. I you were using an Access project you could use currentproject.connection |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Link Access 2000 to SQL Server 2000 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|