Link to home
Start Free TrialLog in
Avatar of barman78
barman78

asked on

Connect to MS SQL Server 2000 database remotely

Hi Experts,

   I have a program that is written in vb6 with MS SQL Server 2000 database but I can only connect locally with the connection string below. Is there anyone here knows what is needed below to make it connect remotely?

Thanks,

Marj
cString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=" & DatabaseCatalog & ";Data Source=" & SQLSERVERNAME

Open in new window

Avatar of SStory
SStory
Flag of United States of America image

SQL ServerName would either need to be set to a UNC
\\servername\sqlservername

or an

IP

SQL would need to be configured to allow TCP/IP connections.
Integrated security means you would need to be able to authenticate on the remote windows machine that hosts SQL Server as well.

Do you control the SQL Server or is it hosted?
Avatar of barman78
barman78

ASKER

The SQL Server is in the host.

THanks
What do you mean by SQL ServerName would either need to be set to a UNC?
ASKER CERTIFIED SOLUTION
Avatar of jogos
jogos
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
      But I am using MS SQL Server 2000. What I want to know is if there's anything to add to this connection string "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Proprrtydb ;Data Source=MARJ;" to be able to connect remotely or connect to host ms sql server database?

       The MS SQL Server instance is running at the host.
This worked for me

Provider=SQLOLEDB.1;Initial Catalog=xxxxx;Data Source=XXXXXXX
User Id=xxxxx;Password=xxxxxxxx

Maybe you should try if it works with a named user (connection OK -> try integrated)
If the server name is MARJ than what is the error you get?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think valuable comments are given by SStory and myself.
I agree