下面的写法是有什么不对的呢,提取不出来 望高手指点一二$file = FileOpen("id.txt", 0)
$f=FileRead($file)
; 检查文件是否正常打开
If $file = -1 Then
MsgBox(0, "错误", "无法打开目标文件。")
Exit
EndIf
$sqlCon = ObjCreate("ADODB.Connection")
$sqlCon.Open("Provider=SQLOLEDB;Data Source=.;User ID=sa;Password=new ;Database=newidcy")
$sqlCon.Execute ("insert into idcy_sn (data1,data2) values ('$f','$f')")
MsgBox(0,"二进制文件",$f)
;$sqlCon.Close;
FileClose($file)
$rf=$sqlCon.Execute ("Select data2 from idcy_sn where id=2")
$ref=FileOpen($rf, 0)
$readf=FileRead($ref)
MsgBox(0,"二进制文件",$readf)
$sqlCon.Close;
|