Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 23rd, 2004, 09:21 AM
Registered User
Join Date: Mar 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access Database from Javascript with rds

Hi I want to access an MS Access from javascript but it doesn't work. The resulting recordset includes no records.
<object id="rdsdc" classid="clsid:bd96c556-65a3-11d0-983a-00c04fc29e33">
<PARAM NAME="SERVER" VALUE="http://localhost">
<param name="Connect" value="Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=D:\Webserver\wwwroot\adb1.mdb;">
<param name="sql" value="select * from Artikel">
Thanks for ur help

---Gerson Kramer
Reply With Quote
  #2 (permalink)  
Old March 24th, 2004, 08:43 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

It can be very difficult to get this technology to work because of security and the error messages are hopeless.
I normally create the objects rather than use an embedded control, here's my test page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>RDS Test</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

function getRsByRds(ServerName, ConnString, Sql)
  var sServer = "http://" + ServerName; 
  var oDS = new ActiveXObject("RDS.DataSpace");
  var oDF = oDS.CreateObject("RDSServer.DataFactory", sServer);
  oRs = oDF.Query(ConnString, Sql);
  return oRs;

function showDetails(Server, DbPath, Sql)
  var sConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + DbPath;
  var sSql = Sql;
  var oRs = getRsByRds(Server, sConnString, sSql);
  if (oRs.BOF && oRs.EOF)
    showResult("No records found");    
function showResult(Text)
  document.getElementById("txtResults").value = Text;

Server:<input type="text" id="txtServer" size="75"><br>
DB path:<input type="text" id="txtDbPath" size="75"><br>
SQL:<input type="text" size="80" id="txtSql"><br>
<input type="button" value="Show Details" onclick="showDetails(txtServer.value, txtDbPath.value, txtSql.value);"><br>
<textarea id="txtResults" cols="80" rows="40"></textarea>

Reply With Quote
  #3 (permalink)  
Old February 3rd, 2005, 07:19 PM
Registered User
Join Date: Feb 2005
Location: Rio de Janeiro, Rio de Janeiro, Brazil.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to uideas

Hi, I´m trying to access a microsoft access database with a javascript routine, the same way as you mantioned in the example above, but nothing is working here. I have someexperience with ASP, but very few with Javascript, i´ve tried to use your code but it freezes my browser. Please help me to find the "yellow brick road" :-)

Luiz Eduardo
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Access Database Query panuvin Javascript How-To 28 May 9th, 2008 01:53 PM
access sql database using javascript vivek_inos Javascript How-To 2 October 12th, 2006 01:29 PM
Problem accessing Access Database using JavaScript kumar_siva Javascript 0 February 7th, 2006 07:09 AM
RDS Single Record and Table Binding with Access qwerty Classic ASP Databases 0 July 15th, 2003 02:20 PM

All times are GMT -4. The time now is 05:04 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.