Code: Select all
global gConnectionID
if gConnectionID is not a number then
answer error "Please connect to the database first."
exit to top
end if
put "INSERT INTO " & tTableName & " (" & tFields & ") VALUES ( :1, :2, :3, :4 )" into tSQL
-- send the SQL to the database, filling in the placeholders with data from variables
revExecuteSQL gConnectionID, tSQL, "tFirstName", "tDate", "tTime", "tTimeofDay"
-- check the result and display the data or an error message
if the result is a number then
go to card "SymLog1"
else
answer error "There was a problem adding the record to the database:" & cr & the result
end if
end mouseUp