Discussion:
dbexpress deployment requirements and strange behaviour
(too old to reply)
Esteban Pacheco
2008-01-06 20:40:48 UTC
Permalink
Hi guys,

The Environment:

Database MSSQL 2005.
DBX4.
Delphi 2007.

The problem:

We are getting error messages saying that the stored procedure is expecting
a parameter that we are not passing. After some research we found out that
it has to do with the dbxconnections, dbxdrivers ini files. We specify at
runtime all the SQLConnection properties and connection information and
seems to work fine, but it seems that for some stored procedures is not
requesting the stored procedure schema to the database. In computers with
Delph installed, the problem doesnt occurred, in production, we got the
problem and gets fix as soon as we put the .ini files with the executable.

I thought that if we specify all the parameters, and connection information
the ini files were not needed. We only needed the dbxmss30.dll to be
deployed (midas.dll too) in the production environment, but it seems we are
missing something inside those 2 files.

Any hints are more than welcome.

Att.
Esteban Pacheco


In development it works fine.
Bob Swart
2008-01-07 07:35:24 UTC
Permalink
Hi Esteban,
Post by Esteban Pacheco
I thought that if we specify all the parameters, and connection information
the ini files were not needed. We only needed the dbxmss30.dll to be
deployed (midas.dll too) in the production environment, but it seems we are
missing something inside those 2 files.
Can you eliminate sections from the .ini files to see which section(s)
are actually needed?

I found that I needed to deploy the .ini files if I used connection
pooling or tracing only. And then only for these specific sections, i.e.

[DBXPool]
DelegateDriver=True
DriverName=DBXPool
DriverUnit=DBXPool
DriverPackageLoader=TDBXPoolDriverLoader,DBXCommonDriver100.bpl
DriverPackage=DBXCommonDriver110.bpl
DriverAssemblyLoader=Borland.Data.TDBXPoolDriverLoader,Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f

[DBXTrace]
DelegateDriver=True
DriverName=DBXTrace
DriverUnit=DBXTrace
DriverPackageLoader=TDBXTraceDriverLoader,DBXCommonDriver100.bpl
DriverPackage=DBXCommonDriver110.bpl
DriverAssemblyLoader=Borland.Data.TDBXTraceDriverLoader,Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f

The main reason why this information is needed, is that it's not
contained in a stand-alone SQLConnection component (since the DBXPool
and/or DBXTrace information is usually indirectly referenced if an
actual SQLConnection component states that it wants to use a delegate
driver for Connection Pooling or Tracing).

Perhaps this is your situation as well?
Post by Esteban Pacheco
Any hints are more than welcome.
See also http://www.drbob42.com/examines/examin91.htm
Post by Esteban Pacheco
Att.
Esteban Pacheco
Groetjes,
Bob Swart
--
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
CodeGear Technology Partner -- CodeGear RAD Studio Reseller (BeNeLux)
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
Esteban Pacheco
2008-01-08 02:54:28 UTC
Permalink
Hello Don Bob,

I removed all the sections until I get here (see exact ini contents after
the following messages), after this point, anything I removed, causes an
exception expection on loading saying:

---------------------------
Samiddletier
---------------------------
MSSQL driver cannot be loaded. Make sure your project either uses the
DBXDynalink unit or uses packages so the DBXDynalinkDriver100.bpl package
can be loaded dynamically.
---------------------------
OK
---------------------------

and doesn't start properly.

If leave both files empty then, the server side app starts fine and then the
client reports:

---------------------------
Error
---------------------------
An exception was raised on the server: SQL State: 42000, SQL Error Code: 201
Procedure or function 'SESSIONS_GetOne' expects parameter '@SessionID',
which was not supplied
---------------------------
OK
---------------------------

The procedure and parameter in this case could be any stored procedure with
parameters.


dbxconnections.ini (exactcopy):
EMPTY FILE.

dbxdrivers.ini (exact copy):

[Installed Drivers]
MSSQL=1

[MSSQL]
SchemaOverride=%.dbo
DriverUnit=DBXDynalink
DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
DriverPackage=DBXCommonDriver110.bpl
DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f

GetDriverFunc=getSQLDriverMSSQL
LibraryName=dbxmss30.dll
VendorLib=oledb
HostName=ServerName
DataBase=Database Name
User_Name=user
Password=password
BlobSize=-1
ErrorResourceFile=
LocaleCode=0000
MSSQL TransIsolation=ReadCommited
OS Authentication=False
Prepare SQL=False
MetaDataPackageLoader=TDBXMsSqlMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
MetaDataAssemblyLoader=Borland.Data.TDBXMsSqlMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
Post by Bob Swart
Hi Esteban,
Post by Esteban Pacheco
I thought that if we specify all the parameters, and connection
information the ini files were not needed. We only needed the
dbxmss30.dll to be deployed (midas.dll too) in the production
environment, but it seems we are missing something inside those 2 files.
Can you eliminate sections from the .ini files to see which section(s) are
actually needed?
I found that I needed to deploy the .ini files if I used connection
pooling or tracing only. And then only for these specific sections, i.e.
[DBXPool]
DelegateDriver=True
DriverName=DBXPool
DriverUnit=DBXPool
DriverPackageLoader=TDBXPoolDriverLoader,DBXCommonDriver100.bpl
DriverPackage=DBXCommonDriver110.bpl
DriverAssemblyLoader=Borland.Data.TDBXPoolDriverLoader,Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
[DBXTrace]
DelegateDriver=True
DriverName=DBXTrace
DriverUnit=DBXTrace
DriverPackageLoader=TDBXTraceDriverLoader,DBXCommonDriver100.bpl
DriverPackage=DBXCommonDriver110.bpl
DriverAssemblyLoader=Borland.Data.TDBXTraceDriverLoader,Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
The main reason why this information is needed, is that it's not contained
in a stand-alone SQLConnection component (since the DBXPool and/or
DBXTrace information is usually indirectly referenced if an actual
SQLConnection component states that it wants to use a delegate driver for
Connection Pooling or Tracing).
Perhaps this is your situation as well?
Post by Esteban Pacheco
Any hints are more than welcome.
See also http://www.drbob42.com/examines/examin91.htm
Post by Esteban Pacheco
Att.
Esteban Pacheco
Groetjes,
Bob Swart
--
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
CodeGear Technology Partner -- CodeGear RAD Studio Reseller (BeNeLux)
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
Bob Swart
2008-01-08 06:50:14 UTC
Permalink
Hi Esteban,
Post by Esteban Pacheco
I removed all the sections until I get here (see exact ini contents after
the following messages), after this point, anything I removed, causes an
exception expection
I see that you are using the dbExpress 3 driver for SQL Server (the
dbxmss30.dll) which requires the DBXDynalinkDriver100.bpl to load it
(using the DBX3-DBX4 adapter).
Post by Esteban Pacheco
---------------------------
Samiddletier
---------------------------
MSSQL driver cannot be loaded. Make sure your project either uses the
DBXDynalink unit or uses packages so the DBXDynalinkDriver100.bpl package
can be loaded dynamically.
---------------------------
OK
---------------------------
The error message recommends adding the DBXDynalink unit to the uses
clause of one of the units of your project. Have you tried that?

Groetjes,
Bob Swart
--
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
CodeGear Technology Partner -- CodeGear RAD Studio Reseller (BeNeLux)
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
Loading...