資源簡介
ocilib4.3.3的壓縮包,Github上蕩的,蕩了我一下午我的天!

代碼片段和文件信息
#include?“ocilib.h“
#if?defined(_WINDOWS)
????#define?sleep(x)?Sleep(x*1000)
#else
????#include?
#endif
void?long_oracle_call(OCI_Thread?*thread?void?*data)
{
????clock_t?t_start?=?clock();
????int?err_code?=?0;
????if?(!OCI_ExecuteStmt((OCI_Statement?*)data?“begin?dbms_lock.sleep(10);?end;“))
????{
????????OCI_Error?*err?=?OCI_GetLastError();
????????if?(err)
????????{
????????????err_code?=?OCI_ErrorGetOCICode(err);
????????}
????}
????
????printf(“call?duration?%d?expected?oracle?error?is?1013?got?%d“?clock()?-?t_start?err_code);
}
int?main(void)
{
????OCI_Connection?*cn;
????OCI_Statement?*st;
????OCI_Thread?*th;
????if?(!OCI_Initialize(NULL?NULL?OCI_ENV_THREADED?|?OCI_ENV_CONTEXT))
????{
????????return?EXIT_FAILURE;
????}
????th?=?OCI_ThreadCreate();
????cn?=?OCI_ConnectionCreate(“db“?“usr“?“pwd“?OCI_SESSION_DEFAULT);
????st?=?OCI_StatementCreate(cn);
????OCI_ThreadRun(th?long_oracle_call?st);
????sleep(1);
????OCI_Break(cn);
????OCI_ThreadJoin(th);
????OCI_ThreadFree(th);
????OCI_StatementFree(st);
????OCI_ConnectionFree(cn);
????OCI_Cleanup();
????return?EXIT_SUCCESS;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-05-16?08:36??demo\
?????文件????????1184??2017-02-27?12:18??demo\abort.c
?????文件?????????935??2017-02-27?12:18??demo\abort.cpp
?????文件????????1501??2017-02-27?12:18??demo\array.c
?????文件????????1068??2017-02-27?12:18??demo\array.cpp
?????文件????????1046??2017-02-27?12:18??demo\array_internal.c
?????文件?????????986??2017-02-27?12:18??demo\bind.c
?????文件?????????644??2017-02-27?12:18??demo\bind.cpp
?????文件????????1902??2017-02-27?12:18??demo\coll.c
?????文件????????2750??2017-02-27?12:18??demo\coll.cpp
?????文件????????1134??2017-02-27?12:18??demo\collections.sql
?????文件?????????740??2017-02-27?12:18??demo\conn.c
?????文件?????????999??2017-02-27?12:18??demo\cursor.c
?????文件?????????874??2017-02-27?12:18??demo\cursor.cpp
?????文件????????1273??2017-02-27?12:18??demo\date.c
?????文件?????????936??2017-02-27?12:18??demo\date.cpp
?????文件?????????101??2017-02-27?12:18??demo\dates.sql
?????文件????????1151??2017-02-27?12:18??demo\desc.c
?????文件????????1184??2017-02-27?12:18??demo\desc.cpp
?????文件????????2564??2017-02-27?12:18??demo\dirpath.c
?????文件?????????144??2017-02-27?12:18??demo\dirpath.sql
?????文件???????12661??2017-02-27?12:18??demo\dirpath_complete.c
?????文件?????????580??2017-02-27?12:18??demo\err.c
?????文件?????????504??2017-02-27?12:18??demo\err_ctx.c
?????文件?????????584??2017-02-27?12:18??demo\err_warning.c
?????文件?????????923??2017-02-27?12:18??demo\exec.c
?????文件?????????851??2017-02-27?12:18??demo\fetch.c
?????文件?????????751??2017-02-27?12:18??demo\fetch.cpp
?????文件????????1358??2017-02-27?12:18??demo\fetch_struct.c
?????文件????????1918??2017-02-27?12:18??demo\file.c
?????文件?????????238??2017-02-27?12:18??demo\file.sql
............此處省略451個文件信息
- 上一篇:人工智能(模糊算法)
- 下一篇:verilog交通燈設(shè)計
評論
共有 條評論