Re: MDB FileName + CursorLocation + LockType + ADO 2.8



Frederick wrote on Wed, 28 Sep 2005 06:22:03 -0700:

> I found a very strange bug in ADO that crashes the client EXE.
>
> The bug occurs if the Access Database is named using this pattern :
> A.AA_AAAA.mdb where A can be any character or combinaison of characters
> (at least one).
>
> Any SELECT executed using ADO will crash if the CursorLocation is set to
> adClient and the Recordset is opened with a lock (adLockPessimistic,
> adLockOptimistic or adLockBatchOptimistic).
>
> Sample code (VB6) :
>
> Dim pIRS As New ADODB.Recordset
> Dim pIConn As New ADODB.Connection
>
> pIConn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & App.Path &
> "\B.BB_BBBB.mdb"
> pIRS.CursorLocation = adUseClient ' Required
>
> pIRS.Open "SELECT * FROM TClass;", pIConn, adOpenForwardOnly,
> adLockPessimistic
>
> In this case, the database is freshly created using Access 2003. The table
> can be anything, I have tried with or without data using different
> combinaisons of fields.
>
> Renaming the file (ex. A.A_AAAA.mdb), setting the cursor on the server OR
> using adLockReadOnly will fix the problem.
>
> Computer science is so weird sometimes ...
>
> Frederick Samson
> samsonfr@xxxxxxxxxxx
>


Freaky. I decided to try it myself, just in case it was one of those weird
machine configuration issues. But it crashes on my XP SP2 system with a
fresh Access 2000 database too.

Dan


.



Relevant Pages

  • Re: delete on _CommandPtr crashes
    ... > i uses ado to get data from the database. ... > application crashes. ... You are assigning _CommandPtr* to _CommandPtr. ...
    (microsoft.public.vc.language)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)