JDBC_PREPARE
|
Syntax: |
JDBC_PREPARE(<File Number>,<Command>)
|
||||
|
|
|
||||
|
Meaning: |
Prepares the command <Command> for
modifications with JDBC_SETPARAM. Only a <command> that has been prepared
by JDBC_PREPARE can be modified with JDBC_SETPARAM. The prepared <command> can only be
executed by the function JDBC_EXEC_PREPARED. JDBC_PREPARE
returns the result –1 if an error occurred, otherwise 0. If an error occurs, the variable OK contains the error number and the function JDBC_GET_LAST_ERROR$ returns
the error text. |
||||
|
Parameter: |
|
||||
|
Sample: |
H% = JDBC_PREPARE(2,"select * from customers
where Name = ?") IF H% = -1
THEN ERRORMES
= JDBC_GET_LAST_ERROR$ QUIT ENDIF H% = JDBC_SETPARAM(2,"John’s
mother",1) IF H% = -1
THEN ERRORMES
= JDBC_GET_LAST_ERROR$ QUIT ENDIF H% = JDBC_EXEC_PREPARED(2) IF H% = -1
THEN ERRORMES
= JDBC_GET_LAST_ERROR$ QUIT ENDIF |
||||
|
See also: |
|