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

barman78Asked:
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.

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

THanks
0
barman78Author Commented:
What do you mean by SQL ServerName would either need to be set to a UNC?
0
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.
0
jogosCommented:
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)
0
Anthony PerkinsCommented:
If the server name is MARJ than what is the error you get?
0
SStoryCommented:
the last part of the connection string you supplied say,
";Data Source=" & SQLSERVERNAME"
0
jogosCommented:
I think valuable comments are given by SStory and myself.
0
SStoryCommented:
I agree
0
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.