473,386 Members | 1,699 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,386 software developers and data experts.

create a dynamic web page with DB interaction

Hi guys,
I'm trying to develop a front end tool using Macromedia Dream weaver and MS Access with the help os ASP.
My condition is once a value is selected frlom the drop down menu, it should pull all the records related to that value from the mdb file, and it should have three check boxes along side the value.
These check boxes which when checked the answer should be saved in the database.

Expecting an answer.

Thanks
Aashish Washikar
Nov 23 '07 #1
6 1663
omerbutt
638 512MB
Hi guys,
I'm trying to develop a front end tool using Macromedia Dream weaver and MS Access with the help os ASP.
My condition is once a value is selected frlom the drop down menu, it should pull all the records related to that value from the mdb file, and it should have three check boxes along side the value.
These check boxes which when checked the answer should be saved in the database.

Expecting an answer.

Thanks
Aashish Washikar
can u show some of the code u have written till now so i can guide u in the proper way :),,u have to be lil discriptive while u ask a question......;)
Nov 23 '07 #2
jhardman
3,406 Expert 2GB
Expecting an answer.

Thanks
Aashish Washikar
42

Jared
Nov 28 '07 #3
Hi Omer,
I'm a complete newbie to the subject, so if u can suggest me how to do it from scratch. It would be great.

Thanks in advance
Dec 2 '07 #4
omerbutt
638 512MB
well i should tell you first that you should have a very gud know how with the following things asp,msaccess,html and javascript i would suggest youu to use html for your front end and asp at the back end for cummunitcating with the database use dreamweaver ver 8.+.....and as per your requirementyou are trying to make a drop down box okay .....means you have to use
[HTML]
<select >
<option1></option>
<option1></option>
</select>
[/HTML]
and then make as much select drop down lists as many items you have in the first select menu for example i can give you an idea

i have a db in access which has a table named Stock
which has the record of printers of these 3 main companies
"konica,hp,cannon" which are denoted by the field name of company lets say

TABLE:Stock
Field name----------Type-------------------------------------Example data
id_no (primary key,Autonumber) automatically assigned
macmodel (text) 2200,200,KM5410
company (text) HP,CANON,KONICA

NOW MAKE A FORM IN HTML AND MAKE A SELECTION MENU
Expand|Select|Wrap|Line Numbers
  1. <select name="company">
  2. <option value="none" selected="selected">Please Select a Company</option>
  3. <option value="H">HP</option>
  4. <option value="K">KONICA</option>
  5. <option value="C">CANON</option>
  6. </select>
  7.  
now make the recordset object and connection string
Expand|Select|Wrap|Line Numbers
  1. <%
  2. set rs=Sever.CreateObject("ADODB.recordset")
  3. connstr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("PATH TO YOU DATABSE")
  4. %>
  5.  
Now run a query to select all MachineModels for HP
Expand|Select|Wrap|Line Numbers
  1. <%
  2. STRsql="Select * FROM stock WHERE stock.company='HP';"
  3. %>
  4.  
now open the query and connection string with the recset object
Expand|Select|Wrap|Line Numbers
  1. <%
  2. rs.Open strSQL, connstr,3
  3. %>
  4.  
here you can display all the items for the hp models in a drop down list
Expand|Select|Wrap|Line Numbers
  1. <select name="HP">
  2. <%while not rs.EOF%>//////////////loop until the end of file 
  3. <option value="<%=rs.fields("macmodel")%>">response.write(rs.fields("macmodel"))</option>
  4. <%rs.Movenext  //////////////move to next item inthe database
  5.       loop
  6.       rs.close
  7. %>
  8. </select>
  9.  
did you got any idea .........i am stopping here if you want continious guidence ........you have to work by your self too ..........now do a work make a form as i told you and a database containing the same fields name as i told you
make some entries manuallly by opening the database in access and enter 3 records for each of the companies having any kind of model names as you like and make a form and make all the four selection menus there as i told you

1...for the compnies
2....for the hp models (by looping through the database)
3....for canon models (same as above by looping)
4...for the konica (same as above)

then return to me with your code "properly running"...then i will tell you how to hide them and how to trigger them open when they are required
Reagards,
Omer

Hi Omer,
I'm a complete newbie to the subject, so if u can suggest me how to do it from scratch. It would be great.

Thanks in advance
Dec 3 '07 #5
Hi,
I'm sorry for being away for quite a some time now.

Here is what i wrote.

The error :
Microsoft VBScript runtime error '800a01a8'

Object required: ''

/helpdesk/geae/Washikar/Test/saveg.asp, line 5

The code :


Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim Conn
  3. Dim Rs
  4. Dim sql
  5. Rs.source = "Eboard"
  6. objrs.activeconnection = objconn
  7. objrs.open
  8.  
  9. 'Create an ADO connection and recordset object
  10. Set Conn = Server.CreateObject("ADODB.Connection")
  11. Set Rs = Server.CreateObject("ADODB.Recordset")
  12.  
  13. 'Set an active connection and select fields from the database
  14. Cn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(".\Eboard.mdb")
  15.  
  16. sql= "SELECT Time, Employee Name, Lean, Six Sigma, Green Belt FROM Eboard;" 
  17.  
  18. 'Set the lock and cursor type
  19. Rs.CursorType = adOpenForwardOnly 
  20. Rs.LockType = 3
  21.  
  22. Rs.Open sql, ObjConn 'Open the recordset with sql query
  23.  
  24. Rs.AddNew 'Prepare the database to add a new record and add
  25. Rs.Fields("Time") = Request("Time")
  26. Rs.Fields("Employee Name") = Request("Employee Name")
  27. Rs.Fields("Lean") = Request("Lean")
  28. Rs.Fields("Six Sigma")=Request("Six Sigma")
  29. Rs.Fields("Green Belt") = Request("Green Belt")
  30.  
  31. Rs.Update   'Save the update
  32. Rs.Close
  33. Set Rs = Nothing
  34. Set Conn = Nothing
  35. Response.Redirect "index.htm"
  36. %>
Dec 30 '07 #6
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <%@ Language=VBScript %>
  3. <%option explicit%>
  4. <%Response.Buffer = false%>
  5. <html>
  6. <head>
  7. <title>Employees Reporting to Mr. Balaji Subramaniam</title>
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  9. <SCRIPT type=text/javascript>
  10. var timer = null
  11. function start()
  12. {
  13. var months = new Array(13);
  14.    months[0]  = "1";
  15.    months[1]  = "2";
  16.    months[2]  = "3";
  17.    months[3]  = "4";
  18.    months[4]  = "5";
  19.    months[5]  = "6";
  20.    months[6]  = "7";
  21.    months[7]  = "8";
  22.    months[8]  = "9";
  23.    months[9]  = "10";
  24.    months[10] = "11";
  25.    months[11] = "12";
  26. var time = new Date()
  27.    var monthnumber = time.getMonth();
  28.    var monthname   = months[monthnumber];
  29.    var monthday    = time.getDate();
  30.    var year        = time.getYear();
  31. var hours = time.getHours()
  32. var minutes = time.getMinutes()
  33.  
  34. if(year < 2000) { year = year + 1900; }
  35.    var dateString = monthname +
  36.                     '/' +
  37.                     monthday +
  38.                     '/' +
  39.                     year;
  40.  
  41. minutes=((minutes < 10) ? "0" : "") + minutes
  42. var seconds = time.getSeconds()
  43. seconds=((seconds < 10) ? "0" : "") + seconds
  44. var clock = hours + ":" + minutes + ":" + seconds
  45. document.forms[0].time.value = dateString + " " + clock
  46. timer = setTimeout("start()",1000)
  47. }
  48. </SCRIPT>
  49. <META content="MSHTML 6.00.2800.1601" name=GENERATOR></HEAD>
  50. <BODY onload=start()><FONT face="Times New Roman" color=red>
  51.  
  52. </head>
  53.  
  54.  
  55.  
  56.  
  57. <body>
  58. <FORM action=./saveg.asp method=post>
  59. <table width="100%" border="0">
  60.   <tr> 
  61.     <td width="22%" align="left" valign="top"><img src="file:///L|/Washikar/Get%20it/629904.jpg" width="167" height="74"></td>
  62.     <td width="78%"> <h1 align="left"><strong>IT Services</strong><br>
  63.         Lean Tracker</h1>
  64.       <p>&nbsp;</p></td>
  65.   </tr>
  66.  
  67.  
  68.  
  69.   <tr> 
  70.     <td height="23" colspan="2"> <hr> </td>
  71.   </tr>
  72.  
  73.  
  74.  
  75.  
  76.   <tr> 
  77.     <td>&nbsp;
  78.   <TR> 
  79.     <TD><B>Time of Entry</B> 
  80.     <TD><INPUT size=18 name=time> <BR></TD>
  81.   <TR>
  82.     <td><strong>Supervisor Name </strong>
  83. <td valign="middle"><div align="left">Mr. Balaji Subramaniam<br>
  84.       </div></td>
  85.   </tr>
  86.  
  87. </table>
  88.  
  89.  
  90.  
  91.  
  92. <p>&nbsp;</p><table width="100%" border="0">
  93.   <tr> 
  94.     <td><strong>Sl. No</strong></td>
  95.     <td><strong>Employee OHR<br>
  96.       </strong></td>
  97.     <td><strong>Employee Name<br>
  98.       </strong></td>
  99.     <td><div align="center"><strong>Lean <br>
  100.         </strong></div></td>
  101.     <td><div align="center"><strong>SixSigma<br>
  102.         </strong></div></td>
  103.     <td><div align="center"><strong>Green Belt<br>
  104.         </strong></div></td>
  105.   </tr>
  106.  
  107.  
  108.  
  109.  
  110. <tr> 
  111.     <td>1.</td>
  112.     <td>703000133<br></td>
  113.     <td>Pramod Sonduripanthangi<br></td>
  114.     <td>
  115. <FORM action=./saveg.asp method=post>
  116.   <div align="center"> 
  117.  
  118.     <input type="checkbox" name="Options" value="Lean">
  119.         </div>
  120.       </form></td>
  121.     <td><FORM action=./saveg.asp method=post>
  122.     <div align="center"> 
  123.  
  124.           <input type="checkbox" name="Options" value="SixSigma">
  125.         </div>
  126.       </form></td>
  127.     <td><form name="form3" method="post" action="saveg.asp">
  128.     <div align="center"> 
  129.           <input type="checkbox" name="Green Belt" value="checkbox">
  130.         </div>
  131.       </form></td>
  132.   </tr>
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   <tr> 
  141.     <td>2.</td>
  142.     <td>303015604<br></td>
  143.     <td>Abdul Shaik Auqil<br></td>
  144.     <td><form name="form4" method="post" action="saveg.asp">
  145.       <div align="center"> 
  146.           <input type="checkbox" name="Lean" value="checkbox">
  147.         </div>
  148.       </form></td>
  149.     <td><form name="form5" method="post" action="saveg.asp">
  150.       <div align="center"> 
  151.           <input type="checkbox" name="SixSigma" value="checkbox">
  152.         </div>
  153.       </form></td>
  154.     <td><form name="form6" method="post" action="saveg.asp">
  155.       <div align="center"> 
  156.           <input type="checkbox" name="Green Belt" value="checkbox">
  157.         </div>
  158.       </form></td>
  159.   </tr>
  160.  
  161.  
  162.  
  163.  
  164.                 <tr>
  165.  
  166.   <td class="bodyblack">&nbsp;</td>
  167.                 </tr>
  168.                 <tr>
  169.                     <td class="hgt">
  170.                     </td>
  171.                 </tr>
  172.                 <tr>
  173.                     <td class="bodyblack">
  174.  
  175.                     </td>
  176.                 </tr>
  177.                 <tr>
  178.                     <td class="hgt" >
  179.                     </td>
  180.                 </tr>
  181.                 <tr>
  182.                     <td class="hgt" >
  183.                     </td>
  184.                 </tr>
  185.                 <tr>
  186.                     <td align="right" class="bodyblack" >
  187.                         </td>
  188.                 </tr></tbody>
  189. </table> </td> </tr> </table> </td> </tr> <table width="100%" border="0"> </td> 
  190. <td>&nbsp;</td>
  191.     </tr>
  192.  
  193. </table>
  194. <p>&nbsp;</p><table width="100%" border="0">
  195.   <tr>
  196.     <td><form name="form10" method="post" action="saveg.asp">
  197.         <div align="center">
  198.           <input type="submit" name="Submit" value="Submit">
  199.         </div>
  200.       </form></td>
  201.   </tr>
  202. </table>
  203. <p>&nbsp;</p>
  204. <tr>
  205.  
  206.   <td align="left" class="bodyblack">&nbsp; </td>
  207.                 </tr>
  208.                 <tr>
  209.                     <td class="hgt">
  210.                     </td>
  211.                 </tr>
  212.  
  213.                 <tr>
  214.  
  215.   <td class="bodyblack">&nbsp;</td>
  216.                 </tr>
  217.                 <tr>
  218.                     <td class="hgt">
  219.                     </td>
  220.                 </tr>
  221.                 <tr>
  222.                     <td class="bodyblack">
  223.  
  224.                     </td>
  225.                 </tr>
  226.                 <tr>
  227.                     <td class="hgt" >
  228.                     </td>
  229.                 </tr>
  230.                 <tr>
  231.                     <td class="hgt" >
  232.                     </td>
  233.                 </tr>
  234.                 <tr>
  235.                     <td align="right" class="bodyblack" >
  236.                         </td>
  237.                 </tr></tbody>
  238. </table> </td> </tr> </table> </td> </tr> <table width="100%" border="0"> </td> 
  239. <td>&nbsp;</td>
  240.     </tr>
  241. <tr> 
  242.     <td valign="middle">&nbsp;</td>
  243.     <td>&nbsp;</td>
  244.     <td>&nbsp;</td>
  245.     <td>&nbsp;</td>
  246.     <td>&nbsp;</td>
  247.   </tr>
  248. </body>
  249. </html>
Dec 30 '07 #7

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

Similar topics

13
by: Stephen Poley | last post by:
Good advice is frequently given in c.i.w.a.* on page structure: matters such as separation of content from presentation, graceful degradation, non-dependence on Flash etc. For some while I've...
3
by: Kiyomi | last post by:
Hello, I create a Table1 dynamically at run time, and at the same time, I would like to create LinkButton controls, also dynamically, and insert them into each line in my Table1. I would...
5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
3
by: sck10 | last post by:
Hello, When a person subits my web page, I do a simple check (validation) and if there are any errors, I create a variable (strValidateText) and set that value to a label on the form. What I...
4
by: Mark | last post by:
I was able to get procedure to work in a VB.Net Windows application, and want to get it to work within a ASP.Net page. It won't create the instance of Excel. It blows up on the CreateObject...
2
by: slitvinov | last post by:
Hi, I think I cannot make I good design decision in the following situation I have a class Particle. And a derived class PolymerParticle Now I would like to create an object to represent the...
7
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function Body_Onload() ' create the object Set obj = Server.CreateObject("UploadImage.cTest") ' use method of the object...
16
by: flip2flik | last post by:
Hi. I am using visual web developer express edition and I am using vb.net as the programming language. I want to create a new aspx file on a button click. I will have a template that the new...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.