X
xg
Hi, I am writing an ASP page which contains the following code:
var MM_DBConn=Server.CreateObject("ADODB.Connection");
MM_DBConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\trio.mdb;"); // failed on this line
//MM_editQuery is an INSERT sql statement
MM_DBConn.Execute(MM_editQuery);
When I run this on a Windows 2000 Professional system, I got the following
error:
Microsoft JET Database Engine error '80004005'
Not a valid file name.
And it points out that it failed on the MM_DBConn.Open statement.
However, if I copy the above code to a Visual Basic 6.0 form (on the same
machine) like this:
Private Sub Command1_Click()
Dim o As Object
Dim rs As Object
Set o = CreateObject("adodb.connection")
Call o.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\trio.mdb")
Set rs = o.execute("select count(*) from comments")
End Sub
Everything works. Can someone tell me what went wrong? Thanks!
xg
var MM_DBConn=Server.CreateObject("ADODB.Connection");
MM_DBConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\trio.mdb;"); // failed on this line
//MM_editQuery is an INSERT sql statement
MM_DBConn.Execute(MM_editQuery);
When I run this on a Windows 2000 Professional system, I got the following
error:
Microsoft JET Database Engine error '80004005'
Not a valid file name.
And it points out that it failed on the MM_DBConn.Open statement.
However, if I copy the above code to a Visual Basic 6.0 form (on the same
machine) like this:
Private Sub Command1_Click()
Dim o As Object
Dim rs As Object
Set o = CreateObject("adodb.connection")
Call o.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\trio.mdb")
Set rs = o.execute("select count(*) from comments")
End Sub
Everything works. Can someone tell me what went wrong? Thanks!
xg