943,970 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Nov 9th, 2009
0
Re: how to connect ms access database to html webpage
plz if u get solution plz forward me too becoz i m also have same prob
Reputation Points: 10
Solved Threads: 0
Newbie Poster
navinsharma is offline Offline
2 posts
since Nov 2009
Nov 9th, 2009
0
Re: how to connect ms access database to html webpage
plz if u get solution plz forward me too becoz i m also have same prob
at <snip>
Last edited by nav33n; Nov 21st, 2009 at 1:40 am. Reason: email snipped
Reputation Points: 10
Solved Threads: 0
Newbie Poster
navinsharma is offline Offline
2 posts
since Nov 2009
Nov 9th, 2009
0
Re: how to connect ms access database to html webpage
If you are targeting Explorer only
you can always use a super lightwieght DSO to access data
go to MSDN and search for "Data Source Object" you'll find all that you need.
Reputation Points: 120
Solved Threads: 61
Posting Pro
Troy III is offline Offline
511 posts
since Jun 2008
Nov 20th, 2009
0

Getting data from msaccess using HTML+ java Script

plz if u get solution plz forward me too becoz i m also have same prob
hi...
now it will work
The given example program for retrieving the data from database
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title>Entitled Document</title>
  4. <script language="JavaScript" >
  5.  
  6. function getSubmit()
  7. {
  8.  
  9. var Firstn = names.value ;
  10.  
  11. var cn = new ActiveXObject("ADODB.Connection");
  12.  
  13. var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:/clientDB.mdb";
  14. var rs = new ActiveXObject("ADODB.Recordset");
  15.  
  16.  
  17. var SQL = "select Surname, DOB from Customers where FirstName = '" + Firstn + "'";
  18.  
  19. cn.Open(strConn);
  20. rs.Open(SQL, cn);
  21. surname.value = rs(1);
  22. DOB.value = rs(2);
  23.  
  24. rs.Close();
  25. cn.Close();
  26.  
  27.  
  28. }
  29.  
  30. </script>
  31. </head>
  32. <body>
  33.  
  34. <input type="text" name="names" />
  35. <input type="text" name="surname" />
  36. <input type="text" name="DOB" />
  37. <input type="button" value="submit" onclick="getSubmit()">
  38.  
  39. </body>
  40. </html>
Last edited by nav33n; Nov 21st, 2009 at 1:41 am. Reason: For easy readability, wrap your code in [code] tags.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sanjeev.vermas is offline Offline
1 posts
since Nov 2009
Nov 28th, 2009
0
Re: how to connect ms access database to html webpage
Click to Expand / Collapse  Quote originally posted by lelah ...
Just use the "Save as web page" option in the File menu.
Thanks for the help.

But I had a query, where the database connection specified here, is FOR A sql SERVER .
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:/clientDB.mdb";
  2. 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)
  1. <head>
  2. Select STATE: <SELECT NAME="entry4">
  3. <OPTION VALUE="no1">STATE
  4. </SELECT>
  5. <form>
  6. MONDAY
  7. <input type="checkbox" />
  8. <br />
  9. TUESDAY
  10. <input type="checkbox"/>
  11. <br />
  12. WEDNESDAY
  13. <input type="checkbox"/>
  14. <br />
  15. THURSDAY
  16. <input type="checkbox"/>
  17. <br />
  18. FRIDAY
  19. <input type="checkbox"/>
  20. <br />
  21. SATURDAY
  22. <input type="checkbox"/>
  23. <br />
  24. SUNDAY
  25. <input type="checkbox"/>
  26. </form>
  27. To submit the query, press:
  28. <INPUT TYPE="submit" VALUE="Submit Query">. <P>
  29. </head>
  30. <html>
  31. <head>
  32. <h1>Accessing Data through HTML and Access</h1>
  33. </head>
  34. <body>
  35. Looking at Excel Web Components to create a DAP
  36. </body>
  37. </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; Nov 30th, 2009 at 1:17 pm. Reason: Added code tags. Please use them to format any code that you post.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
goaway is offline Offline
2 posts
since Oct 2009
Apr 5th, 2010
0
Re: how to connect ms access database to html webpage
i read above and do try it but some error
Line no. :20
char:1
Error: No value give for one or more required parameters.
code: 0
URL: file://c:\documents \...\...\...\.html
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hitmale11 is offline Offline
1 posts
since Apr 2010
May 13th, 2010
0

Doing it in JAVAScript Baby...

Hi Guys,

Here is the same code in javascript and it works 100%. I'm so proud...

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <html>
  2. <head>
  3. <title>Entitled Document</title>
  4. <script language="JavaScript">
  5. function getSubmit()
  6. {
  7. var LastName;
  8. var Firstn = names.value ;
  9.  
  10.  
  11. var cn = new ActiveXObject("ADODB.Connection");
  12. var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = ClientDB.mdb;Persist Security Info=False";
  13. cn.Open(strConn);
  14. var rs = new ActiveXObject("ADODB.Recordset");
  15. var SQL = "select Surname, DOB from Customers where FirstName = '" + Firstn + "'";
  16.  
  17. rs.Open(SQL, cn);
  18. surname.value = rs(0);
  19. DOB.value = rs(1);
  20. rs.Close();
  21. cn.Close();
  22. }
  23. </script>
  24. </head>
  25. <body>
  26.  
  27. name<input type="text" name="names" />
  28. Surname<input type="text" name="surname" />
  29. DOB<input type="text" name="DOB" />
  30. <input type="button" value="submit" onclick="getSubmit()">
  31.  
  32. </body>
  33.  
  34. </html>
Last edited by Ezzaral; May 13th, 2010 at 2:34 pm. Reason: Added code tags. Please use them to format any code that you post.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
HenniePj is offline Offline
1 posts
since May 2010
Jun 4th, 2010
-1
Re: how to connect ms access database to html webpage
I am developing a website in html in which the contact us page i have to connect to MS-Excel database i am not able to get it ,can any one tell me how to get that one.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
alphatechnology is offline Offline
1 posts
since Jun 2010
Jun 4th, 2010
-1
Re: how to connect ms access database to html webpage
Hi,
I want to connect my html pages with access databese.
Can any of one help me?
Sonu Rohilla
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Sonu Rohilla is offline Offline
1 posts
since Jun 2010
Jun 6th, 2010
0
Re: how to connect ms access database to html webpage
Please help me with code I will use to connect my xhtml web page with my access database.
You can replay by posting on this page or send me message through this e-mail [snipped]



Thank You
Last edited by Ezzaral; Jun 11th, 2010 at 1:06 pm. Reason: Snipped email. Please keep it on site.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
namadi is offline Offline
1 posts
since Jun 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Avoid Dropdown refresh
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: I want to connect Thunderbird to local database





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC