Change ASP .mdb access to DSN Less Connection?

Itofu

New Member
I have an old ASP site (written a long time ago by a former employee) that connects to a 2003 ODBC database using DSN. The servers have been updated by our hosts to 2008, and we can no longer use ODBC so I have to make the connections DSN-Less. Unfortunately I have very little knowledge of ASP, and database connections through ASP. I wonder if anybody can help me change the code to connect to the Access database without ODBC?I think it connects using this code:\[code\]<%' Get current name of region and intro textDim objRec, sql, introtextsql="SELECT * FROM hometext WHERE home_id = 1"set objRec=Server.CreateObject("ADODB.Recordset")objRec.Open sql, "dsn=databasename"introtext = Replace(objRec("home_introtext"), vbCrLf, "<br />")' Get the 5 newest news itemsDim objRec2, sql2, newstextsql2="SELECT TOP 5 news_date, news_text FROM news ORDER BY news_date DESC"set objRec2=Server.CreateObject("ADODB.Recordset")objRec2.Open sql2, "dsn=databasename"' Get all images to appear to pageDim objRec3, sql3sql3="SELECT * FROM homeimages ORDER BY homeimage_date DESC"set objRec3=Server.CreateObject("ADODB.Recordset")objRec3.Open sql3, "dsn=databasename"' Get the next 5 events from the current dateDim objRec4, sql4sql4="SELECT TOP 5 event_date, event_name FROM events WHERE event_date >= " & niceDateAccess(Date()) & " ORDER BY event_date"set objRec4=Server.CreateObject("ADODB.Recordset")objRec4.Open sql4, "dsn=databasename"%>\[/code\]I'm not sure how it all connects, I'm not much of a scripter.Any (dumbed down) help would be appreciated!ThanksEDIT: The database is sat in the 'private' folder in the root folder on the server.
 
Back
Top