惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
J
Java Code Geeks
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
U
Unit 42
B
Blog
宝玉的分享
宝玉的分享
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
博客园 - Franky
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
博客园 - 叶小钗

博客园 - 飞儿

要让IT收入比重越来越小 准备买房了? 想写一篇小说 如何做好测试建议清单 看新闻的时间用的太多了 robot经验整理及验证点的说明 robot取excel表格参数脚本 猪肉未来还是会涨的 回归IT 2008,又是新的一年 TD各版本的汉化插件下载 QTP基础代码(转) QTP参考代码框架 自动码流转换(ROBOT) 大小写转换(ROBOT) 行走在消逝中 写的痛快 常用ROBOT函数详解 沉下来,沉下来,别让自己太浮躁
数据库连接(ROBOT)
飞儿 · 2007-06-28 · via 博客园 - 飞儿

'在access数据库,建表test_table,并创建两字段(name,id),两字段均为数字型


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
dim i,j as integer
dim sumstring as string

'打开数据库
' Open the datasource "SblTest"
'connection = SQLOpen("DSN=testpool; UID=root; PWD=111111")

'action1 = 1 ' Get the names of the ODBC datasources
'retcode = SQLGetSchema(connection:=connection,action:=1, qualifier:=qualifier, ref:=datasources())

'msgbox retcode
' Close the datasource connection
'查询数据库
query = "select * from test_table"
retcode = SQLRequest("DSN=testpool;UID=root; PWD=111111",query,outputStr,prompt,0,destination())
msgbox retcode

for i=1  to 2

for j=1 to retcode

sumstring=cstr(destination(i,j))
msgbox sumstring
'msgbox destination(i,j)

next j
next i

retcode = SQLClose(connection)
End Sub


'query = "select * from class"
'retcode = SQLRequest("DSN=SBLTESTW;UID=DBA;PWD=SQL",query,outputStr,prompt,0,destination())
'End Sub


' The following will open the datasource SBLTESTW and execute the query
' specified by query and return the results in destination
'