2009-10-29 17:38$dbname=""
$tblname="测试表"
$fldname="测试字段"
$format="int"
$sData="123456"
$T="*"
_CreateDB($dbname)
_CreateTBL($dbname, $tblname)
_CreateFLD($dbname, $tblname, $fldname, $format)
;_InsertData($dbname, $tblname, $fldname, $sData)
;_DeleteData($dbname, $tblname, $fldname, $sData)
_SelectData($dbname, $tblname, $fldname, $T)
Func _CreateDB($dbname)
$newMdb = ObjCreate("")
$("Provider=; Data Source=" & $dbname)
$
EndFunc
Func _CreateTBL($dbname, $tblname)
$addtbl = ObjCreate("")
$("Provider=; Data Source=" & $dbname)
$("CREATE TABLE " & $tblname)
$
EndFunc
Func _CreateFLD($dbname, $tblname, $fldname, $format)
$addfld = ObjCreate("")
$("Provider=; Data Source=" & $dbname)
$("ALTER TABLE " & $tblname & " ADD " & $fldname & " " & $format)
$
EndFunc
Func _InsertData($dbname, $tblname, $fldname, $sData)
$addfld = ObjCreate("")
$("Provider=; Data Source=" & $dbname)
$("Insert Into " & $tblname & " (" & $fldname & ") " & "VALUES ("&$sData&")")
$
EndFunc
Func _DeleteData($dbname, $tblname, $fldname, $sData)
$addfld = ObjCreate("ADODB
autoit 数据库操作实例 来自淘豆网m.daumloan.com转载请标明出处.