Monday, February 13, 2012

ADO Connection issue

Hello All,

I have made a small application on my system in delphi v7 that uses the ado connetion components and works fine on the remote sql server db. But my client gets a "cannot find server" on his system with the sql server/db local.

My connection string this...

Provider=SQLOLEDB;Password=password;Persist Security Info=True;User ID=USER;Initial Catalog=MyDB;Data Source=SERVER01;

his connect is...

Provider=SQLOLEDB;Password=password;Persist Security Info=True;User ID=USER;Initial Catalog=MyDB;Data Source=HISSERVER01\APP;

I have changed the Data Source to (local) and local, as seen in another post but this had not effect. We have check his MDAC version verse mine and they are the same, save he has sp3; I have sp1.

...any ideas?

The SQL Server of your client is a named instance, you need to make sure that the Data Source string matches the instance that you want to connect to in the format of <servername>\<instancename>. Also, local is not valid, (local)\<instancename> or localhost\<instancename> are ok. If you want to connect to a remote named instance, you also need to enable SQL Browser service if the remote SQL instance is SQL Server 2005. -HTH|||

Thank for answering :)

But I may have not been clear. we are not sharing a database. He has his own copy running on his lan, I have mine running on my lan.

Both systems are running on XP systems.

On his; he is running the client app locally to his sql server. His connection of <server>/<instance> is correct

On mine; the client is remotely accessing the sql server. I did not setup an instance, so just using <server> should be valid.

I wonder if the instance requires additional parameters to be passed, any ideas?

TY,

CJ

|||Which version of SQL Server are you using ? If you are using SQL Server 2005 you will have to enable remote connections, switch on the SQL Browser in order to connect to another port than the default one 1433, or name the portnumber after the servername with the syntax Servername,portnumber.

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment