Access Violation in sqlncli.dll

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bernr
Posts: 17
Joined: Fri 14 Dec 2007 22:07

Access Violation in sqlncli.dll

Post by bernr » Tue 12 Feb 2008 21:25

For some reason quite often when starting my app I get

Project test.exe raised exception class EAccessViolation with message 'Access violaiton at address 3380C3BC in module 'sqlncli.dll'. Read of address BAADFOOD'.


Thanks
Bern

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 13 Feb 2008 09:39

Please try to detect what operations cause these errors.
Also supply us the following information:
- exact version of SQL server. You can see it in the Info sheet of TMSConnection Editor;
- exact version of your SQL clients for prSQL and prNativeClient. You can see it in the Info sheet of TMSConnection Editor;
- exact version of your IDE.

bernr
Posts: 17
Joined: Fri 14 Dec 2007 22:07

Post by bernr » Mon 03 Mar 2008 15:15

We are running MS SQL Server 2005 Express Edition w/Advanced Services, version 9.00.3042.00
Delphi 2007
SDAC V 4.35.1.15
Default SQL Client that comes with Windows XP SP2

Here is some more problems we are having (seems to happen only when the application starts up. Not all the time and in different orders)

Error 1

Code: Select all

exception class   : EAssertionFailed
exception message : Assertion failure (C:\Program Files\CodeGear\VCLs\Sdac\Source\OLEDBAccess.pas, line 2320).

main thread ($d74):
00c8284d +03d test.exe OLEDBAccess  2321  +2 QueryIntf
00c86dd9 +055 test.exe OLEDBAccess  4324  +3 TOLEDBCommand.QueryInterfaces
00c8f2be +006 test.exe OLEDBAccess  7721  +0 TOLEDBRecordSet.QueryCommandInterfaces
00c8f5d4 +074 test.exe OLEDBAccess  7844 +12 TOLEDBRecordSet.InternalOpen
00c4d635 +031 test.exe MemData      1997  +4 TData.Open
00c554c8 +000 test.exe MemData      6002  +0 TMemData.Open
00c654c4 +000 test.exe CRAccess     1361  +0 TCRRecordSet.Open
00c8fc27 +01b test.exe OLEDBAccess  8007  +2 TOLEDBRecordSet.Open
00c5be33 +00f test.exe MemDS         708  +1 TMemDataSet.InternalOpen
00c77468 +0a8 test.exe DBAccess     7245 +10 TCustomDADataSet.InternalOpen
00ca8c6a +06a test.exe MSAccess     4048  +4 TCustomMSDataSet.InternalOpen
0083d741 +019 test.exe DB                    TDataSet.DoInternalOpen
0083d7fa +01e test.exe DB                    TDataSet.OpenCursor
00c5c062 +00a test.exe MemDS         796  +1 TMemDataSet.OpenCursor
00c6fb7d +155 test.exe DBAccess     4088 +36 TCustomDADataSet.OpenCursor
00ca8f1b +0b3 test.exe MSAccess     4113 +14 TCustomMSDataSet.OpenCursor
0083d6b5 +055 test.exe DB                    TDataSet.SetActive
00c6f9d8 +050 test.exe DBAccess     4030  +4 TCustomDADataSet.SetActive
00ca84f0 +04c test.exe MSAccess     3893  +6 TCustomMSDataSet.SetActive
0083d4ad +009 test.exe DB                    TDataSet.Open
Error 2

Code: Select all

exception class   : EAccessViolation
exception message : Access violation at address 765B9A96 in module 'MSDART.DLL'. Read of address FFFFFFFC.

main thread ($b00):
765b9a96 +029 MSDART.DLL
765b9b04 +020 MSDART.DLL                         MpHeapReAlloc
765b9b25 +011 MSDART.DLL                         mpRealloc
00c859d7 +1e7 test.exe OLEDBAccess  3805 +37 TOLEDBConnection.Connect
00c6bf34 +098 test.exe DBAccess     2350 +11 TCustomDAConnection.DoConnect
00ca1ba1 +01d test.exe MSAccess     1822  +1 TCustomMSConnection.DoConnect
00c6c24f +037 test.exe DBAccess     2457  +8 TCustomDAConnection.PerformConnect
00c6d2b3 +2c7 test.exe DBAccess     2902 +68 TCustomDAConnection.SetConnected
00c6c201 +009 test.exe DBAccess     2440  +1 TCustomDAConnection.Connect
00c6c11f +06b test.exe DBAccess     2410  +7 TCustomDAConnection.InternalConnect
00c6f11f +05b test.exe DBAccess     3827  +5 TCustomDADataSet.BeginConnection
00caa26b +00f test.exe MSAccess     4624  +1 TCustomMSDataSet.BeginConnection
00c6fa8a +062 test.exe DBAccess     4057  +5 TCustomDADataSet.OpenCursor
00ca8f1b +0b3 test.exe MSAccess     4113 +14 TCustomMSDataSet.OpenCursor
0083d6b5 +055 test.exe DB                    TDataSet.SetActive
00c6f9d8 +050 test.exe DBAccess     4030  +4 TCustomDADataSet.SetActive
00ca84f0 +04c test.exe MSAccess     3893  +6 TCustomMSDataSet.SetActive
0083d4ad +009 test.exe DB                    TDataSet.Open
Error 3

Code: Select all

exception class   : EAccessViolation
exception message : Access violation at address 4DD04420 in module 'sqloledb.dll'. Read of address 00000002.

main thread ($6f8):
4dd04420 +000 sqloledb.dll
00c859d7 +1e7 test.exe OLEDBAccess  3805 +37 TOLEDBConnection.Connect
00c6bf34 +098 test.exe DBAccess     2350 +11 TCustomDAConnection.DoConnect
00ca1ba1 +01d test.exe MSAccess     1822  +1 TCustomMSConnection.DoConnect
00c6c24f +037 test.exe DBAccess     2457  +8 TCustomDAConnection.PerformConnect
00c6d2b3 +2c7 test.exe DBAccess     2902 +68 TCustomDAConnection.SetConnected
00c6c201 +009 test.exe DBAccess     2440  +1 TCustomDAConnection.Connect
00c6c11f +06b test.exe DBAccess     2410  +7 TCustomDAConnection.InternalConnect
00c6f11f +05b test.exe DBAccess     3827  +5 TCustomDADataSet.BeginConnection
00caa26b +00f test.exe MSAccess     4624  +1 TCustomMSDataSet.BeginConnection
00c6fa8a +062 test.exe DBAccess     4057  +5 TCustomDADataSet.OpenCursor
00ca8f1b +0b3 test.exe MSAccess     4113 +14 TCustomMSDataSet.OpenCursor
0083d6b5 +055 test.exe DB                    TDataSet.SetActive
00c6f9d8 +050 test.exe DBAccess     4030  +4 TCustomDADataSet.SetActive
00ca84f0 +04c test.exe MSAccess     3893  +6 TCustomMSDataSet.SetActive
0083d4ad +009 test.exe DB                    TDataSet.Open

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 04 Mar 2008 11:45

Try to install latest SQL Server Native Client on the computer where the errors arise.
You can download SQL Server Native Client from this page: http://www.microsoft.com/downloads/deta ... ng=en#SNAC
Make sure that SDAC uses SQL Server Native Client. The ClientVersion property value of your TMSConnection object must be like this: 09.xx.xxxxx.

bernr
Posts: 17
Joined: Fri 14 Dec 2007 22:07

Post by bernr » Tue 04 Mar 2008 12:21

Sorry installing the SQL Native Client is not an option for us.

We have an application that is used in the health care industry and as such our applicaiton is istalled on many computers within a hospital. Once our application is installed they never have to go back to the computers to update our application as it receives its updates from the centeral database and auto updates itself. This has been a requirement for our appliction since day one, and we have stuck by this for the last 8 years.

One of the reasons we picked SDAC was that it worked on Windows 2000 and above using OLE DB without having to have anything additional installed.

bernr
Posts: 17
Joined: Fri 14 Dec 2007 22:07

Post by bernr » Wed 05 Mar 2008 00:09

Ok just as a test I installed the Native client and now I get the following error everytime I start the application

Code: Select all

exception class   : EAccessViolation
exception message : Access violation at address 00000000. Read of address 00000000.

main thread ($80):
00000000 +000 ???
0047b7ed +0fd test.exe Classes               CheckSynchronize
004e06fa +68a test.exe Forms                 TApplication.WndProc
0047d66c +014 test.exe Classes               StdWndProc
7e4196c2 +00a USER32.dll                         DispatchMessageA
004e0e4c +0fc test.exe Forms                 TApplication.ProcessMessage
004e0e6e +00a test.exe Forms                 TApplication.ProcessMessages

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 05 Mar 2008 10:11

Please prepare a small test sample that demonstrates this error, and send it to sdac*crlab*com.
Also specify the exact version of SQL server and client. You can see them in the Info sheet of TMSConnection Editor.

Post Reply