Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagelua
-- Prepare the SQL call 
local sqlCall = "CALL GetPatientByLastName(" .. conn:quote(lastName) .. ")"

-- Execute the stored procedure
local result = conn:queryexecute{sql=sqlCall, live=true}
Info

The SQL statement syntax will vary depending on the database you are working with. For example, MySQL would use CALL where as Microsoft SQL Server would use EXEC to execute a stored procedure. It’s important to know the proper syntax for the database you are working with!