473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Select data and update all field in one page in asp

Hi guys,
I write a program with asp that select data from data base and show data in text box in asp, I want to know how user can change data and save it in this page, (I want to view and save data in one page).
Nov 23 '05 #1
2 2923
Niheel
2,460 Expert Mod 2GB
You should display the data in a form, and have it ready to make changes.
Nov 23 '05 #2
This is my select code that shows fields in text box, I don’t know how I write Insert statement, please help me, thanks

Expand|Select|Wrap|Line Numbers
  1.  --------- 
  2.  
  3. <%@ Language=VBScript %>
  4. <html>
  5. <head>
  6. <meta NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  7. </head>
  8. <BODY bgcolor=white>
  9. <CENTER><strong>
  10. <em><font color=CornflowerBlue>QUICK LOAN FUNDING</font></em></strong></CENTER><br />
  11. <font color=CornflowerBlue><CENTER><strong><em>REPORT FORM&nbsp;&nbsp;&nbsp&nbsp;<% response.Write "(" & date() & ")" %></em></strong></CENTER><br />
  12. <br></font>
  13. <form action="viewprinter2.asp" method="post" id="form1" name="form1">
  14. <% 
  15. cs = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("printer.mdb")
  16. set adocon = Server.CreateObject("adodb.connection")
  17. adocon.Open cs
  18. set rs=Adocon.Execute("select PrinterId,printerName,Floor,IpAddress,Functionality from name order by floor,PrinterId ")
  19. if rs.eof=true and rs.bof=true then 
  20. Response.Write "<br><b>No Records Matched.</b>"
  21. else
  22. numfields=rs.fields.count
  23. Response.Write "<table bgcolor=#c1e0ff border=3 width=100% >" 
  24. Response.Write "<tr>"
  25. for i=0 to numfields-1
  26. if rs(i).name="printerId" then
  27. Response.Write "<td><font color=CornflowerBlue size=3><em><b>" & rs(i).name & "</font></b></em></td>"
  28. else
  29. Response.Write "<td><font color=CornflowerBlue size=3><em><b>" & rs(i).name & "</font></b></em></td>"
  30. end if
  31. next
  32. Response.Write "</tr>"
  33. rs.movefirst
  34. do while not rs.eof
  35. Response.Write "<tr>"
  36. for i=0 to numfields-1
  37. if rs(i).name="printeridid" then%>
  38. <td bgcolor=yellow valign=top><font color=black face=arial size=2><em><b><input name=tname type=text value="<%=rs.fields(i).value%>" /> 
  39. <% 
  40. else%>
  41. <td align=center><font color=#000080 face=arial size=2><em><b><input name=tname type=text value="<%=rs.fields(i).value%>" /> 
  42. <%
  43. end if
  44. next
  45. Response.Write "</tr>"
  46. rs.movenext
  47. loop
  48. '******************
  49. end if
  50. %>
  51. <input type="submit" value="Save" id="submit1" name="submit1" >
  52. </body>
  53. </html>
  54.  
Nov 24 '05 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
7
by: Jack | last post by:
Hi, I have posted this problem before. Apprently, the suggestion took care of the problem. However, still I am getting the above error message. I am using a session variable to transfer a value...
1
by: Jason Wood | last post by:
Hi everyone, I've a simple table containing member details. I've written a SELECT to select all the members. I've based the form on this select, using the from wizard. Once built I've...
5
by: Allan M. | last post by:
I have a series of select boxes that must be populated client side, because they interact with each other. The design specification calls for these boxes to be updated without having to make a...
5
by: robecflo | last post by:
Hi Forum, i have a problem, hope somebody can give me ideas. I'm developing with windows forms and vb.net, and oracle as a database. At this moment i have a table called amortizaciones, this table...
3
by: eholz1 | last post by:
Hello PHP programmers. I had a brilliant idea on one of my pages that selects some data from my mysql database. I first set the page up to display some info and an image, just one item, with a...
1
by: bimeldip | last post by:
Hi, I have managed to create codes to display data from the database in a html page.I have gone on to create a page to allow users to manipulate the table via a html page. For instance users will be...
0
by: bimeldip | last post by:
Hi, I have managed to create codes to display data from the database in a html page.I have gone on to create a page to allow users to manipulate the table via a html page. For instance users will be...
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
5
by: Chris Cowles | last post by:
I use an application that uses Oracle 8.1.7. All functions of the application are completed with calls to stored procedures. A data entry error occurred that caused thousands of records to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.