Solved

JavaScript Access Database

Posted on 2002-04-26
9
151 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
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…

785 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