How to connect SQLServer2005 with SQL Native Client

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
ayaring_n
Posts: 2
Joined: Thu 31 May 2007 07:14

How to connect SQLServer2005 with SQL Native Client

Post by ayaring_n » Thu 31 May 2007 07:19

I'm a customer.I'm developer of COMPUTER INSTITUTE OF JAPAN.
I bought the MS SQL DBX Driver from you.

I am having some probrems with MS SQL Server 2005 when trying to connect with SQL Native Client.

Using
Programming Software is Delphi7.
dbexpsda.dll version is 3.10.8.0.



My Connection Parameters are under.

----------------------------------------------------------------------
dbsConn: TCRSQLConnection;


with dbsConn do
begin
DriverName := 'SQL Native Client';
GetDriverFunc := 'getSQLDriverSQLServer';
LibraryName := 'dbexpsda.dll';
VendorLib := 'SQLNCLI';

Params.Clear;
Params.Add('Database=MyDatabaseName');
Params.Add('Server=MyPrinciparServer');
Params.Add('FailoverPartner=MyMirrorServer');
Params.Add('UID=Myname');
Params.Add('PWD=MyPassword');
end;

dbsConn.Connected := True;

---------------------------------------------------------------------

I cannot connect Database.
If I do Parameters change
from 'Server' to 'HostName'
from 'UID' to 'User_name'
from 'PWD' to 'password'

I can connect Database.

But, 'FailoverPartner' is not recognized.
So, Even if I do failover, the server is not switched.


How can I resolve my probrem?

Thanks

Aya Nakano

[email protected]

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Thu 31 May 2007 09:09

Use the following parameters to connect to Microsoft SQL Server using DbxSda:
SQLConnection.DriverName := 'SQLServer';
SQLConnection.LibraryName := 'dbexpsda.dll'; // 'dbexpsda30.dll' - for
Delphi 2006 or Turbo products
SQLConnection.VendorLib := 'sqloledb.dll';
SQLConnection.GetDriverFunc := 'getSQLDriverSQLServer';
SQLConnection.Params.Clear;
SQLConnection.Params.Add('User_Name=MyName');
SQLConnection.Params.Add('Password=MyPassword');
SQLConnection.Params.Add('HostName=MyServer');
SQLConnection.Params.Add('Database=MyDatabase');
SQLConnection.Open;

DbxSda uses SQL Native Client by default, if it is installed.
If not, it uses SQL OLE DB Provider for Microsoft SQL Server.
Due to restrictions of the dbExpress technology, there is no possibility to
specify the exact provider to use.
Currently DbxSda doesn't support the "FailoverPartner" parameter.

ayaring_n
Posts: 2
Joined: Thu 31 May 2007 07:14

Post by ayaring_n » Fri 01 Jun 2007 00:49

Thank you so much for your response.

----
Aya Nakano

[email protected]

Post Reply