|
2#
楼主 |
发表于 2008-8-26 13:45:48
|
只看该作者
简单的代码如下:
declare function fun1(a as string,b as integer)
Sub Main
'定义数据对象
dim conn as object,record as object
dim con,sql as string
dim a,b as string
set conn=createobject("adodb.connection")
con="... ...连接参数"
conn.open strcon
set record=createobject("adodb.recordset")
sql="sql语句"
record.open sql,conn
do while not record.eof
a=record("字段1") '说明:字段1在SQL Server2000数据库建表时定义的是varchar(50)型
b=record("字段2") '说明:字段2在SQL Server2000数据库建表时定义的是decimal(9)型
... ...
loop
call fun1(a,b) 执行到红色这行脚本停止,弹出了 Overflow
End Sub
function fun1(a as string,b as integer)
... ...
... ...
end function
[ 本帖最后由 bb64844866 于 2008-8-26 13:49 编辑 ] |
|