Hi,
I'm using the following code to try and connect to a simple access db, but i keep getting an error.
The weird thing is it works fine on my test server , but when i upload to my webspace it just wont work. I've double checked the connection string too.
I've included the error and the code below, hope you can help.
error
Code:
Microsoft JET Database Engine error '80040e14'
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
/testasp.asp, line 19
Page code
Code:
<%Option Explicit%>
<HTML>
<HEAD>
<TITLE>Testing our connection</TITLE>
</HEAD>
<BODY>
<%
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=d:/webspace/w00t.biz/db/newsletter.mdb;" & _
"Persist Security Info=False"
objRS.Open "newsletter", objConn
While Not objRS.EOF
Response.Write objRS("email") & "<BR>"
objRS.MoveNext
Wend
objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
%>
</BODY>
</HTML>