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
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
ASKER
The SQL Server is in the host.
THanks
THanks
ASKER
What do you mean by SQL ServerName would either need to be set to a UNC?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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;Integ rated 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.
The MS SQL Server instance is running at the host.
This worked for me
Provider=SQLOLEDB.1;Initia l 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)
Provider=SQLOLEDB.1;Initia
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think valuable comments are given by SStory and myself.
I agree
\\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?