Solved

VB.net Connection string to local SQL Database

Posted on 2014-10-10
6
257 Views
Last Modified: 2014-10-10
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
0
Comment
Question by:murbro
  • 4
  • 2
6 Comments
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 500 total points
ID: 40373500
assuming you used the default instance name:

Server=localhost;database=MyDatabase;Uid=<login>;Password=<password>
0
 

Author Comment

by:murbro
ID: 40373522
Hi
I never set up any username or password
0
 

Author Comment

by:murbro
ID: 40373536
I think I used Windows Authentication
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 34

Expert Comment

by:Brian Crowe
ID: 40373542
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/
0
 

Author Comment

by:murbro
ID: 40373599
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
0
 

Author Closing Comment

by:murbro
ID: 40373621
Thanks very much
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question