Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 235433 - Last Review: July 28, 2003 - Revision: 1.1
BUG: Crash Updating Linked Table with ADO2.1/Jet 4 OLEDB Provider
This article was previously published under Q235433
When you use the OLE DB Provider for Jet version 4.0 to update a linked SQL Server table, a crash may occur with the following error message:
The instruction at '0x1b01a333' referenced memory at '0x0000000c'. The memory could not be 'read'.
Click on OK to terminate the application
Click on CANCEL to debug the application
The crash occurs when sending 220 (or more) total characters in the update statement (either in one or multiple fields.)
In MDAC version 2.5, you may generate a Dr. Watson error instead of the error listed earilier.
Avoid performing the updates via the linked table. Send your updates straight to your SQL Server table.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Steps to Reproduce Behavior
The sample code below assumes the following scenario:
VB application (Client machine)
|
|--(Jet 4 OLEDB Provider)--> Linked Table in Access (Remote machine)
|
|--(ODBC DSN)--> SQL Server Table (Remote machine)
- Create the following SQL Server table (server machine):
CREATE TABLE dbo.pepers (ID int NOT NULL Primary Key,
TestField char (220))
GO
- Insert ID # 1920 into the table.
- Create a DSN going to the pepers table on the server machine.
- Create a new linked table in an Access database that goes to pepers table. "dbo_pepers" would be created by default.
- Create a new Visual Basic 6.0 Standard EXE project (on client machine) using the following code:
Option Explicit
Dim cn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim sqlStr as String
Private Sub Command1_Click()
cn.CursorLocation = adUseClient
With cn
.ConnectionString = "Data Source= <path>\<Access database>"
.Provider = "Microsoft.JET.OLEDB.4.0"
.Properties("Prompt") = adPromptComplete
.Open
End With
' The following statement would update 220 characters on the char (220) TestField
sqlStr = "UPDATE dbo_pepers SET TestField='" & _
"send10char send10char send10char send10char " & _
"send10char send10char send10char send10char " & _
"send10char send10char send10char send10char " & _
"send10char send10char send10char send10char " & _
"send10char send10char send10char send10char'" & _
"WHERE ID = 1920"
cn.Execute sqlStr ' <--- crash occurs here
cn.Close
End Sub
- Add a Reference to "Microsoft ActiveX Data Objects 2.x Library," and also place a Command Button on the form.
- Click on Command1 button two to six times and the crash would occur.
APPLIES TO
- Microsoft ActiveX Data Objects 2.1
- Microsoft ActiveX Data Objects 2.1 Service Pack 1
- Microsoft ActiveX Data Objects 2.1 Service Pack 2
- Microsoft ActiveX Data Objects 2.5
- Microsoft OLE DB Provider for Jet 4.0
| kbbug kberrmsg kbmdacnosweep kbpending KB235433 |
Retired KB Content DisclaimerThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate