Re: HELP! UpdateBatch doesn't work on Windows98

From: marco (mpadierna)
Date: 09/24/04


Date: Fri, 24 Sep 2004 09:27:22 -0500

Thank you very much Magda, I've installed the Jet service pack and it now
runs pretty fine :)

On the other side, Val, I really don't like to deal with three recordsets at
a time, but it is necessary, because of those are related recordsets
(Master-detail-detailofdetail). Moreover, it is a messy job, 'cause I'm
using collections, but I don't see other way to manage such relationships.

Saludos desde Mexico

Marco

"Magda" <deneb3@wp.pl> escribió en el mensaje
news:cj0fbf$k7a$1@nemesis.news.tpi.pl...
>I had the same problem(now it works). Try:
>
> Install Service Pack 8 for Microsoft Jet 4.0
> Install MDAC 2.8 (Microsoft Data Access Components v2.8)
>
> Mag
>
>
> Użytkownik "Val Mazur" <group51a@hotmail.com> napisał w wiadomości
> news:OvJtQxdoEHA.2340@TK2MSFTNGP10.phx.gbl...
>> 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
>> >
>> >
>> >
>>
>>
>
>