Solved

JavaScript Access Database

Posted on 2002-04-26
9
146 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
 
LVL 3

Expert Comment

by:tejaspurani
ID: 7002147
please reply,

T.P.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now