Jump to content

ADO demo - List, Edit, Update, and Delete Database Records


alexfog
 Share

Recommended Posts

Hi all,I'm very new with ASP and my English is bad, I thought I could ask for some help I'm using the ADO demo - List, Edit, Update, and Delete Database Records, it is working very good.I’m this code I’m getting an auto table with field names and values that I can edit and change.I need to have 3 fields that I can select from a drop down menu and 2 fields with few rows of text era.Somebody here could tell me please what to do in order to change fields to textboxes or to selection when I retrieve information automatically?I really don't know how to do it. Can somebody help me with some examples?<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><%ID_no=Request.Form("ID_no")if ID_no="" then response.endset conn=Server.CreateObject("ADODB.Connection") conn.provider="Microsoft.Jet.OLEDB.4.0"conn.open(server.mappath("IS.mdb"))set rs = Server.CreateObject("ADODB.Recordset")rs.Open "Select * from tblIS where tblIS.[iD_no]=" & ID_no , conn%><html><head><title>ADO - Edit DataBase Record</title><link href="aa.css" rel="stylesheet" type="text/css"><style type="text/css"><!--.style1 {font-size: xx-small}--></style></head><body><h2>Edit Database Record</h2><form method="post" action="Edit_IS.asp" target="_blank"><input name="ID_no" type="hidden" value=<%=ID_no%>><table ><%for each x in rs.Fields if x.name <> "ID_no" and x.name <> "dateadded" then%> <tr> <td><%=x.name%> </td> <td><input name="<%=x.name%>" value="<%=x.value%>" size="50"></td> <%end ifnextrs.closeconn.close%></tr></table><div align="center"><br /> <input type="submit" name="action" value="Save"> <input type="submit" name="action" value="Delete"> <br> </div></form></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...