Asp error: has not been pre-compiled

divinequran's Avatar, Join Date: Oct 2008
Contributor
Hi,

When i uploaded a file in my site i get the following error. what is the issue? iam learning asp just now

The file '/test.aspx' has not been pre-compiled, and cannot be requested.
juresh's Avatar, Join Date: Sep 2008
Go4Expert Member
i think there is a prob with your code. send the code.

thanks
divinequran's Avatar, Join Date: Oct 2008
Contributor
Code:
<%
Dim Conn
Dim sql

Response.Write Server.MapPath("test.asp")
Response.Write("<br><br>")
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Inetpub\vhosts\ecoimpex.net\httpdocs\App_Data\db1.mdb"

set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT * FROM contact", conn

do until rs.EOF
  for each x in rs.Fields
    Response.Write(x.name)
    Response.Write(" = ")
    Response.Write(x.value & "<br />")
  next
  Response.Write("<br />")
  rs.MoveNext
loop

rs.close
conn.close

sql="INSERT INTO contact (Id,Name,Phone)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("115") & "',"
sql=sql & "'" & Request.Form("hmmm") & "',"
sql=sql & "'" & Request.Form("90147452") & "')"

on error resume next
conn.Execute sql,recaffected
if err<>0 then
  response.write("<p>")
  response.write("Description: ")
  response.write(objErr.Description & "<br />")
  response.write("Help context: ")
  response.write(objErr.HelpContext & "<br />")
  response.write("Help file: ")
  response.write(objErr.HelpFile & "<br />")
  response.write("Native error: ")
  response.write(objErr.NativeError & "<br />")
  response.write("Error number: ")
  response.write(objErr.Number & "<br />")
  response.write("Error source: ")
  response.write(objErr.Source & "<br />")
  response.write("SQL state: ")
  response.write(objErr.SQLState & "<br />")
  response.write("</p>")

  Response.Write("No update permissions!")
else
  Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
divinequran's Avatar, Join Date: Oct 2008
Contributor
It get the records properly from db and prints properly, but i cant write data into access file. what may be the issue?