HELP! UpdateBatch doesn't work on Windows98
From: marco (mpadierna)
Date: 09/23/04
- Next message: whitetulips: "Re: exception error when accessing SQL database"
- Previous message: beginthreadex: "Re: I need a good book or two on ADO"
- Next in thread: Val Mazur: "Re: HELP! UpdateBatch doesn't work on Windows98"
- Reply: Val Mazur: "Re: HELP! UpdateBatch doesn't work on Windows98"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Sep 2004 12:27:54 -0500
Hi everybody, can anybody help with this problem?
I run an app that creates a pair of disconnected recordsets (details)
that depends on one main table, this app add some records
and the must update batch.
On Windows 2000 runs like heaven, but in Windows 98 throws some like this:
"Not enough table base information to perform Update or Refresh"
These recordsets includes index fields (in fact they use all columns form
the table)
All machines have same versión of ADO: MDAC 2.7
Code sample is:
Private Function SaveObject(conn As ADODB.Connection) As Long
On Error GoTo SaveObjectErr
' purpose: to update two recordsets dependant on one main master record
' m_objMain
' m_objRows
' m_objDetails
' rows
' update ID column on dependant records
' m_objMain.MainID
m_objRows.Filter = ""
m_objRows.MoveFirst
Do While Not m_objRows.EOF
If m_objRows!MainID = 0 Then
m_objRows!MainID = m_objMain!MainID
m_objRows.Update
End If
m_objRows.MoveNext
Loop
' provided that conn is a valid connection
Set m_objRows.ActiveConnection = conn
m_objRows.UpdateBatch <-------- here throws the error!
...
(second recordset process coded as outlined)
End Function
...
Working recordsets are open through a call to a generic function in a common
DLL:
Set m_objRows = Select_generic_batch("SELECT * FROM MyROWS")
Public Function Select_generic_batch(strSQL As String)
On Error GoTo Select_generic_err
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.ActiveConnection = cn
rs.CursorLocation = adUseClient
rs.CursorType = adOpenKeyset
rs.LockType = adLockBatchOptimistic
rs.Open strSQL
Set Select_generic_batch = rs
Select_generic_end:
Set rs = Nothing
Exit Function
Select_generic_err:
MsgBox Err.Description
Resume Select_generic_end
End Function
---- It must be said that I cannot do a Refresh (underlying data) because this code goes inside a transaction Is there something undocumented feature or bug about batch recordsets that doens't work for Windows98 but does work for Windows2000? (of course, my client doesnt even want to hear about upgrading their PS's to Windows2000, for who knows what reason) Thanks in advance for reading and your kind comments Marco Padierna
- Next message: whitetulips: "Re: exception error when accessing SQL database"
- Previous message: beginthreadex: "Re: I need a good book or two on ADO"
- Next in thread: Val Mazur: "Re: HELP! UpdateBatch doesn't work on Windows98"
- Reply: Val Mazur: "Re: HELP! UpdateBatch doesn't work on Windows98"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|