标题: 连ODBC [打印本页] 作者: sky2008 时间: 2006-12-18 14:40 标题: 连ODBC 我想在记事本下输入P 但回访时提示
odbc.rec(28) Error: Type mismatch
odbc.rec(28) Error: Type mismatch, parameter 1 in subprogram 'InputKeys'
脚本如下:
Sub main
Dim p as integer
Dim k,i as integer
Dim connection As Long
Dim destination(1 To 50, 1 To 125) As Variant
Dim retcode As long
Dim query as String
Dim outputStr as String
connection = SQLOpen("DSN=sy",outputStr)
query = "select busi_code from user"
retcode = SQLExecQuery(connection,query)
retcode = SQLRetrieve(connection:=connection,destination:=destination)
k=int(destination(1,1))
' Get the next 50 rows of from the result set
query = "select busi_code from user"
retcode = SQLExecQuery(connection,query)
retcode = SQLRetrieve(connection:=connection,destination:=destination)
randomize timer()
for i=1 to 5
p=int(rnd*k)
p=int(destination(1,p))