p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: RDS data control problem


Message #1 by "Santosh" <s_k_panda@h...> on Fri, 21 Sep 2001 14:08:26
Hi,
  I wrote some code to test the RDS data control system but I am not 
getting any result instead only blank page.

The code sample is AS FOLLOWS:

<%
' for connection

  Dim strConn
  strConn = "Provider=SQLOLEDB; Data Source=" & _
	           Request.ServerVariables("SERVER_NAME") & _
		       "; Initial Catalog=pubs; User ID=sa; Password="
%>
'"FOR OPENING RECORD SET"
<%@ Language=VBScript %>
<!-- #include file="conn.asp" -->
<%
Dim ObjConn
Dim rsData

Set rsData=Server.CreateObject("ADODB.Recordset")

rsData.Open "select * from authors",strConn
rsData.Save Response,adPersistXML
'Response.Write rsData.RecordCount
rsData.Close
set rsData=Nothing 
%>


' HTML PAGE TO SHOW
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>

<BODY>

<object CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" 
ID="dsoAuthors" width="0" height="0">
<PARAM NAME="URL" VALUE="DataPAge.asp">
</object>

<DIV id="au_id" datasrc="#dsoAuthors"></div>
<DIV id="au_lname" datasrc="#dsoAuthors"></div>

</BODY>
</HTML>

Please help me.
Thanks in advance

-Santosh

  Return to Index