1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Asp error: has not been pre-compiled

Discussion in 'ASP' started by divinequran, Oct 14, 2008.

  1. divinequran

    divinequran New Member

    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.
     
  2. juresh

    juresh New Member

    i think there is a prob with your code. send the code.

    thanks
     
  3. divinequran

    divinequran New Member

    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
    %>
     
  4. divinequran

    divinequran New Member

    It get the records properly from db and prints properly, but i cant write data into access file. what may be the issue?
     

Share This Page