Solved

JavaScript Access Database

Posted on 2002-04-26
9
152 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
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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

821 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