0

打开 dfm 时,出现以下错误:

Error reading TSQLConnection1.DriverName: Access violation at address 5147cB94 in module dbexpress180.bpl. Read of address 0000008. Ignore the error and Continue?

dfm文件内容:

object TSQLConnection1: TSQLConnection
    ConnectionName = 'AS400'
    DriverName = 'CA400'
    GetDriverFunc = 'getSQLDriverCA400'
    LibraryName = 'dbexpca400.dll'
    LoginPrompt = False
    Params.Strings = (
      'DriverName=CA400'
      'Database=ABC'
      'User_Name='
      'Password='
      'ServerCharSet='
      'ErrorResourceFile='
      'LocaleCode=0000'
      'BlobSize=-1'
      'RowsetSize=-1'
      'RoleName='
      'CA400 TransIsolation=DirtyRead'
      'CommitRetain=True'
      'AutoCommit=True'
      'Custom String=/trace=0'
      'Connection Timeout=-1'
      'UseUnicode=False'
      'Trim Char=False')
    VendorLib = 'cwbdb.dll'
    BeforeConnect = TSQLConnection1BeforeConnect
    Left = 32
    Top = 24
  end
4

1 回答 1

2

借助 Arioch 的评论“也许 CA400 驱动程序未在该窗口上的 db Express 配置中注册”,我能够解决我的问题。

我查看了dbxdrivers.ini位于 的文件C:\Users\Public\Documents\RAD Studio\dbExpress\11.0,未安装驱动程序 CA400。我在codegear上找到了以下文章:

http://cc.codegear.com/partners/delphi8/peter_sawatzki/dbexpca400/index.html

这里提到了安装 CA400 驱动程序的所有步骤。根据文章,

  1. 从 embarcadero ( http://cc.embarcadero.com/item/28436 ) 下载最新版本的 dbexpca400.dll,解压并将 dll 放入C:\Windows\System32文件夹。

  2. 将以下代码放入我的 dbxdrivers.ini 文件中

[CA400]

GetDriverFunc=getSQLDriverCA400
LibraryName=dbexpca400.dll
VendorLib=cwbdb.dll
Database=MYAS400
User_Name=
Password=
ServerCharSet=
ErrorResourceFile=
LocaleCode=0000
BlobSize=-1
RowsetSize=-1
RoleName=
CA400 TransIsolation=DirtyRead
CommitRetain=True

AutoCommit=True
Custom String=/trace=0
Connection Timeout=-1
Trim Char=False

[CA400 TransIsolation]
DirtyRead=0
ReadCommited=1
RepeatableRead=2

并且错误得到了解决。

于 2013-11-14T06:10:30.590 回答