Solved

JavaScript Access Database

Posted on 2002-04-26
9
155 Views
Last Modified: 2008-03-17
can someone send me code to connect to an access database. I Prefer a solution that will work on IE and Netscape.

a Quick resolve will result in higher point than posted.

Thanks.
0
Comment
Question by:MICS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6972277
There's no such thing as being able to connect to a database in netscape.

I suggest a serverside architecture. Is that in place? (e.g. database and scripting on the server).

CJ
0
 
LVL 3

Expert Comment

by:tejaspurani
ID: 6972315
This works only In IE for netscape u need to download plugin for activexcontrol.

still the ode will popup a message u need to click yes.
T.P.
//code-------------------------    
     var strConnString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=y:\\wwwroot\\db\\SiteIndex.mdb;";
          var objConn = new ActiveXObject("ADODB.Connection");
          var objRs = new ActiveXObject("ADODB.Recordset");
          objConn.open (strConnString);
          var sql = "Select id,menu from menu"
          objConn.execute(sql);
          objRs.Open (sql,objConn)//  = objConn.Execute(sql);
          alert (objRs(1));    
         
          var objRs = null;
          var objConn = null;
0
 
LVL 4

Accepted Solution

by:
Bit_Twiddler earned 50 total points
ID: 6972511
Take a look at GenericDB:

http://www.genericdb.com/genericdb/homepage.asp#download

You will need to put the ASP (active server pages) files on an ASP capable server such as MS IIS, PWS or Apache (with the appropriate add ons.)

It will interface a database in both IE and Netscape. It can be configured to view, edit, query a database.

A nice little tool if your not inclined to spend a lot of time custom coding an ASP application.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:tejaspurani
ID: 7002147
please reply,

T.P.
0
 

Author Comment

by:MICS
ID: 7002152
busy at moment, will get back ina few days
0
 

Author Comment

by:MICS
ID: 7009418
I have decided to take the ASP route...

thanks guys.
0
 
LVL 3

Expert Comment

by:tejaspurani
ID: 7012721
SO y yyyyyyyyyyyyyyy u asked question in Javascript.

IN U R QUESTION U DIDN'T SPECIFY WHAT SCRIPT LANGUAGE U
R GOING TO USE. SO IT'S BY DEFAULT JAVASCRIPT.

T.P.
0
 

Author Comment

by:MICS
ID: 7023852
ya I wanted it in Java script. but i dont want to add any client activeX controls that have to be downloaded for the page to work.  
0
 

Expert Comment

by:Pardaig777
ID: 7389399
tejaspurani, thanks a lot for the JavaScript example to access a database, a lot of folks said "You got to install Livewire to connect to a database with JavaScript", etc. It is cool that it can connect directly through the ADO. Anyways, the thing is, with the application I am working on, there is only dbf stuff, with no mdb. I am confused as to how to connect to a table (dbf) without going through a database (mdb)... ? I got no mdb and I would like to use SQL to query the dbf files, not treating it like a text file or something, can I do that ?
Thanks a lot !
Pardaig
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question