51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 3394|回复: 7
打印 上一主题 下一主题

[Robot] 如何连接SQLServer数据库

[复制链接]

该用户从未签到

1#
发表于 2005-1-31 10:54:27 | 显示全部楼层
Sub main
'  Declarations
'
   Dim destination(1 To 50, 1 To 125)  As Variant
   Dim prompt As integer
   Dim retcode as Variant
   Dim query as String
   Dim outputStr as String
  
'  The following will open the datasource SBLTESTW and execute the query
'  specified by query and return the results in destination
'   
   query = "select * from class"     
   retcode = SQLRequest("DSN=SBLTESTW;UID=DBA;PWD=SQL",query,outputStr,prompt,0,destination())
End Sub
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-5-13 05:51 , Processed in 0.061595 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表