OLE DB Connection - SQL Server

OLE DB Connection - SQL Server
JPTenoreAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
DhaestConnect With a Mentor Commented:
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
 
JPTenoreAuthor Commented:
Can you give me an example of
Data Source=myServerAddress;Initial Catalog=myDataBase    ....   part
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>Can you give me an example of
please look in the link provided. it's all there.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
DhaestCommented:

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
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
resp... you have to know the dynamic part, ie servername, database etc...
0
 
JPTenoreAuthor Commented:
NO!  Sorry didn't mean to do this
0
 
JPTenoreAuthor Commented:
For some reason it tought I wanted to Close this Question.??????
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.