Asp error: has not been pre-compiled

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

  1. divinequran

    divinequran New Member

    Joined:
    Oct 9, 2008
    Messages:
    62
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Home Page:
    http://divinequran.com/
    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

    Joined:
    Sep 11, 2008
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    0
    i think there is a prob with your code. send the code.

    thanks
     
  3. divinequran

    divinequran New Member

    Joined:
    Oct 9, 2008
    Messages:
    62
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Home Page:
    http://divinequran.com/
    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

    Joined:
    Oct 9, 2008
    Messages:
    62
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Home Page:
    http://divinequran.com/
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice