Danbabe
12-09-2009, 08:46 AM
I thought it was about time I upgraded by database skills. I currently have classic ASP web sites connecting to Access databases. This is the connection script I use in an Include File to connect to MS Access locally on the web server:
<!--#include file="includes/ADOVBS.inc" -->
<%
Dim RS, Connect
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Provider = "Microsoft.Jet.OLEDB.4.0;"
Connect.Properties("Jet OLEDB:Database Password") = "asecurestart"
Connect.Open "Data Source=DBPath\cgi-bin\DBName.mdb;"
Set RS = Server.CreateObject("ADODB.Recordset")
%>
This all works perfectly but I understand connecting to a SQL database is completley different.
Has anyone got the code to connect to a SQL database on a seperate server on the local LAN called SQL1? I am a complete novice to SQL so some help would be much appreciated indeed!
Many thanks
Dan
<!--#include file="includes/ADOVBS.inc" -->
<%
Dim RS, Connect
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Provider = "Microsoft.Jet.OLEDB.4.0;"
Connect.Properties("Jet OLEDB:Database Password") = "asecurestart"
Connect.Open "Data Source=DBPath\cgi-bin\DBName.mdb;"
Set RS = Server.CreateObject("ADODB.Recordset")
%>
This all works perfectly but I understand connecting to a SQL database is completley different.
Has anyone got the code to connect to a SQL database on a seperate server on the local LAN called SQL1? I am a complete novice to SQL so some help would be much appreciated indeed!
Many thanks
Dan