?
Solved

OLE DB Connection - SQL Server

Posted on 2008-10-07
7
Medium Priority
?
185 Views
Last Modified: 2012-05-05
OLE DB Connection - SQL Server
0
Comment
Question by:JPTenore
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 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 143

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 143

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 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