软件工程

本类阅读TOP10

·PHP4 + MYSQL + APACHE 在 WIN 系统下的安装、配置
·Linux 入门常用命令(1)
·Linux 入门常用命令(2)
·使用 DCPROMO/FORCEREMOVAL 命令强制将 Active Directory 域控制器降级
·DirectShow学习(八): CBaseRender类及相应Pin类的源代码分析
·基于ICE方式SIP信令穿透Symmetric NAT技术研究
·Windows 2003网络负载均衡的实现
·一网打尽Win十四种系统故障解决方法
·数百种 Windows 软件的免费替代品列表
·收藏---行百里半九十

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
研究rds的困惑

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

rds这个东西我是在一篇关于在asp中生成报表的文章中见到的,但是我始终也没有明白它是干什么的,因为我做了无数次的测试,查了无数的资料,还是不能完成一个最简单的测试程序。

下面的程序(从别人哪里抄来改的)只要一执行Set rs = df.Query(strCn, strSQL)
就说服务器错误,真的让我困惑,决定今后不再研究它了。

《DIV align=left〉
《INPUT language=vbscript style="WIDTH: 90px; HEIGHT: 32px" onclick=fun_query() type=button value="Query Data" name=query〉
《INPUT language=vbscript style="WIDTH: 90px; HEIGHT: 32px" onclick=fun_clear() type=button value="Clear Data" name=Clear〉
《INPUT language=vbscript style="WIDTH: 90px; HEIGHT: 32px" onclick=fun_excel() type=button value="Excel Report" name=report〉
《DIV〉 《DIV id=adddata〉《/DIV〉《/FORM〉
《SCRIPT language=vbscript〉
set conn=createobject("adodb.connection")
set rr=createobject("adodb.recordset")
conn.Open "dsn=sqls;uid=sa;pwd=myself"
rr.Open "select * from jobs",conn,3,1
msgbox rr.Fields(0)
dim rds,rs,df
dim strSQL,StrRs,strCn,RowCnt
dim xlApp, xlBook, xlSheet1,xlmodule,XlPageSetup
dim HeadRowCnt,TitleRowCnt,ContentRowCnt,FootRowCnt
dim PageRowCnt,PageNo,TotalPageCnt,ContentRowNowCnt
dim ColumnAllWidth,ColumnAWidth,ColumnBWidth,ColumnCWidth,ColumnDWidth sub fun_query()
set rds = CreateObject("RDS.DataSpace")?
Set df = rds.CreateObject("RDSServer.DataFactory","http://192.168.22.205") strCn="dsn=sqls;uid=sa;pwd=myself"
strSQL = "Select * from jobs"
Set rs = df.Query(strCn, strSQL)
‘set rs=rr
if not rs.eof then
StrRs="《TABLE border=1〉《TBODY〉《TR〉《TD〉job_id《 TD〉job_desc《/TD〉《TD〉max_lvl《TD〉min_lvl《TR〉《TD〉"+rs.GetString(,,"《TD〉","《TR〉《TD〉"," ") +""
adddata. innerHTML=StrRs
StrRs=""
else
msgbox "No data in the table!"
end if
set df=nothing
end sub
《/SCRIPT〉




相关文章

相关软件