Jump to content

Dox33

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dox33

  • Rank
    Newbie
  1. Dox33

    Insert into database

    I'm sorry....I do not understand what you mean.
  2. Dox33

    Insert into database

    I have the same problems:Using the examples of W3School, I have made some pages.The DataBase has permissions fo 'everyone', 'me', 'administrators', etc.ect....I'm running on LocalHost, under XP-SP2, IIS.Page1:<html> <body> <H1>Add a new record</H1> <form method="post" action="ADO_Test7.1.asp"> <table> <tr> <td>Date:</td> <td><input name="Date"></td> </tr> </tr> <tr> <td>Time:</td> <td><input name="Time"></td> </tr> <tr> <td>User:</td> <td><input name="User"></td> </tr> <tr> <td>Job:</td> <td><input name="Job"></td> </tr> <tr> <td>Doc type:</td> <td><input name="DocType"></td> </tr> <tr> <td>Doc ID:</td> <td><input name="DocId"></td> </tr> <tr> <td>Connector:</td> <td><input name="Connector"></td> </tr> <tr> <td>Destination:</td> <td><input name="Destination"></td> </tr> </table> <br /> <br /> <input type="submit" value="Add New"> <input type="reset" value="Cancel"> </form> </body></html>Page2:<html> <body> <% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "D:/StreamServe/UOMS/WhatEver/Development/RunTime/DataBase/UOMS.mdb" sql="INSERT INTO UOMS (ID,Date,Time,User,Job,DocType,DocId,Connector,Destination) VALUE (" sql=sql & "'" & Request.Form("Date") & "'," sql=sql & "'" & Request.Form("Time") & "'," sql=sql & "'" & Request.Form("User") & "'," sql=sql & "'" & Request.Form("Job") & "'," sql=sql & "'" & Request.Form("DocType") & "'," sql=sql & "'" & Request.Form("DocId") & "'," sql=sql & "'" & Request.Form("Connector") & "'," sql=sql & "'" & Request.Form("Destination") & "')" on error resume next conn.Execute sql,recaffected if err<>0 then Response.Write("Error: " & err & " No update permissions!") else Response.Write("<h3>" & recaffected & " record added</h3>") end if conn.close %> </body></html>Result after addin a record:Error: -2147217900 No update permissions! The funny this is.... If I try to DELETE a record, or a bunch of records, that WORKS!So, I can destroy, but not create....Please help....
×
×
  • Create New...