Dim xname,address,unitTel
xname=DataTable("p_Text", dtGlobalSheet) '从datatable中取值
address=DataTable("p_Text1", dtGlobalSheet)
unitTel=DataTable("p_Text2", dtGlobalSheet)
Dim res,cmd,sql
Set res=createobject("adodb.recordset")
Set cmd=createobject("adodb.command")
Cmd.activec./images/smilies/default/titter.gif" border=0 smilieid="9">WD=ZJLH;DBQ=HKORACLE;DBA=W;APA=T;EXC=F;XSM=Default;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;BTD=F;BAM=IfAllSuccessful;NUM=NLS;DPM=F;MTS=T;MDI=Me;CSR=F;FWC=F;FBS=60000;TLO=O;"
Cmd.CommandType = 1
'sql="select addressid from address_list t where name ='"&xname&"'"
'sql="select addressid from address_list t where name ='"&xname&"'
sql="select addressid from address_list t where name ='"&xname&"' and address='"&address&"' and unitTel='"&unitTel&"'"
Cmd.CommandText = sql
Set res = Cmd.Execute()
MsgBox res(0) '打印res(0)
DataTable("addressid", dtGlobalSheet)=Cstr(res(0)) '输出值到datatable中
Browser("测试登录").Page("办公自动化系统").Frame("mainFrame").WebCheckBox("value:="&res(0)).Set "ON"
Set res = nothing
Set cmd.ActiveConnection = nothing
Set Cmd= nothing