|
4#
楼主 |
发表于 2006-6-14 15:29:05
|
只看该作者
谢谢楼上两位。
为什么选择 MS SQL server协议时候,不能录制出脚本。而用Siebel SQL 协议的话
会有lrd_init(&InitInfo, DBTypeVersion);
lrd_open_context(&Ctx1, LRD_DBTYPE_ODBC, 0, 0, 0);
lrd_open_context(&Ctx2, LRD_DBTYPE_ODBC, 0, 0, 0);
lrd_db_option(0, OT_ODBC_CP_OFF, 0, 0);
lrd_alloc_connection(&Con1, LRD_DBTYPE_ODBC, Ctx2, 0 /*Unused*/, 0);
lrd_db_option(Con1, OT_ODBC_LOGIN_TIMEOUT, (void FAR const *)15, 0);
lrd_open_connection(&Con1, LRD_DBTYPE_ODBC, "", lr_decrypt("448fb89ae"), "", lr_decrypt("448fb89a20176375790b1de80de6f1fee2e4eaeeb954674a"
"0556b3f62cdd44255b39d84fb005e1e31ca4b89df1cabaf12ff05fa0f883"
"a0286758f771212798edd913bb3141dc5d04be"), Ctx2, 1, 0);
lrd_open_cursor(&Csr1, Con1, 0);
lrd_db_option(Csr1, OT_ODBC_QUERY_TIMEOUT, (void FAR const *)30, 0);
lrd_assign(&_1_D1, "sysadmin", 0, 0, 0);
lrd_bind_placeholder(Csr1, "1", &_1_D1, LRD_BIND_FOR_INPUT_ONLY, 0);
lrd_stmt(Csr1, "SELECT obj_id FROM PDEMTBL_User WHERE name= ? ", -1, 1 /*Direct exec*/, 0 /*None*/, 0);
lrd_db_option(Csr1, OT_ODBC_RETRIEVE_DATA, "OFF", 0);
lrd_db_option(Csr1, OT_ODBC_RETRIEVE_DATA, "ON", 0);
lrd_bind_cols(Csr1, BCInfo_D3, 0);
lr_start_transaction("MercuryFetch_0");
.....................
但不能回放成功
[ 本帖最后由 lzq123335 于 2006-6-15 10:21 编辑 ] |
|