Solved

VB.net Connection string to local SQL Database

Posted on 2014-10-10
6
251 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
t-sql Joining Issue 10 40
HTML - Color not displaying correctly in EMAIL. 6 39
2016 SQL Licensing 7 41
SQL Count issue 24 16
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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

810 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