PDA

Click to See Complete Forum and Search --> : Databases With ASP & VBscript


pradnyesh
Dec 31st, 1999, 10:07 PM
How to use access database within the web directory when you dont have dsn setup on the server

Can anybody tell me or direct me to some link

Clunietp
Jan 1st, 2000, 12:44 AM
I'm not sure if this is what you're looking for, but here it is.


dim cn
dim rs

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

cn.open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=relativepath\MyDb.mdb"

set rs = cn.execute("Select * from MyTable",,1)

do until rs.eof = true
response.write rs.fields(0).value & "<BR>"
rs.movenext
loop

cn.close
set cn = nothing
set rs = nothing