Set sqlObj= createobject ("ADODB.connection")
readfile=a.ReadAll '读取文件内容
filetext.Close
Set fs=nothing
strConn="Driver={microsoft odbc for oracle}; server=**** ;uid=**;pwd=**" '此处引用oracle数据源
Set amd=createobject("adodb.command")
amd.ActiveConnection=strConn '获取command对象使用的connection对象的引用
amd.CommandText =readfile
amd.CommandType=1 'commandtype 是1为sql查询 4为存储过程
Set result=amd.Execute()
If result.State=1 Then '如果执行完毕msgbox ok
msgbox "ok"
set sqlObj=nothing