Full Text of Error Messages void sqlglm(char *message_buffer,size_t *buffer_size,size_t *message_length);message_buffer Is the text buffer in which you want Oracle to store the error message (Oracle blank-pads to the end of this buffer).buffer_size Is a scalar variable that specifies the maximum size of the buffer in bytes. message_length Is a scalar variable in which Oracle stores the actual length of the error message, if not truncated.The SQLStmtGetText() function (old name:sqlgls() function) void SQLStmtGetText(dvoid *context, char *sqlstm, size_t *stmlen, size_t *sqlfc); The context parameter is the runtime context. For definition and use of contexts, see "CONTEXT Variables" on page 4-36. The sqlstm parameter is a character buffer that holds the returned text of the SQL statement. Your program must statically declare the buffer or dynamically allocate memory for the buffer. The stmlen parameter is a size_t variable. Before calling SQLStmtGetText(), set this parameter to the actual size, in bytes, of the sqlstm buffer. WhenSQLStmtGetText() returns, the sqlstm buffer contains the SQL statement text, blank padded to the length of the buffer. The stmlen parameter returns the actual number of bytes in the returned statement text, not counting blank padding. The maximum value of stmlen is port-specific and generally will be the maximum integer size. The sqlfc parameter is a size_t variable that returns the SQL function code for the SQL command in the statement. Table 9–3 shows the SQL function codes for the commands.
sqlgls()函数的作用就是把出错的(可能是最后执行的)EXEC SQL语句返回,但是语句中的宿主变量却不能返回值,(一般是b0,b1,b2)代替了,我现在就是想在这时候,把宿主变量的值输出出来,应该有各类似sqlgls()的返回函数。真的没有人知道吗? 有谁知道sqlgls()函数具体是如何写,定义的也可以,能不能告诉我?十分感谢
void sqlglm(char *message_buffer,size_t *buffer_size,size_t *message_length);message_buffer Is the text buffer in which you want Oracle to store the error
message (Oracle blank-pads to the end of this buffer).buffer_size Is a scalar variable that specifies the maximum size of the buffer in bytes.
message_length Is a scalar variable in which Oracle stores the actual length of the error message, if not truncated.The SQLStmtGetText() function (old name:sqlgls() function)
void SQLStmtGetText(dvoid *context, char *sqlstm, size_t *stmlen, size_t
*sqlfc);
The context parameter is the runtime context. For definition and use of contexts, see
"CONTEXT Variables" on page 4-36.
The sqlstm parameter is a character buffer that holds the returned text of the SQL
statement. Your program must statically declare the buffer or dynamically allocate
memory for the buffer.
The stmlen parameter is a size_t variable. Before calling SQLStmtGetText(), set this
parameter to the actual size, in bytes, of the sqlstm buffer. WhenSQLStmtGetText()
returns, the sqlstm buffer contains the SQL statement text, blank padded to the
length of the buffer. The stmlen parameter returns the actual number of bytes in the
returned statement text, not counting blank padding. The maximum value of stmlen
is port-specific and generally will be the maximum integer size.
The sqlfc parameter is a size_t variable that returns the SQL function code for the
SQL command in the statement. Table 9–3 shows the SQL function codes for the
commands.
SQLStmtGetText()是用来获取出错的的SQL的(老版本的名字叫sqlgls())
http://ovir.icp.ac.ru/oracle/doc/api/doc/pc_22/ch09.htm#err-sqlglm这两个地方有你所要的解释,不过是英文的!