connection problems

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ludek
Posts: 296
Joined: Thu 12 Oct 2006 09:34

connection problems

Post by Ludek » Tue 05 Jun 2007 09:57

I'm still having a problem with the SQLNCLI.1 provider. On some stations, I cannot connect with this provider to sql server, I only get a message "ms sql not found". Such message does not say much to me. Do you have an idea, what should I look for to make this provider work? With sqloledb.1 I get the connection without any problems...

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

Post by Antaeus » Tue 05 Jun 2007 15:07

This message means that the SQL Native client is not installed on that workstations. You can download and install it from the Microsoft site. This client is also included into SQL Server installation.

In SDAC 4 you can set the Provider option of TMSConnection to prAuto. In this case SDAC will try to use SQL Native Client only if it is possible, otherwise it will automatically switch to the OLE DB provider.

Ludek
Posts: 296
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Wed 06 Jun 2007 06:47

Setting this "provider" option to "prAuto" is equivalent to omitting the "provider=...." part of the connection string, right?

With this provider option set to prAuto - is there a way to detect the actually selected provider (after the connection is opened)? This could be very useful for debugging - to know, what is the actual provider.

For the sql native client i have to specify the "autotranslate=false" option, whereas with sqloledb i don't (i have never tested sqloledb with autotranslate=false). Do you think, is it safe for me to use the prAuto provider with the autotranslate=false option?

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

Post by Antaeus » Wed 06 Jun 2007 12:50

You can check the version of the current provider using the TMSConnection.ClientVersion public property. For SQL Native client it starts with 9.x, for OLE DB provider i starts with 8.x.
Ludek wrote:Do you think, is it safe for me to use the prAuto provider with the autotranslate=false option?
Yes, there should not be any problems using this combination.

Post Reply