trice
trice

Reputation: 35

ASP VBScript Connection String to Access 2000 DB

We have an old Access 2000 database that we need to pull data from and store it into a text file via a web interface that has to run every 20 minutes. I have spent hours and hours searching for a correct connection string without anything working.

I even used Dreamweaver's point-and-click solution and was able to get it to connect and pull data with a System DSN on my local machine, but it shows a 500 Internal Server Error when I upload it to the testing server (both the local and the testing server System DSNs have the same name). (For clarification to die-hard programmers, I am a developer and am using Dreamweaver because I have no idea what I'm doing with ASP.)

I created a System DSN on the testing server (win server 2008), but it doesn't seem to work. I don't know if it's something with the VB code I'm writing or an issue with the DSNs. Could I please get some help with this, my deadline for this is tomorrow morning! (If I don't meet the deadline, major systems in our business will not work!)

Dreamweaver Connection:

Dim MM_LocalDb_STRING
MM_LocalDb_STRING = "dsn=Db;"

Dim Students
Dim Students_cmd
Dim Students_numRows

Set Students_cmd = Server.CreateObject ("ADODB.Command")
Students_cmd.ActiveConnection = MM_LocalDb_STRING
Students_cmd.CommandText = "SELECT * FROM Students" 
Students_cmd.Prepared = true
Students = Students_cmd.Execute
Students_numRows = 0

I have also seen various connection strings and have tried them with no success. Please help! (Thank you in advance.)

Upvotes: 0

Views: 823

Answers (1)

Matt McHugh
Matt McHugh

Reputation: 4095

If you can, try accessing the page locally on the test server. I believe this should give you a more specific error than just the generic 500.

My thought, because this works on your dev machine, is that it's a permissions error. You should make sure that the IUSR and, I think, LOCAL SERVICE accounts have read/write permissions to the database file.

Upvotes: 1

Related Questions