在SQLOLEDB.1提供程序中使用Delphi XE2 ADO组件是否存在已知问题?

时间:2012-07-10 17:42:26

标签: delphi ado delphi-xe2

我正在尝试使用我的应用程序的新版本来解决问题。症状是当尝试使用TADOQuery.ExecSQL更新SQL表中的行时,应用程序在SQLOLEDB.dll中获取访问冲突异常。

我无法在我的开发环境中重现问题,我的组织的QA团队也没有。我们的用户一直很努力。

此问题版本与其前身之间的两个重大变化是1)我们从Delphi 2006迁移到DXE2和2)我们从XPSP3切换到Win7SP1作为构建环境。用户仍处于XPSP3上,处于严格控制的变更管理体系中。

编辑添加:madExcept错误报告

date/time         : 2012-06-27, 08:24:18, 775ms
computer name     : 
user name         : 
registered owner  : 
operating system  : Windows XP Service Pack 3 build 2600
system language   : English
system up time    : 48 minutes 7 seconds
program up time   : 7 minutes 48 seconds
processors        : 2x Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz
physical memory   : 854/2030 MB (free/total)
free disk space   : (C:) 47.30 GB
display mode      : 1024x768, 32 bit
process id        : $3d4
allocated memory  : 14.44 MB
command line      : 
executable        : xxxxxxxxxxxxxxxxx.exe
exec. date/time   : 2012-06-15 11:39
version           : 3.5.0.24
compiled with     : Delphi XE2
madExcept version : 3.0n
contact name      : 
contact email     : 
callstack crc     : $4dd03195, $4d9f14cf, $4d9f14cf
exception number  : 1
exception class   : EAccessViolation
exception message : Access violation at address 4DD03195 in module 'sqloledb.dll'. Read of address 03217000.

main thread ($938):
4dd03195 +000 sqloledb.dll
007e71d9 +091 xxxxxxxxxxxxxxxxx.exe Data.Win.ADODB              TADOCommand.Execute
007f08a5 +03d xxxxxxxxxxxxxxxxx.exe Data.Win.ADODB              TADOQuery.ExecSQL
00825f6a +5fa xxxxxxxxxxxxxxxxx.exe uauthorization    1528  +74 TAuthorization.SynchAuthToSQL
00822fd7 +d43 xxxxxxxxxxxxxxxxx.exe uauthorization    1228 +148 TAuthorization.Save
00b656a2 +15a xxxxxxxxxxxxxxxxx.exe form              1489  +33 TfrmMain.CreateOrEditAuthorization
00b6600f +02b xxxxxxxxxxxxxxxxx.exe form              1641   +2 TfrmMain.actEditAuthorizationExecute
0048834f +00f xxxxxxxxxxxxxxxxx.exe System.Classes              TBasicAction.Execute
004f4441 +031 xxxxxxxxxxxxxxxxx.exe Vcl.ActnList                TContainedAction.Execute
004f522c +050 xxxxxxxxxxxxxxxxx.exe Vcl.ActnList                TCustomAction.Execute
00488213 +013 xxxxxxxxxxxxxxxxx.exe System.Classes              TBasicActionLink.Execute
00508a00 +058 xxxxxxxxxxxxxxxxx.exe Vcl.Controls                TControl.Click
006dbd31 +051 xxxxxxxxxxxxxxxxx.exe AdvGlowButton     3040   +9 TAdvCustomGlowButton.Click
00508ec1 +065 xxxxxxxxxxxxxxxxx.exe Vcl.Controls                TControl.WMLButtonUp
006dca97 +397 xxxxxxxxxxxxxxxxx.exe AdvGlowButton     3508 +126 TAdvCustomGlowButton.WMLButtonUp
005084bc +2d4 xxxxxxxxxxxxxxxxx.exe Vcl.Controls                TControl.WndProc
0050ce07 +5b3 xxxxxxxxxxxxxxxxx.exe Vcl.Controls                TWinControl.WndProc
0050c45c +02c xxxxxxxxxxxxxxxxx.exe Vcl.Controls                TWinControl.MainWndProc
00489044 +014 xxxxxxxxxxxxxxxxx.exe System.Classes              StdWndProc
7e418a0b +00a USER32.dll                                        DispatchMessageW
005eb023 +0f3 xxxxxxxxxxxxxxxxx.exe Vcl.Forms                   TApplication.ProcessMessage
005eb066 +00a xxxxxxxxxxxxxxxxx.exe Vcl.Forms                   TApplication.HandleMessage
005eb399 +0c9 xxxxxxxxxxxxxxxxx.exe Vcl.Forms                   TApplication.Run
00b84f68 +0ac xxxxxxxxxxxxxxxxx.exe xxxxxxxxxxxxxxxxx   64   +8 initialization

thread $1054:
7c90daa8 +0a ntdll.dll                       NtReplyWaitReceivePortEx
004bc199 +0d xxxxxxxxxxxxxxxxx.exe madExcept CallThreadProcSafe
004bc203 +37 xxxxxxxxxxxxxxxxx.exe madExcept ThreadExceptFrame
>> created by main thread ($938) at:
77e7d10d +00 RPCRT4.dll

thread $1028:
7c90df48 +00a ntdll.dll                       NtWaitForMultipleObjects004bc199 +00d xxxxxxxxxxxxxxxxx.exe madExcept CallThreadProcSafe
004bc203 +037 xxxxxxxxxxxxxxxxx.exe madExcept ThreadExceptFrame
>> created by main thread ($938) at:
5b891d46 +1f1 NETAPI32.dll                    Netbios

thread $1058:
7c90df58 +0a ntdll.dll                       NtWaitForSingleObject
7c8025d5 +85 kernel32.dll                    WaitForSingleObjectEx
7c80253d +0d kernel32.dll                    WaitForSingleObject
004bc199 +0d xxxxxxxxxxxxxxxxx.exe madExcept CallThreadProcSafe
004bc203 +37 xxxxxxxxxxxxxxxxx.exe madExcept ThreadExceptFrame
>> created by main thread ($938) at:
76663fb6 +00 comsvcs.dll

thread $1384:
7c90daa8 +0a ntdll.dll                       NtReplyWaitReceivePortEx
004bc199 +0d xxxxxxxxxxxxxxxxx.exe madExcept CallThreadProcSafe
004bc203 +37 xxxxxxxxxxxxxxxxx.exe madExcept ThreadExceptFrame
>> created by thread $1054 at:
77e7d10d +00 RPCRT4.dll

modules:
00400000 xxxxxxxxxxxxxxxxx.exe 3.5.0.24         \\xxxxxxxxxxx\xxxxxxxx\xxxx
02bd0000 msadcer.dll           2.81.1132.0      C:\Program Files\Common Files\System\msadc
02ee0000 SQLOLEDB.RLL          2000.85.1132.0   C:\Program Files\Common Files\System\Ole DB
03340000 xpsp2res.dll          5.1.2600.5512    C:\WINDOWS\system32
10000000 sxwmon32.dll          4.4.1401.0       C:\WINDOWS\system32
4dd00000 sqloledb.dll          2000.85.1132.0   C:\Program Files\Common Files\System\Ole DB
4de10000 msado15.dll           2.81.3012.0      C:\Program Files\Common Files\System\ado
4ec50000 gdiplus.dll           5.2.6002.22791   C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.6002.22791_x-ww_c8dff154
5ad70000 uxtheme.dll           6.0.2900.5512    C:\WINDOWS\system32
5b860000 NETAPI32.dll          5.1.2600.5694    C:\WINDOWS\system32
5edd0000 olepro32.dll          5.1.2600.5512    C:\WINDOWS\system32
605d0000 mslbui.dll            5.1.2600.5512    C:\WINDOWS\system32
60e30000 MSDATL3.dll           2.81.1132.0      C:\Program Files\Common Files\System\Ole DB
61880000 oleacc.dll            7.0.2600.6153    C:\WINDOWS\system32
662b0000 hnetcfg.dll           5.1.2600.5512    C:\WINDOWS\system32
68000000 rsaenh.dll            5.1.2600.5507    C:\WINDOWS\system32
68100000 dssenh.dll            5.1.2600.5507    C:\WINDOWS\system32
6d4f0000 DBNETLIB.DLL          2000.85.1132.0   C:\WINDOWS\system32
71a50000 mswsock.dll           5.1.2600.5625    C:\WINDOWS\System32
71a90000 wshtcpip.dll          5.1.2600.5512    C:\WINDOWS\System32
71aa0000 WS2HELP.dll           5.1.2600.5512    C:\WINDOWS\system32
71ab0000 WS2_32.dll            5.1.2600.5512    C:\WINDOWS\system32
71ad0000 wsock32.dll           5.1.2600.5512    C:\WINDOWS\system32
71f80000 security.dll          5.1.2600.5512    C:\WINDOWS\system32
73000000 winspool.drv          5.1.2600.5512    C:\WINDOWS\system32
73160000 oledb32.dll           2.81.1132.0      C:\Program Files\Common Files\System\Ole DB
73bc0000 dciman32.dll          5.1.2600.5512    C:\WINDOWS\system32
74060000 msadce.dll            2.81.3002.0      C:\Program Files\Common Files\System\msadc
74720000 MSCTF.dll             5.1.2600.5512    C:\WINDOWS\system32
74e30000 RICHED20.DLL          5.30.23.1230     C:\WINDOWS\system32
750b0000 RESUTILS.DLL          5.1.2600.5512    C:\WINDOWS\system32
750f0000 MTXCLU.DLL            2001.12.4414.706 C:\WINDOWS\system32
75130000 colbact.DLL           2001.12.4414.700 C:\WINDOWS\system32
75350000 OLEDB32R.DLL          2.81.1132.0      C:\Program Files\Common Files\System\Ole DB
755c0000 msctfime.ime          5.1.2600.5512    C:\WINDOWS\system32
76360000 WINSTA.dll            5.1.2600.5512    C:\WINDOWS\system32
76380000 msimg32.dll           5.1.2600.5512    C:\WINDOWS\system32
76390000 IMM32.DLL             5.1.2600.5512    C:\WINDOWS\system32
763b0000 comdlg32.dll          6.0.2900.5512    C:\WINDOWS\system32
765b0000 MSDART.DLL            2.81.1132.0      C:\WINDOWS\system32
76620000 comsvcs.dll           2001.12.4414.702 C:\WINDOWS\system32
76790000 cryptdll.dll          5.1.2600.5512    C:\WINDOWS\system32
767a0000 ntdsapi.dll           5.1.2600.5512    C:\WINDOWS\system32
767f0000 schannel.dll          5.1.2600.6175    C:\WINDOWS\system32
769c0000 USERENV.dll           5.1.2600.5512    C:\WINDOWS\system32
76b40000 winmm.dll             5.1.2600.6160    C:\WINDOWS\system32
76d10000 CLUSAPI.DLL           5.1.2600.5512    C:\WINDOWS\system32
76d60000 iphlpapi.dll          5.1.2600.5512    C:\WINDOWS\system32
76f20000 DNSAPI.dll            5.1.2600.6089    C:\WINDOWS\system32
76f50000 wtsapi32.dll          5.1.2600.5512    C:\WINDOWS\system32
76f60000 WLDAP32.dll           5.1.2600.5512    C:\WINDOWS\system32
76fb0000 winrnr.dll            5.1.2600.5512    C:\WINDOWS\System32
76fc0000 rasadhlp.dll          5.1.2600.5512    C:\WINDOWS\system32
76fd0000 CLBCATQ.DLL           2001.12.4414.700 C:\WINDOWS\system32
77050000 COMRes.dll            2001.12.4414.700 C:\WINDOWS\system32
77120000 oleaut32.dll          5.1.2600.6058    C:\WINDOWS\system32
773d0000 comctl32.dll          6.0.2900.6028    C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202
774e0000 ole32.dll             5.1.2600.6168    C:\WINDOWS\system32
77a80000 crypt32.dll           5.131.2600.6149  C:\WINDOWS\system32
77b20000 MSASN1.dll            5.1.2600.5875    C:\WINDOWS\system32
77c00000 version.dll           5.1.2600.5512    C:\WINDOWS\system32
77c10000 msvcrt.dll            7.0.2600.5512    C:\WINDOWS\system32
77c70000 msv1_0.dll            5.1.2600.5876    C:\WINDOWS\system32
77dd0000 ADVAPI32.dll          5.1.2600.5755    C:\WINDOWS\system32
77e70000 RPCRT4.dll            5.1.2600.6022    C:\WINDOWS\system32
77f10000 GDI32.dll             5.1.2600.5698    C:\WINDOWS\system32
77f60000 SHLWAPI.dll           6.0.2900.5912    C:\WINDOWS\system32
77fe0000 Secur32.dll           5.1.2600.5834    C:\WINDOWS\system32
7c800000 kernel32.dll          5.1.2600.5781    C:\WINDOWS\system32
7c900000 ntdll.dll             5.1.2600.6055    C:\WINDOWS\system32
7c9c0000 shell32.dll           6.0.2900.6072    C:\WINDOWS\system32
7e410000 USER32.dll            5.1.2600.5512    C:\WINDOWS\system32

processes:
0000 Idle                  0   0
0004 System                0   0
07dc smss.exe              0   0
0284 csrss.exe             0   0
0320 winlogon.exe          0   0
0368 services.exe          0   0
0374 lsass.exe             0   0
0440 ati2evxx.exe          0   0
0450 svchost.exe           0   0
04ac svchost.exe           0   0
0550 svchost.exe           0   0
05ac svchost.exe           0   0
064c svchost.exe           0   0
0674 DVService.exe         0   0
06d8 spoolsv.exe           0   0
0758 ac.sharedstore.exe    0   0
0770 scardsvr.exe          0   0
0118 BESClient.exe         0   0
023c BESClientHelper.exe   0   0
02d8 FireSvc.exe           0   0
02ec PMService.exe         0   0
0310 HIPSvc.exe            0   0
03b4 EngineServer.exe      0   0
04c0 FrameworkService.exe  0   0
05c0 VsTskMgr.exe          0   0
0614 mdm.exe               0   0
06b0 mfevtps.exe           0   0
07ac NwmSvc.exe            0   0
00f8 scomc.exe             0   0
01b0 Svchost32.exe         0   0
0224 naPrdMgr.exe          0   0
0288 uphclean.exe          0   0
0294 VergenceLocator.exe   0   0
0538 WakeUpAgt.exe         0   0
0814 Mcshield.exe          0   0
095c CcmExec.exe           0   0
097c mfeann.exe            0   0
0984 alg.exe               0   0
0be0 wmiprvse.exe          0   0
0db0 wmiprvse.exe          0   0
0c04 acevents.exe          0   0
0de0 ati2evxx.exe          0   0
05fc Explorer.EXE          342 235 normal C:\WINDOWS
0908 NWMCLI.EXE            14  6   normal C:\Program Files\1E\Agent\NightWatchman
0f40 RTNotify.exe          65  35  normal C:\Program Files\Lumension\Endpoint Security\Client
00dc MOM.exe               11  15  normal C:\Program Files\ATI Technologies\ATI.ACE\Core-Static
0ce4 BGinfo.exe            54  47  normal C:\WINDOWS\system32
021c smax4pnp.exe          19  7   normal C:\Program Files\Analog Devices\Core
0c34 Clagent.exe           47  23  normal C:\Program Files\Vista\Broker
0f38 UdaterUI.exe          52  41  normal C:\Program Files\McAfee\Common Framework
0c10 GrooveMonitor.exe     11  4   normal C:\Program Files\Microsoft Office\Office12
0e74 McTray.exe            123 113 normal C:\Program Files\McAfee\Common Framework
0d8c FireTray.exe          37  17  normal C:\Program Files\McAfee\Host Intrusion Prevention
0b70 acevents.exe          11  9   normal C:\Program Files\ActivIdentity\ActivClient
0378 accrdsub.exe          50  22  normal C:\Program Files\ActivIdentity\ActivClient
057c DVTrayApp.exe         22  14  normal C:\Program Files\Tumbleweed\Desktop Validator
0a74 ctfmon.exe            103 49  normal C:\WINDOWS\system32
0fc0 acsagent.exe          23  19  normal C:\Program Files\ActivIdentity\ActivClient
0580 BESClientUI.exe       121 91  normal C:\Program Files\BigFix Enterprise\BES Client
0f54 OUTLOOK.EXE           463 267 normal C:\Program Files\Microsoft Office\Office12
0474 ccc.exe               44  51  normal C:\Program Files\ATI Technologies\ATI.ACE\Core-Static
147c xxxxxxxxx.EXE         246 331 normal \\xxxxxxxxxx\xxxx\xxxx
1580 C2W_CM.exe            8   5   normal C:\Program Files\Sentillion\DesktopComponents\COMAdapters
0a0c r2win.exe             214 117 normal C:\Program Files\Attachmate\Reflection
14fc WINWORD.EXE           268 105 normal C:\Program Files\Microsoft Office\Office12
03d4 xxxxxxxxxxxxxxxxx.exe 216 151 normal \\xxxxxxxxxxx\xxxxxxxx\xxxx

hardware:
+ Computer
  - ACPI Multiprocessor PC
+ Disk drives
  - SAMSUNG HD083GJ
+ Display adapters
  - ATI Radeon HD 3450 - Dell Optiplex (driver 8.513.1.0)
  - ConfigMgr Remote Control Driver
+ DVD/CD-ROM drives
  - HL-DT-ST DVD+-RW GT10N
+ Human Interface Devices
  - USB Human Interface Device
  - USB Human Interface Device
+ IDE ATA/ATAPI controllers
  - Intel(R) ICH10 Family 2 port Serial ATA Storage Controller 2 - 3A06 (driver 9.0.0.1005)
  - Intel(R) ICH10 Family 4 port Serial ATA Storage Controller 1 - 3A00 (driver 9.0.0.1005)
  - Primary IDE Channel
  - Primary IDE Channel
  - Secondary IDE Channel
  - Secondary IDE Channel
  - Standard Dual Channel PCI IDE Controller
+ Keyboards
  - HID Keyboard Device
+ Mice and other pointing devices
  - HID-compliant mouse
+ Monitors
  - Plug and Play Monitor
  - Plug and Play Monitor
+ Network adapters
  - Intel(R) 82567LM-3 Gigabit Network Connection (driver 10.3.39.0)
+ Ports (COM & LPT)
  - Communications Port (COM1)
  - ECP Printer Port (LPT1)
  - Intel(R) Remote PC Assist Technology - SOL (COM4) (driver 5.5.0.1057)
+ Processors
  - Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
  - Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
+ Smart card readers
  - Smart Card Reader Keyboard (driver 1.0.0.2)
+ Sound, video and game controllers
  - Audio Codecs
  - Legacy Audio Drivers
  - Legacy Video Capture Devices
  - Media Control Devices
  - SoundMAX Integrated Digital High Definition Audio (driver 5.10.1.5851)
  - Video Codecs
+ System devices
  - ACPI Fixed Feature Button
  - ACPI Power Button
  - Direct memory access controller
  - High precision event timer
  - Intel(R) 4 Series Chipset PCI Express Root Port - 2E11 (driver 9.0.0.1009)
  - Intel(R) 4 Series Chipset Processor to I/O Controller - 2E10 (driver 9.0.0.1009)
  - Intel(R) 82801 PCI Bridge - 244E (driver 7.0.0.1011)
  - Intel(R) ICH10 Family PCI Express Root Port 1 - 3A70 (driver 9.0.0.1009)
  - Intel(R) ICH10 Family PCI Express Root Port 2 - 3A72 (driver 9.0.0.1009)
  - Intel(R) ICH10 Family SMBus Controller - 3A60 (driver 9.0.0.1005)
  - Intel(R) ICH10D LPC Interface Controller - 3A1A (driver 9.0.0.1009)
  - Intel(R) Management Engine Interface
  - ISAPNP Read Data Port
  - Logical Disk Manager
  - Microcode Update Device
  - Microsoft ACPI-Compliant System
  - Microsoft System Management BIOS Driver
  - Microsoft UAA Bus Driver for High Definition Audio
  - Microsoft Windows Management Interface for ACPI
  - Numeric data processor
  - OpenManage Client Instrumentation device driver (driver 7.6.0.732)
  - PCI bus
  - Plug and Play Software Device Enumerator
  - Printer Port Logical Interface
  - Programmable interrupt controller
  - System board
  - System CMOS/real time clock
  - System speaker
  - System timer
  - Terminal Server Device Redirector
  - Terminal Server Keyboard Driver
  - Terminal Server Mouse Driver
  - Volume Manager
+ Universal Serial Bus controllers
  - Intel(R) ICH10 Family USB Enhanced Host Controller - 3A6A (driver 9.0.0.1005)
  - Intel(R) ICH10 Family USB Enhanced Host Controller - 3A6C (driver 9.0.0.1005)
  - Intel(R) ICH10 Family USB Universal Host Controller - 3A64 (driver 9.0.0.1005)
  - Intel(R) ICH10 Family USB Universal Host Controller - 3A65 (driver 9.0.0.1005)
  - Intel(R) ICH10 Family USB Universal Host Controller - 3A66 (driver 9.0.0.1005)
  - Intel(R) ICH10 Family USB Universal Host Controller - 3A67 (driver 9.0.0.1005)
  - Intel(R) ICH10 Family USB Universal Host Controller - 3A68 (driver 9.0.0.1005)
  - Intel(R) ICH10 Family USB Universal Host Controller - 3A69 (driver 9.0.0.1005)
  - USB Composite Device
  - USB Root Hub
  - USB Root Hub
  - USB Root Hub
  - USB Root Hub
  - USB Root Hub
  - USB Root Hub
  - USB Root Hub
  - USB Root Hub

cpu registers:
eax = 00000ff8
ebx = 03206e38
ecx = 0000007d
edx = 00000ff8
esi = 03216ffd
edi = 03209244
eip = 4dd03195
esp = 0012e520
ebp = 0012e650

stack dump:
0012e520  20 94 0c 03 00 00 00 00 - 00 00 00 00 02 02 02 02  ................
0012e530  20 94 0c 03 02 02 02 02 - 02 02 02 02 02 02 02 4f  ...............O
0012e540  4c 45 44 42 53 53 44 65 - f1 71 21 03 64 34 00 00  LEDBSSDe.q!.d4..
0012e550  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0012e560  33 64 34 00 00 00 00 00 - 00 00 00 00 0b 6c 00 00  3d4..........l..
0012e570  90 ed 12 00 38 00 00 00 - 78 3b 20 03 18 d6 20 03  ....8...x;......
0012e580  9b 4c d4 4d 78 3b 20 03 - ff 03 00 00 1f 5f fe 77  .L.Mx;......._.w
0012e590  d8 e5 12 00 37 5f fe 77 - 00 00 00 00 02 02 02 02  ....7_.w........
0012e5a0  02 02 02 02 02 02 02 02 - 02 02 02 00 c0 e5 12 00  ................
0012e5b0  d5 48 12 77 06 c4 13 77 - 00 00 00 00 00 00 00 00  .H.w...w........
0012e5c0  0a 00 00 00 00 00 00 00 - ec f0 12 00 e8 e8 12 00  ................
0012e5d0  c0 33 0e 03 09 04 00 00 - 00 00 00 00 2c e6 12 00  .3..........,...
0012e5e0  e5 c0 13 77 09 04 00 00 - 00 00 00 00 06 00 00 00  ...w............
0012e5f0  ec f0 12 00 e8 e8 12 00 - 01 00 00 00 ff 1f 00 00  ................
0012e600  00 00 00 00 01 00 00 00 - 00 00 00 00 00 00 00 00  ................
0012e610  01 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0012e620  00 00 00 00 75 e6 12 00 - 00 00 00 00 84 e6 12 01  ....u...........
0012e630  84 e6 12 00 ad 02 15 77 - 5c e6 12 00 74 e6 12 00  .......w\...t...
0012e640  00 00 08 00 4c e6 12 00 - 02 02 02 02 0b 6c 00 00  ....L........l..
0012e650  78 e6 12 00 89 75 d2 4d - 20 94 0c 03 e0 c8 20 03  x....u.M........

disassembling:
[...]
00825f59        mov     eax, [eax]
00825f5b        call    -$34dc4 ($7f119c)      ; dssLog.TLogFile.Add00825f60 1528   mov     eax, [$b94e44]
00825f65        mov     eax, [eax]
00825f67        mov     eax, [eax+$64]
00825f6a      > call    -$35707 ($7f0868)      ; Data.Win.ADODB.TADOQuery.ExecSQL
00825f6f 1529   mov     eax, [$b944bc]
00825f74        mov     eax, [eax]
00825f76        mov     edx, $8269a8
00825f7b        call    -$34de4 ($7f119c)      ; dssLog.TLogFile.Add00825f80 1531   mov     eax, [$b94e44]
[...]

error details:

编辑添加:发生崩溃的程序(对不起,它是一些vcs合并的受害者,没有保留缩进)。违规行是结尾前的dmSQL.adoGenericQuery.ExecSQL;

procedure TAuthorization.SynchAuthToSQL(sStationIFN:string='';bForceUpdate:boolean=false);
const
  CountQuery = 'select count(*) from DSS_Authorizations'+
    ' where AuthIEN = :authIEN '+
    ' and authstationifn = :stationIFN' +
    ' and patientien = :patientIEN ';
var
    sStart,sEnd:string;
    sDxStripped: string;
  i: integer;
begin
    log.add('Synch Auth to SQL: '+FAuthIEN);
    if FAuthIEN = '' then
        exit;
    if sStationIFN = '' then
    sStationIFN := dmBroker.CurrentVistaStation.StationNumber;
    sStart := FormatDateTime('mm/dd/yyyy',FMDateTimeToTDateTime(FAuthFromDateVista));
    sEnd := FormatDateTime('mm/dd/yyyy',FMDateTimeToTDateTime(FAuthToDateVista));

    log.add('Begin auth count');
    //First the main authorizations part
  dmSQL.adoGenericQuery.SQL.Text := CountQuery;
  with dmSQL.adoGenericQuery.Parameters do
  begin
    FindParam('authIEN').Value := FAuthIEN;
    FindParam('stationIFN').Value := sStationIFN;
    FindParam('patientIEN').Value := FPatient.InternalValue;
  end;
    dmSQL.adoGenericQuery.Open;
    if dmSQL.adoGenericQuery.Fields[0].Value = 0 then
    begin
    InsertAuthToSQL;
    end
    else if bForceUpdate then
    begin
        //Update-deliberately does not update the ImportedFromVista and DateCreated fields
    dmSQL.adoGenericQuery.SQL.Text :=
      'update DSS_Authorizations set' +
      ' DateStart = :DateStart' +
      ',DateEnd = :DateEnd' +
      ',VendorIEN = :VendorIEN' +
      ',FacilityIEN = :FacilityIEN' +
      ',DXCode1= :DXCode1' +
      ',DXCode2 = :DXCode2' +
      ',DXCode3 = :DXCode3' +
      ',TreatmentTypeIEN = :TreatmentTypeIEN' +
      ',TypeofCareIEN = :TypeofCareIEN' +
      ',PatientTypeIEN = :PatientTypeIEN' +
      ',PurposeOfVisitIEN = :PurposeOfVisitIEN' +
      ',Remarks = :Remarks' +
      ',ClerkIEN = :ClerkIEN' +
      ',CostRecovery = :CostRecovery' +
      ',AccidentRelated = :AccidentRelated' +
      ',LastEditedBy = :LastEditedBy' +
      ',LastEditedDT = :LastEditedDT' +
      ',ContractID = :ContractID' +
      ' where AuthIEN =:AuthIEN and ' +
      ' AuthStationIFN = :AuthStationIFN and' +
      ' PatientIEN = :PatientIEN';
    with dmSQL.adoGenericQuery.Parameters do
    begin
      FindParam('DateStart').Value := sStart;
      FindParam('DateEnd').Value := sEnd;
      FindParam('VendorIEN').Value := FVendor.InternalValue;
      FindParam('FacilityIEN').Value := FLocation.IEN;
      FindParam('DXCode1').Value := FDXLine1;
      FindParam('DXCode2').Value := FDXLine2;
      FindParam('DXCode3').Value := FDXLine3;
      FindParam('TreatmentTypeIEN').Value := FTreatmentType.InternalValue;
      FindParam('TypeofCareIEN').Value := FTypeOfCare.InternalValue;
      FindParam('PatientTypeIEN').Value := FPatientType.InternalValue;
      FindParam('PurposeOfVisitIEN').Value := FPurpose.IEN;
      FindParam('Remarks').Value := FRemarks;
      FindParam('ClerkIEN').Value := FClerk.InternalValue;
      FindParam('CostRecovery').Value := BoolToOneZeroString(FCostRecovery);
      FindParam('AccidentRelated').Value := BoolToOneZeroString(FAccidentRelated);
      FindParam('LastEditedBy').Value := dmBroker.dssBroker.UserDuz + ';' + dmBroker.dssBroker.UserName;
      FindParam('LastEditedDT').Value := Now;
      FindParam('ContractID').Value := FContract.ExternalValue;
      FindParam('AuthIEN').Value := FAuthIEN;
      FindParam('AuthStationIFN').Value := sStationIFN;
      FindParam('PatientIEN').Value := FPatient.InternalValue;
    end;
    log.add('Begin update of existing auth: '+ dmSQL.adoGenericQuery.SQL.Text);
    dmSQL.adoGenericQuery.ExecSQL;
        log.add('Update done');
    end;
    dmSQL.adoGenericQuery.close;
    log.add('Auth synch done');
end;

1 个答案:

答案 0 :(得分:0)

我怀疑这是您应用中的特定内存损坏错误。它实际上可能是由XE2 VCL或RTL中的某些东西引起的,但更可能是代码中出现问题,例如从Ansi到Unicode的错误端口。

您声明此举是从Delphi 2006(String = AnsiString)到XE2(String = UnicodeString)。您的代码中的以下任何内容:

  • 任何无类型的var参数?
  • 您认为Sizeof(Char)= Sizeof(Byte)?
  • 的任何地方
  • 当您应该向/或从PAnsiChar施放时,您向PChar或从PChar施放的任何地方,因为PChar是XE2中指向UnicodeChar的指针,但2006年的PChar是指向AnsiChar的指针。