Solved

OLE DB Connection - SQL Server

Posted on 2008-10-07
7
181 Views
Last Modified: 2012-05-05
OLE DB Connection - SQL Server
0
Comment
Question by:JPTenore
  • 3
  • 2
  • 2
7 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 22657298
You can find more information about the connectionstring for sql-server at
http://connectionstrings.com/?carrier=sqlserver2005
Using connection as new SqlConnection("Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;")
     connection.Open()
     ' Use the connection
 End Using

Open in new window

0
 

Author Comment

by:JPTenore
ID: 22657312
Can you give me an example of
Data Source=myServerAddress;Initial Catalog=myDataBase    ....   part
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22657337
>Can you give me an example of
please look in the link provided. it's all there.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 53

Expert Comment

by:Dhaest
ID: 22657339

Some explanations:
myServerAddress = this is the name of your server (or ip-address) (example: Company001)
Initial Catalog = this is the name of your database (example:  OrderDb)
myUsername & myPassword: the name and password of the database user that you use to login to your database.

Using connection as new SqlConnection("Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;")
     connection.Open()
     ' Use the connection
 End Using

If you are using integrated security (your username for sql server is the same as windows, you just need this string:
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22657343
resp... you have to know the dynamic part, ie servername, database etc...
0
 

Author Comment

by:JPTenore
ID: 22657368
NO!  Sorry didn't mean to do this
0
 

Author Comment

by:JPTenore
ID: 22657377
For some reason it tought I wanted to Close this Question.??????
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

776 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