📄 prefetchrows.cpp
字号:
#include <SQLAPI.h>using namespace std;void Oracle_PreFetchRows(){ SAConnection con; SACommand cmd(&con,"select * from test_tbl"); try { //con.setOption("UseAPI") = "OCI7"; con.Connect( "test", "scott", "tiger", SA_Oracle_Client); char *sPreFetchRows[] = {"1", "2", "3", "4", "5", "6", "7"}; for(int i = 0; i < sizeof(sPreFetchRows)/sizeof(char*); ++i) { cmd.setOption("PreFetchRows") = sPreFetchRows[i]; cmd.Execute(); while(cmd.FetchNext()) { cout << cmd[1].isNull() << endl; } cout << endl; } } catch(SAException &x) { try { con.Rollback(); } catch(SAException &) { } cout << (const char*)x.ErrText() << endl; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -