JohnnyBGoode
Programmer
Is it possible to read from an MS Access 2000 database from VBScript? I have created an Access Query ("TestQuery"), but how do I call that query? Is there a better way to read from an Access database?
Below is how I would call a SQL stored proc from VBScript:
Below is how I would call a SQL stored proc from VBScript:
Code:
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.ConnectionString "dsn=dsnName;uid=userID;pwd=userPWD"
oConn.Open
Set oCmd = Server.CreateObject("ADODB.Command")
Set oRs = Server.CreateObject("ADODB.Recordset")
oCmd.ActiveConnection = oConn
oCmd.CommandType = adCmdStoredProc
oCmd.CommandText = "sp_return_dates"
Set oRs = oCmd.Execute()
...
...
...
oRs.Close()
set oRs = nothing
oConn.close
set oConn = nothing