![]() |
| Please Help: Configuring VS2005 Web App to HMS SQL2005? |
|
B3
|
Please forgive my inexperience & thank you for reading this...
Any help or reference is GREATLY appreciated! THanks. |
||||||||||||
|
|
|||||||||||||
|
jraybould
|
All you need is a simple connection string placed in your .NET code. For example, connectionstrings.com provides a great list of valid ways to connect to a SQL 2005 database using .NET:
For brevity I copied only one: * Connect via an IP address: "Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;" (DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default)) After you've assigned your string to a variable, use it like this: SqlConnection conn = new SqlConnection(myConnectionString); conn.Open(); doSomething(); conn.Close(); |
||||||||||||
|
|
|||||||||||||
| Please Help: Configuring VS2005 Web App to HMS SQL2005? |
|
||
|


