回复 60# chzj589
Func SQLiteInsert($nIDS, $nName, $nAge, $nAge1, $nAge2, $nAge3, $nAge4, $nAge5,$nAge6)
_SQLite_Open($SQLite_Data_Path)
;Read out the first row of the result from the specified query.
_SQLite_QuerySingleRow(-1, "SELECT IDs FROM " & $TableName & " WHERE IDs = '" & $nIDS& "';", $aRow)
$Temp = $aRow[0]
If $Temp = "" Then
_SQLite_Exec(-1, "Insert into " & $TableName & " (IDs,Name,Age,Age1,Age2,Age3,Age4,Age5,Age6) values ('"&$nIDS&"','"&$nName&"','"&$nAge&"','"&$nAge1&"','"&$nAge2&"','"&$nAge3&"','"&$nAge4&"','"&$nAge5&"','"&$nAge6&"');")
Else
MsgBox(4096, "提示:", "編號已已經存在 無法新增")
EndIf
_SQLite_Close()
EndFunc ;==>SQLiteInsert
|