|
-
Jul 11th, 2000, 05:44 AM
#1
Thread Starter
New Member
Hi there,
Can you please help me with the following:
I created a disconnected recordset and after some changes I want to reconnect it to the database but then I get the error message: "Insufficient base table information for updating or refreshing" (Run-time error '2147467259(80004005)'
I created a connection to an access database, after creating a DSN-name with ODBC.
I did it by the following code:
cnNwind.Open "Nwind"
strSQL = "SELECT LastName, FirstName, Title, Extension FROM Employees"
rsEmployees.CursorLocation = adUseClient
rsEmployees.Open strSQL, cnNwind, adOpenKeySet, AdLockBatchOptimistic
Set rsEmployees.ActiveConnection = Nothing
Set cnNwind = Nothing
After this point I made some changes and then I try to reconnect and use the updatebatch method by using the following code:
Set cnNwind = New ADODB.Connection
cnNwind.Open "Nwind"
rsEmployees.ActiveConnection = cnNwind
rsEmployees.UpdateBatch
And at this point I get the error message!
Please if you know the answer let me know.
Kind regards in advance,
Chris Jonkheer
-
Jul 11th, 2000, 05:57 AM
#2
maybe try something like this:
'**********************************************************
Public Function Save(rs As ADODB.Recordset) As ADODB.Recordset
Dim cn As ADODB.Connection
Dim b As Boolean
Set cn = GetConnection()
With rs
.ActiveConnection = cn
On Error Resume Next
.Filter = adFilterPendingRecords
.UpdateBatch adAffectGroup
.Filter = adFilterConflictingRecords
If .RecordCount > 0 Then
' Solve conflicts here
End If
.Requery
.Filter=adFilterNone
.ActiveConnection = Nothing
End With
Set Save = rsSave
Set cn = Nothing
End Function
'**********************************************************
best regards
Sascha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|