| The SqlHandle class / Examples | |
MAIN
DEFINE h base.SqlHandle
CONNECT TO "mydb"
LET h = base.SqlHandle.create()
CALL h.prepare("UPDATE t1 SET name = ? WHERE pk = ?")
CALL h.setParameter(1, "Scott")
CALL h.setParameter(2, "8723")
TRY
CALL h.execute()
CATCH
DISPLAY "Error detected: ", SQLCA.SQLCODE
END TRY
END MAIN