connection to dbase
I am running Windows server 2003 as a server with IIS, the files are located in the server under InetPub wwwroot BegASPFiles, I have set up a virtual directory BegASP. I am working from a client machine Win XP Pro, and have had no trouble accessing the ASP pages I have created so far. Up until I tried to connect to an Access database.
I have placed the database in C:/datastores. I am using Movie2000.mdb. The dbase has a table named "Movies" and a column named "Title" with some data.
I run this code good right up until line 21. All will run fine, as soon as I introduce line 22, I get an internal Server error 500.
It doesnt seem to like objConn.Open
<TITLE>Testing our connection</TITLE>
See this text?
Dim adOpenForwardOnly, adLockReadOnly, adCmdTable
adOpenForwardOnly = 0
adLockReadOnly = 1
adCmdTable = 2
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
strDatabaseType = "Access"
Response.Write "objConn is Access"
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\datastores\Movie2000.mdb;" & _
"Persist Security Info=False"
objRS.Open "Movies", objConn, adOpenForwardOnly, adLockReadOnly, adCmdTable
While Not objRS.EOF
Response.Write objRS("Title") & "<BR>"
Set objRS = Nothing
Set objConn = Nothing
I hope someone can shed some light. All the permissions seem to be ok..Im at a loss.
Thanks In Advance