Re: HELP! UpdateBatch doesn't work on Windows98

From: Val Mazur (group51a_at_hotmail.com)
Date: 09/24/04


Date: Thu, 23 Sep 2004 22:15:06 -0400

Hi,

Are you sure you have same versions of MDAC on both PCs? Do you use same
versions of OLEDB provider? Do you have PK filed or just index in your
table? Is it joined query, which application uses to open recordset?
It is actually not a good idea to open multiple recordset inside of one
transaction. You could use multiple SQL statements, but in most cases using
multiple recordsets causes some troubles.

-- 
Val Mazur
Microsoft MVP
"marco" <mpadierna h ot m_a.il dot c om> wrote in message 
news:uqvIsKZoEHA.1712@tk2msftngp13.phx.gbl...
> 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
>
>
> 


Relevant Pages

  • Re: ADO recordsets on the client
    ... > long time developing an application using disconnected ADO recordsets. ... > "I gave up trying to use recordsets in the client about a year ... > the MDAC mess that he describes without my being forced to upgrade to ... For the vast majority of machines it works fine. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Application Level Close Event
    ... recordsets being open that caused the process file to remain open, ... unlike it's built into Windows XP. ... With the code reference MDAC 2.8 ... serving as database level events to close out the global recordsets, ...
    (microsoft.public.access.modulesdaovba)
  • Re: HELP! UpdateBatch doesnt work on Windows98
    ... I've installed the Jet service pack and it now ... On the other side, Val, I really don't like to deal with three recordsets at ... >> It is actually not a good idea to open multiple recordset inside of one ...
    (microsoft.public.data.ado)