mpoincare
January 26th, 2003, 07:27 PM
I am trying to add a new record in a ms access database located in the following
physical path: C\Inetpub\wwwroot\plea\data\project.mdb on a windows2000 server. I
a using the following ASP code in order to do that:
<!-- #include file="adovbs.inc" -->
<%
Dim conn, sConnection
Const DB_CONNECTIONSTRING = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & Server.MapPath("project.mdb") & ";"
Session.TimeOut=60
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open(DB_CONNECTIONSTRING)
%>
But the browser keeps displaying this error message:
Technical Information (for support personnel)
Error Type:
Microsoft VBScript compilation (0x800A0415)
Expected literal constant
/Plea/Data/AppLogic.asp, line 6, column 54
& "Data Source=" & Server.MapPath("project.mdb") & ";"
-----------------------------------------------------^
Can somebody explain me what the statement:"Expected literal constant" means in
a context like that and what can be done to fix it. I also tried to use the Physical
path to reach the database ( C\Inetpub\wwwroot\plea\data\project.mdb) and I still get the
same message. I am using IE4 (or IE5)
physical path: C\Inetpub\wwwroot\plea\data\project.mdb on a windows2000 server. I
a using the following ASP code in order to do that:
<!-- #include file="adovbs.inc" -->
<%
Dim conn, sConnection
Const DB_CONNECTIONSTRING = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & Server.MapPath("project.mdb") & ";"
Session.TimeOut=60
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open(DB_CONNECTIONSTRING)
%>
But the browser keeps displaying this error message:
Technical Information (for support personnel)
Error Type:
Microsoft VBScript compilation (0x800A0415)
Expected literal constant
/Plea/Data/AppLogic.asp, line 6, column 54
& "Data Source=" & Server.MapPath("project.mdb") & ";"
-----------------------------------------------------^
Can somebody explain me what the statement:"Expected literal constant" means in
a context like that and what can be done to fix it. I also tried to use the Physical
path to reach the database ( C\Inetpub\wwwroot\plea\data\project.mdb) and I still get the
same message. I am using IE4 (or IE5)