Home  >  Article  >  Database  >  Windows Oracle9i proc编程传参

Windows Oracle9i proc编程传参

WBOY
WBOYOriginal
2016-06-07 17:18:371039browse

在windows下的proc中不支持通过参数列表访问,而Linux下的则可以!这段代码是错误的proc会提示未定义标志符,这是因为tm不能直接

在windows下的proc中不支持通过参数列表访问,而Linux下的则可以!

void insert_sale_to_db(float tm)
{
  EXEC SQL WHENEVER SQLERROR GOTO ERROR;
 EXEC SQL INSERT INTO SALE VALUES(:tm);
 EXEC SQL COMMIT WORK;
 return;

ERROR:
 makelog("debug.log","db_show");
 makelog("debug.log",sqlca.sqlerrm.sqlerrmc);

}

这段代码是错误的proc会提示未定义标志符,,这是因为tm不能直接利用,而应该通过在函数体内再定义一个变量来接受tm。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn