Access/ADO Bug: Exception at offset 0004c049 in msado15.dll

R

Razvan Socol

I have encountered a problem in Microsoft Access XP, when using bound
forms in ADP-s. The exception appears consistently, in the following
scenario:

1. Create a table with the following script:

CREATE TABLE BugTest (
SomeDate datetime primary key
)

2. In an ADP, create a new form, having this table as the Record Source

3. Create a TextBox bound to SomeDate.

4. Create a Command button with the following code:

Private Sub Command1_Click()
Me.SomeDate = Now()
End Sub

5. Write the following code for the On Current event:

Private Sub Form_Current()
Debug.Print Me.Recordset.RecordCount
End Sub

6. Save the form, then open it. Click on the command button (this time
it works as expected: it adds a new record, with the current date in
the SomeDate field.

7. Save the current record, using the "Save Record" option from the
"Records" menu (or close the form and reopen it)

8. Click on the command button again: "Microsoft Access has encountered
a problem and needs to close. We are sorry for the inconvenience".
Error signature:

AppName: msaccess.exe AppVer: 10.0.6501.0 ModName: msado15.dll
ModVer: 2.81.1117.0 Offset 0004c049

I am using Microsoft Access XP SP3, on Windows XP SP2, with MDAC
version 2.8 SP1.

Is this a known bug? Is there a fix?

Any workarounds (any other methods of finding the record count, other
than the one used) ?

Razvan
 
G

Guest

I tink that using anything other than an integer on a pk is a bad idea

have you tried adding an identity pl?
 
R

Razvan Socol

Yes, I've tried. The exception still happens.

Of course, the real-life scenario where I've encountered the problem is
much more complex. I have simplified the example to make it easier to
be reproduced.

I also reported this problem in the
microsoft.private.directaccess.access newsgroup and I got a workaround
(from a MS support engineer): use "Me.RecordsetClone.RecordCount"
instead of "Me.Recordset.RecordCount". Not quite what I've expected...
but it works (I would prefer a patch instead of a workaround).

Razvan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top