调用otl_connect类方法连接数据库,查询信息报错

浪心键客 发布于 2013/07/24 20:59
阅读 547
收藏 0

测试时加入代码

/*sprintf(sqlBuf,"select to_char(sysdate,'yyyymmddhh24miss') from dual");*/
	sprintf(sqlBuf,"select to_char(id_no) from ur_user_info where rownum <2");
	printf("-1--sysdate--1---sqlbuf=[%s]\n",sqlBuf);
	otl_sql_handle.open(1,sqlBuf,otl_dbcon);
	otl_sql_handle>>lsceshiid_no;
	printf("-2--lsceshiid_no--=[%s]---\n",lsceshiid_no);

	sprintf(sqlBuf,"select '11sad111' from template_sms where TEMPLATE_ID = '20120004'");
	printf("-3--sysdate--1---sqlbuf=[%s]\n",sqlBuf);
	otl_sql_handle.open(1,sqlBuf,otl_dbcon);
	otl_sql_handle>>lsceshisystime;
	printf("-4--lsceshisysdate--=[%s]---\n",lsceshisystime);
	/*********ceshi  end*********/
报错信息:

-1--sysdate--1---sqlbuf=[select to_char(id_no) from ur_user_info where rownum <2]
-2--lsceshiid_no--=[22002040352670]---
-3--sysdate--1---sqlbuf=[select '11sad111' from template_sms where TEMPLATE_ID = '20120004']
-----2------inter_pubinfo->ErrMsg=[OTL库执行异常[32030][select to_char(id_no) from ur_user_info where rownum <2][]]
求指教!

加载中
0
浪心键客
浪心键客

自问自答:

擦,,,输出流应打开关闭成对出现。

返回顶部
顶部