Solved

VB.net Connection string to local SQL Database

Posted on 2014-10-10
6
237 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now