Jump to content

Changes In Server Causing Script Error


philcor

Recommended Posts

Not a techie by any stretch of the imagination.....I've had an ASP page on my website for years which worked just fine. Recently the hosting company upgraded the server it was on and now the ASP page won't work.It is a MS Access DB. I've created a DSN entry in IIS (new to me as well as I've never used it). The old website also was DSNless.CODE:

<!-- db.inc --><%dim myDSN		'dsn connection stringdim conn		'connection stringdim SQL			'SQL stringdim rs			'record set stringdim username		'user name string sent from memberindex.aspdim password		'password string sent from memberindex.aspusername = request.form("username")password = request.form("password")myDSN = "DSN=gfoadb"Set Conn = Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"Conn.Open myDSN%>

The error is that it doesn't like the Conn.Open line. This line has always worked in the past. Thoughts?In looking at examples, I see that I can also address the open directly by putting the path to the file in the statement but the hosting company has given me an absolute path name like /home/cluster1/data/n/r/xxxxxxxx/sites/xxxx.yyy/database/gfoa.mdbHow would I code the Open if this is the absolute path name?Thanks in advance

Link to comment
Share on other sites

If you post up the exact error message then we will have a greater idea about what is causing the problem but my initial thought would be that the db needs to be located into a folder that IUSR has the ability to write ldb files to.Try copying and pasting the exact error into Google as that'll probably bring up an FAQ.I had a similar problem when I moved to IIS7 and it was just a case of changing the version of the conn provider but if you have full control of the server there are tweaks that you can do on the server to make it work like your older IIS.

Link to comment
Share on other sites

I've changed a little of the code around to try and get around the myDSN = problem.The error I'm getting now is:Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name too long /members/asptest.asp, line 23 The code is:

Conn.Open "/1146332/sites/xxxxx.xxx/database/yyyyyy.mdb"

This is the physical address according to the hosting company. My guess is I need a c:/ or d:/ but not sure how to translate the physical into the c:/ or d:/

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...