added LSL2 stored procedures

This commit is contained in:
Infineon\StieberD
2024-03-25 14:46:21 -07:00
parent 09f1a66046
commit c667dd56eb
1655 changed files with 527967 additions and 0 deletions

View File

@ -0,0 +1,37 @@
Compile function SQL_Delete(Connection, TableName, Keys)
/*****************************************************************************\
Deletes a record from an SQL table.
History
-------
09/15/2010 KRF Original Programmer
\*****************************************************************************/
$insert Microsoft_Ado_Equates
If Assigned(Connection) else Connection = 0
If Assigned(TableName) else TableName = ""
If Assigned(Keys) else Keys = ""
Declare subroutine SRP_Com
Declare function SRP_Com
Ans = ""
// Create the where clause expression from the array of keys
KeyExpression = Keys
Swap @VM with " = " in KeyExpression
Swap @FM with " AND " in KeyExpression
// Script to delete the record
Script = "Delete from ":TableName:" where ":KeyExpression
// Run the script
RecordSetResult = SRP_Com(Connection, "CALL", "Execute", Script)
If RecordSetResult NE 0 then
SRP_Com(RecordSetResult, "RELEASE")
end else
Ans = "Error deleting from ":TableName:" where ":KeyExpression:@TM:@TM:SRP_Com(Connection, "ERROR")
end
Return Ans