Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 26th, 2005, 02:16 AM
Registered User
 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with DHTML and RDS

Hi,

  I am currently developing a hta application to read data from an internal MS SQL server (not running IIS) with the data binding and RDS object.

  I have tried to create a dsn file at my local machine and also the server. However, I failed to get it work, the hta application disply
nothing.

  Could anyone tell me how can I make it work? Or RDS could only work on web server only? My HTML code is something look like the following. Thanks you.

Kurt.W

<HTML>
.
.
.
<OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
    ID=dsoComposer HEIGHT=0 WIDTH=0>
    <PARAM NAME="Server" VALUE="myDBServer">
    <PARAM NAME="Connect" VALUE="dsn=read;uid=read;pwd=">
    <PARAM NAME="SQL" VALUE="select col1 from table1">
</OBJECT>
.
.
.
<SPAN DATASRC=#dsoComposer DATAFLD=col1></SPAN>
.
.
.
</HTML>
 
Old September 28th, 2005, 09:41 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I used to use RDS quite a bit on a company intranet, it's a bit passé now but can be made to work.
One aspect that has tightened up in the last few years is security, now servers won't accept RDS connections unless specifically configured to. See this link to make sure your server is set up correctly.

http://msdn.microsoft.com/library/de...asp?frame=true

One way to test is to use scripting and try the folloing in your browser to see whether it's your DSN that's a problem:
Code:
<OBJECT ID="RDS1" WIDTH=1 HEIGHT=1
CLASSID="CLSID:BD96C556-65A3-11D0-983A-00C04FC29E36">
</OBJECT>
<script>
  function testRDS()
  {
    var oDF = document.getElementById("RDS1").CreateObject("RDSServer.DataFactory", <server name here>);
    var sConn = "Provider='sqloledb';Initial Catalog='<database name here>'; User ID='read'; Password="    
    var sSql = "<some select statement here>";
    var oRS = oDF.Query(sConn, sSql);
    alert(oRS.Fields(0).value);
    oRS.Close();  
  }
</script>
Make sure that errors are notified in you page by checking the box in Tools|Internet options|Advanced.
I would have thought that the DSN would need to be on the server, a system one not a user one.

--

Joe (Microsoft MVP - XML)
 
Old September 28th, 2005, 08:26 PM
Registered User
 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by joefawcett
 I used to use RDS quite a bit on a company intranet, it's a bit pass?now but can be made to work.
One aspect that has tightened up in the last few years is security, now servers won't accept RDS connections unless specifically configured to. See this link to make sure your server is set up correctly.

http://msdn.microsoft.com/library/de...asp?frame=true

One way to test is to use scripting and try the folloing in your browser to see whether it's your DSN that's a problem:
...
Make sure that errors are notified in you page by checking the box in Tools|Internet options|Advanced.
I would have thought that the DSN would need to be on the server, a system one not a user one.

--

Joe (Microsoft MVP - XML)
Yes, it is a bit pass.

Actually, i want to develope an hta application to get / update data
in an access DB and also read data from an internal MS SQL Server without setting a webserver.

Could you suggest a better alternative other than RDS? XML? :)

Abd thanks you for your reply. I have tried your code and an error like "cannot create business object" raised. Is there any additional setting have to be made for the DB server?

Thanks you.

Kurt.W
 
Old September 29th, 2005, 08:19 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Read the link about security, you will have to modify the settings on the host machine.

It's a pity that the machine is not a web server because nowadays you would use a web service for this sort of thing.

Why not just connect directly to SQL via ADO? The processing will be done on the server anyway so you're not gaining much by using RDS which is more suitable for something like an Access database.

--

Joe
 
Old September 29th, 2005, 08:11 PM
Registered User
 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by joefawcett
 Read the link about security, you will have to modify the settings on the host machine.

It's a pity that the machine is not a web server because nowadays you would use a web service for this sort of thing.
I seek. Thanks you.

Quote:
quote:Originally posted by joefawcett
Why not just connect directly to SQL via ADO? The processing will be done on the server anyway so you're not gaining much by using RDS which is more suitable for something like an Access database.
It is beacause I want to try out the Data Binding of DHTML.
However, RDS seem to be the only way to access SQL DB and access DB
if I want to use Data Binding.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help understanding the status of RDS calgarychinese Classic ASP Databases 0 July 28th, 2008 06:51 PM
Access Database from Javascript with rds nosreg Access 2 February 3rd, 2005 07:19 PM
RDS problem with the code BANSAL SK VBScript 1 November 4th, 2004 06:51 AM
Facing problems using RDS in VB - Urgent Sri VB Components 0 November 4th, 2004 06:27 AM





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