Jump to content

choobakka

Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by choobakka

  1. same result im afraid. would you like to see the other ASP pages or is it only this page which is the problem?
  2. yes thats it. thats the only message (and action) thats happening."your page is not getting the value of the button you are clicking."please explain.
  3. same thing again :)same thing about not being able to submit date and no change in database
  4. how do you mean results. the only result i get is the message saying that i cannot submit records etc and there is also no change in the database.
  5. i replaced the first response.write with the response.write(sql). same result could my SQL statements be wrong?
  6. im aware of that lol. but even after a submit button is pressed, nothing changes in the database. that is my main gripe. im not worried about the message afterwards. its the inputting into the database which aint working!
  7. i did that. the same thing happens: just telling me that submitting data has been disabled from the demo have i done something wrong in the coding?
  8. it is NTFS. when i rightclick the folder the only things that says security is 'sharing and security'. if i select this i get a window with 4 tabs - general, sharing, web sharing, and customize. is this correct and if so what do i do next?
  9. thanks. ok how do i do each of those steps? i can do step 1
  10. this is the data stored in my MS ACCESS table:CUSTOMERID LAST_NAME FIRST_NAME ........... USERNAME PASSWORD 1 Harris Paula harrpau helloworld 2 Edwards Mitch edwamit bmwz4 etc etc I would like the user to be able to login with their username and password and then be presented with only their data to edit.how can i do this?thanks in advance
  11. i am using my localhost with IIS.
  12. If you yourself go to the ADO demp page: http://www.w3schools.com/ado/ado_demo.aspclick on the link which says "List, edit, update, and delete database records"you are presented with the first ASP page.then click on any of the buttons within the table. this takes you to the second ASP page.on this page you are able to edit the current database data.THIS IS THE STAGE THAT I AM AT.if you then click on SAVE or DELETE you get a page that either says:Submit to DatabaseSubmitting records has been disabled from this demo orSubmit to DatabaseDeleting records has been disabled from this demo.this is exactly what i get when i click on the buttons.below is the code i have for the ASP page once either of the buttons is pressed:<html><head><title>Submit DataBase</title></head><body><h2>Submit to Database</h2><%on error resume nextset conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0"conn.open(server.mappath("disso1.mdb"))if Request.form("action")="Save" then CustomerID=Request.Form("CustomerID") sql="UPDATE tblCustomer SET CustomerID="' & Request.Form("CustomerID") & "'," sql=sql & "Last_Name='" & Request.Form("Last_Name") & "'," sql=sql & "First_Name='" & Request.Form("First_Name") & "'," sql=sql & "Address1='" & Request.Form("Address1") & "'," sql=sql & "Address2='" & Request.Form("Address2") & "'," sql=sql & "Address3='" & Request.Form("Address3") & "'," sql=sql & "Post_Code='" & Request.Form("Post_Code") & "'," sql=sql & "Telephone1='" & Request.Form("Telephone1") & "'," sql=sql & "Telephone2='" & Request.Form("Telephone2") & "'," WHERE tblCustomer.[CustomerID]=" & CustomerID "' conn.Execute sql, Recordsaffected' if err <> 0 then' Response.Write("You do not have permission to update this database!")' else ' Response.Write("Record number " & no & " was updated.")' end if Response.Write("Submitting records has been disabled from this demo")end ifif Request.Form("action")="Delete" then CustomerID=Request.Form("CustomerID")' conn.Execute "DELETE FROM tblCustomer WHERE tblCustomer.[CustomerID]=" & CustomerID, Recordsaffected' if err <> 0 then' Response.Write("You do not have permission to delete a record from this database!")' else ' Response.Write("Record number " & no & " was deleted.")' end if Response.Write("Deleting records has been disabled from this demo")end ifconn.close%></body></html>this ASP page however only results in either of the two messages mentioned above and there is no interaction with the database once either button is pressed.
  13. I get the same messages as before.for the save button:Submit to DatabaseSubmitting records has been disabled from this demo for the delete button:Submit to DatabaseDeleting records has been disabled from this demo a new window opens which means that the buttons are executing to some extent. it is simply not INSERTING or DELETING from the database. maybe i am missing some code!
  14. The code with the 2 buttons is below:<%CustomerID=Request.Form("CustomerID")if CustomerID="" then response.endset conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0"conn.open(server.mappath("disso1.mdb"))set rs = Server.CreateObject("ADODB.Recordset")rs.Open "Select * from tblCustomer where tblCustomer.[CustomerID]=" & CustomerID , conn%><html><head><title>Edit DataBase Table</title></head><body><h2>Edit Database Table</h2><form method="post" action="demo_db_submit.asp" target="_blank"><input name="CustomerID" type="hidden" value=<%=CustomerID%>><table bgcolor="#b0c4de"><%for each x in rs.Fields if x.name <> "no" and x.name <> "dateadded" then%> <tr> <td><%=x.name%> </td> <td><input name="<%=x.name%>" value="<%=x.value%>" size="20"></td> <%end ifnextrs.closeconn.close%></tr></table><br /><input type="submit" name="action" value="Save"><input type="submit" name="action" value="Delete"></form></body></html>
  15. everything upto the red code works. when i click on the save and delete buttons, the code is executed but i get a messaage saying that updating and deleteing is not allowed (ie i dont have the permission). all i need is to be able to get the Save and Delete buttons to execute successfully (ie Save or Delete from the database. at the moment, this is not the case.
  16. i have followed the ADO tutorials on this site and im upto the last part. i would like to insert the changes made into the database.<html><head><title>Submit DataBase</title></head><body><h2>Submit to Database</h2><%on error resume nextset conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0"conn.open(server.mappath("disso1.mdb"))if Request.form("action")="Save" then CustomerID=Request.Form("CustomerID") sql="UPDATE tblCustomer SET CustomerID="' & Request.Form("CustomerID") & "'," sql=sql & "Last_Name='" & Request.Form("Last_Name") & "'," sql=sql & "First_Name='" & Request.Form("First_Name") & "'," sql=sql & "Address1='" & Request.Form("Address1") & "'," sql=sql & "Address2='" & Request.Form("Address2") & "'," sql=sql & "Address3='" & Request.Form("Address3") & "'," sql=sql & "Post_Code='" & Request.Form("Post_Code") & "'," sql=sql & "Telephone1='" & Request.Form("Telephone1") & "'," sql=sql & "Telephone2='" & Request.Form("Telephone2") & "'," WHERE tblCustomer.[CustomerID]=" & CustomerID "' conn.Execute sql, Recordsaffected' if err <> 0 then' Response.Write("You do not have permission to update this database!")' else ' Response.Write("Record number " & no & " was updated.")' end if Response.Write("Submitting records has been disabled from this demo")end ifif Request.Form("action")="Delete" then CustomerID=Request.Form("CustomerID")' conn.Execute "DELETE FROM tblCustomer WHERE tblCustomer.[CustomerID]=" & CustomerID, Recordsaffected' if err <> 0 then' Response.Write("You do not have permission to delete a record from this database!")' else ' Response.Write("Record number " & no & " was deleted.")' end if Response.Write("Deleting records has been disabled from this demo")end ifconn.close%></body></html>it is the last part (in red) which i am having difficulty with. everthing else works fine. i simply want the save and delete buttons to work. thanks in advance
  17. choobakka

    View Pictures

    i have embedded some jpg pictures in an MS Access Database. How can i extract these and display them on a web page using ASP/ADO? i have looked at the ASP and ADO tutorials on the site but the coding does not seem to extarct pictures, only text from an Access tabel.thanks in advance
×
×
  • Create New...