数据库高手进

来源:百度知道 编辑:UC知道 时间:2024/06/25 02:43:00
sqlglm(err_msg, &buf_len, &msg_len)
请详细解释它的作用 谢了
仅有10分献上

sqlglm(err_msg, &buf_len, &msg_len);是获得错误信息
err_msg用来存放返回的错误字符串的,
buf_len是err_msg的总长度,msg_len是返回错误信息的长度

Getting the Full Text of Error Messages
The SQLCA can accommodate error messages up to 70 characters long. To get the
full text of longer (or nested) error messages, you need to use the sqlglm()
function. The syntax is
void sqlglm(char *message_buffer,
size_t *buffer_size,
size_t *message_length);
where:
Syntax Description
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.