Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net Connection string to local SQL Database

Hi

I use a connection string such as the following to connect to a remote server
I want to connect to a new database that I have created on my desktop
How do I alter the connection string?

Server=winsqlr01.cpt.wa.co.za;Database=MyDatabase;Uid=ApUser;Password=xxxxxx
ASKER CERTIFIED SOLUTION
Avatar of Brian Crowe
Brian Crowe
Flag of United States of America 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
Avatar of Murray Brown

ASKER

Hi
I never set up any username or password
I think I used Windows Authentication
You must have set up something even if it was using windows authentication.  Access the database using SSMS.

BTW, here is a good reference for different connection string formats.

http://www.connectionstrings.com/sql-server-2008/
I am in SSMS. looking at the database
I have attached a screenshot
The database is Test2
How do I build the connection string?
Image1.jpg
Thanks very much