Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Access 2000 database connection


Message #1 by "Sam Johnston" <sam.johnston@j...> on Thu, 30 Aug 2001 12:42:58 -0400
I have an asp application up and running for some time now, even though

I consider myself very much an amateur.  I am connecting to an Access 97

database with the following OLE setup:

Set oConn=Server.CreateObject ("ADODB.connection")

vCS = "Provider=Microsoft.Jet.OLEDB.4.0;Data

Source=d:\xxx.xxx.xxx.xxx\_test2.mdb"



Works great.



I want to connect to an Access 2000 or XP database.  What should my

string look like?  



Tks

Sam



Message #2 by Mark Eckeard <meckeard2000@y...> on Thu, 30 Aug 2001 10:21:11 -0700 (PDT)
Sam,



Here is a sample of what I use to connect to an Access

2k DB:



<%

  

Dim conn, rs, SQLstr

  

'Create our conn & rs objects.

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open(Server.Mappath("login.mdb"))

set rs = Server.CreateObject("ADODB.recordset")

'Execute the SQL to see if the name & password are in

the table.

rs.Open "Select name, login_date, login_time from

visitors order by login_date, login_time", conn



%>



Basically the same as you have now.



Mark.



--- Sam Johnston <sam.johnston@j...> wrote:

> I have an asp application up and running for some

> time now, even though

> I consider myself very much an amateur.  I am

> connecting to an Access 97

> database with the following OLE setup:

> Set oConn=Server.CreateObject ("ADODB.connection")

> vCS = "Provider=Microsoft.Jet.OLEDB.4.0;Data

> Source=d:\xxx.xxx.xxx.xxx\_test2.mdb"

> 

> Works great.

> 

> I want to connect to an Access 2000 or XP database. 

> What should my

> string look like?  

> 

> Tks

> Sam

> 


  Return to Index