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?


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

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SQL ServerName would either need to be set to a UNC

or an


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?
barman78Author Commented:
The SQL Server is in the host.

barman78Author Commented:
What do you mean by SQL ServerName would either need to be set to a UNC?
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
barman78Author Commented:
      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)
Anthony PerkinsCommented:
If the server name is MARJ than what is the error you get?
the last part of the connection string you supplied say,
";Data Source=" & SQLSERVERNAME"
I think valuable comments are given by SStory and myself.
I agree
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.