Solved

VB.net Connection string to local SQL Database

Posted on 2014-10-10
6
255 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
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 set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

791 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