|
...and changing code to connect to the database.
I believe that I am running v7 or maybe v8 of the forum and have been hosting the site the forum is on myself until recently when I switched to godaddy.com. I set up a DSN with them but have not been able to change the code on the common.asp and database_connection.asp pages to get the forum to work. I thought that since v7 is no longer supported, I would switch to the free version 9. I have downloaded and followed all the steps. However, I cannot get the upgrade to work because I have no idea what the physical server path or the path from this application to database would be. The database is now outside the forum in a folder called bane_db under the main root of the site. Write permissions have been set up properly, or so I was told. I am using Access and I know that it should not be used in a live production but I don't know how to use MySql or Sql Server. I would like to continue to use Access since I am used to it. Here is what I found on godaddy's site for help with "Connecting to an Access Database Using File DSN and ASP/ADO". This looks totally different than the code in the database_connection.asp file. Please help me upgrade to v9 and get the forum running again!!! 
<% Dim oConn, oRs Dim qry, connectstr, sDSNDir Dim db_name, db_username, db_userpassword Dim db_server, dsn_name
dsn_name = "your_dsn_name" fieldname = "your_fieldname" tablename = "your_tablename"
sDSNDir = Server.MapPath("_dsn")
connectstr = "filedsn=" & sDSNDir & "/" & dsn_name
Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open connectstr qry = "SELECT * FROM " & tablename
Set oRS = oConn.Execute(qry)
if not oRS.EOF then while not oRS.EOF response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & " " oRS.movenext wend oRS.close end if
Set oRs = nothing Set oConn = nothing
%>
|