2013年9月5日 星期四

asp-connect-mssql

mssqp-connect-asp example sample eg e.g. 

inf http://www.sqlstrings.com/sql-server-asp-conection.htm


1. ASP to MS SQL Server database connection with OLE DB: 

Set oConnection = Server.CreateObject("ADODB.Connection")
oConnection.Open "Provider=SQLOLEDB; Data Source=; Initial
Catalog=; User ID=; Password="
oConnection.Close
Set oConnection = Nothing


2. ASP to MS SQL Server database connection with SQL Driver:

Set oConnection = Server.CreateObject("ADODB.Connection")
oConnection.Open "Driver={SQL Server};" & _
"Server=;" & _
"Database=;" & _
"Uid=;" & _
"Pwd=;"
oConnection.Close
Set oConnection = Nothing

沒有留言:

張貼留言