Solved

OLE DB Connection - SQL Server

Posted on 2008-10-07
7
174 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
Comment Utility
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
Comment Utility
Can you give me an example of
Data Source=myServerAddress;Initial Catalog=myDataBase    ....   part
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
>Can you give me an example of
please look in the link provided. it's all there.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 53

Expert Comment

by:Dhaest
Comment Utility

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]
Comment Utility
resp... you have to know the dynamic part, ie servername, database etc...
0
 

Author Comment

by:JPTenore
Comment Utility
NO!  Sorry didn't mean to do this
0
 

Author Comment

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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now