| | |
how to connect ms access database to html webpage
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2009
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
plz if u get solution plz forward me too becoz i m also have same prob
now it will work
The given example program for retrieving the data from database
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<html> <head> <title>Entitled Document</title> <script language="JavaScript" > function getSubmit() { var Firstn = names.value ; var cn = new ActiveXObject("ADODB.Connection"); var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:/clientDB.mdb"; var rs = new ActiveXObject("ADODB.Recordset"); var SQL = "select Surname, DOB from Customers where FirstName = '" + Firstn + "'"; cn.Open(strConn); rs.Open(SQL, cn); surname.value = rs(1); DOB.value = rs(2); rs.Close(); cn.Close(); } </script> </head> <body> <input type="text" name="names" /> <input type="text" name="surname" /> <input type="text" name="DOB" /> <input type="button" value="submit" onclick="getSubmit()"> </body> </html>
Last edited by nav33n; 34 Days Ago at 1:41 am. Reason: For easy readability, wrap your code in [code] tags.
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
0
#15 27 Days Ago
Thanks for the help.
But I had a query, where the database connection specified here, is FOR A sql SERVER .
Now , do I have to configure my Access Database in someway?
Here is my HTML Code:
The idea is to select teh state and day
I have a ACCESS DB, which has all the details of a partuclar state and its working hours.
Need help in connecting both of them.
Thank You
But I had a query, where the database connection specified here, is FOR A sql SERVER .
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:/clientDB.mdb"; var rs = new ActiveXObject("ADODB.Recordset");
Now , do I have to configure my Access Database in someway?
Here is my HTML Code:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<head> Select STATE: <SELECT NAME="entry4"> <OPTION VALUE="no1">STATE </SELECT> <form> MONDAY <input type="checkbox" /> <br /> TUESDAY <input type="checkbox"/> <br /> WEDNESDAY <input type="checkbox"/> <br /> THURSDAY <input type="checkbox"/> <br /> FRIDAY <input type="checkbox"/> <br /> SATURDAY <input type="checkbox"/> <br /> SUNDAY <input type="checkbox"/> </form> To submit the query, press: <INPUT TYPE="submit" VALUE="Submit Query">. <P> </head> <html> <head> <h1>Accessing Data through HTML and Access</h1> </head> <body> Looking at Excel Web Components to create a DAP </body> </hmtl>
The idea is to select teh state and day
I have a ACCESS DB, which has all the details of a partuclar state and its working hours.
Need help in connecting both of them.
Thank You
Last edited by Ezzaral; 25 Days Ago at 1:17 pm. Reason: Added code tags. Please use them to format any code that you post.
![]() |
Similar Threads
- VB: Connect to Access database via ODBC datasource name (Visual Basic 4 / 5 / 6)
- Writing to an Access Database (Visual Basic 4 / 5 / 6)
- how to connect access with vb.net (VB.NET)
- access database search and display (Visual Basic 4 / 5 / 6)
- Accessing an Access Database using Java (Java)
- Create an Access Database using Java (Java)
- connect with access (Visual Basic 4 / 5 / 6)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Forms in JavaScript Game
- Next Thread: any one please help
Views: 43624 | Replies: 15
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets array autoplay blackjack browser captcha captchaformproblem cart child class close codes date debugger dependent developer disablefirebug dom editor element embed engine enter events explorer ext file firefox flash form forms frameworks game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe java javascript javascripthelp2020 jquery jsf jsp jump libcurl maps margin marquee masterpage math media menu object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player position post programming prototype rated redirect safari scale scriptlets scroll search security size software solutions sources star stars stretch synchronous toggle tweet unicode variables web webkit webservice window \n





