?
Solved

JavaScript Access Database

Posted on 2002-04-26
9
Medium Priority
?
160 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 200 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…

719 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