Connecting to MSSQL with a DSN

Problem:

Connecting to MSSQL with a DSN



Solution:

*You can use the following string to connect to MSSQL with a DSN
<%
Set Conn = Server.CreateObject ("ADODB.Connection")
Conn.open "DSN=MyDSN;UID=USER;PWD=PASSWORD;DATABASE=mydatabase"
%>
 
MyDSN is the DSN that you created for the MSSQL server through the Control Panel, USER is the username and PASSWORD is the password which was provided to you in your MSSQL account setup mail or which you have created thru your Control Panel.*
  • 0 Bu dökümanı faydalı bulan kullanıcılar:
Bu cevap yeterince yardımcı oldu mu?

İlgili diğer dökümanlar

get "SQL Server does not exist or access is denied" error when I tried to connect to MS SQL database on your server?

Problem: get "SQL Server does not exist or access is denied" error when I tried to connect to MS...

Connecting to MSSQL with out a DSN

Problem: Connecting to MSSQL with out a DSN Solution: * You can use the following string...

Opening the Database Folder in SQL Server Enterprise Manager 2000 Takes a Long Time

Problem: Opening the Database Folder in SQL Server Enterprise Manager 2000 Takes a Long Time...

I'm getting a strange error message: Operation must use an updateable query(error '80004005')?

Problem: I'm getting a strange error message: Operation must use an updateable query(error...

error: Too few parameters

Problem: error: Too few parameters Solution: error type:Microsoft OLE DB Provider for ODBC...