This one sounds simple even to me.. sounds like a typo. But I can't find it.
This code works when adding a new entry:
But this code gives an error (Data source name not found and no default driver specified) when I use it to open the database before reading the recordsets I need.Code:Set Conn = Server.CreateObject("ADODB.Connection") DSNName = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" DSNName = DSNName & Server.MapPath("/honeyanded/database/wedding.mdb") Conn.Mode = 3 '3 = adModeReadWrite Conn.Open DSNName Conn.Execute(query) Conn.Close
I don't see why one works and the other doesn't.Code:set Conn = server.CreateObject( "ADODB.Connection" ) DSNName = "DRIVER=Microsoft Access Driver(*.mdb);DBQ=" DSNName = DSNName & Server.MapPath("/honeyanded/database/wedding.mdb") Conn.Open DSNName




Reply With Quote