Here is an optimized vbscript of what you want to do, this should help you out...
This will allow you to not have to worry about where the database is located physically on the server, and better yet, if it is moved, your data won't crap out on you...this is also available for SQL7 databases as well...Code:Set DB = Server.CreateObject("ADODB.Connection") DB.open "DBQ=" & SERVER.MapPath("your.mdb") & ";DRIVER={Microsoft Access Driver (*.mdb)};" Set cmdTemp = Server.CreateObject("ADODB.Command") Set rs = Server.CreateObject("ADODB.Recordset") cmDTemp.CommandText = "SELECT * FROM YourTable" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = DB rs.Open cmdTemp, , 3, 3
This should make you dangerous enough to continue on with your project...Good luckCode:strconn = "Driver={SQL Server};Description=sqldemo;SERVER=127.0.0.1;UID=LoginID;PWD=Password;DATABASE=Database_Name set conn = server.createobject("adodb.connection") conn.open strconn




Reply With Quote