|
我来发一段简单的ORACLE的脚本
#include "lrd.h"
static LRD_INIT_INFO InitInfo = {LRD_INIT_INFO_EYECAT};
static LRD_DEFAULT_DB_VERSION DBTypeVersion[] =
{
{LRD_DBTYPE_NONE, LRD_DBVERSION_NONE}
};
static LRD_CONNECTION * Con1;
static LRD_CURSOR * Csr1;
Action()
{
lrd_init(&InitInfo, DBTypeVersion);
lrd_open_connection(&Con1, LRD_DBTYPE_ORACLE, "sso", "sso", "80", "", 0, 0, 0);
lrd_open_cursor(&Csr1, Con1, 0);
//lrd_open_cursor(&Csr1, Con1, 0);
lrd_stmt(Csr1, "insert into BASEUSER(oid,uuid) values ({NewParam},{NewParam})", -1, 0 /*Non deferred*/, 1 /*Dflt Ora Ver*/, 0);
lrd_exec(Csr1, 0, 0, 0, 0, 0);
lrd_stmt(Csr1, "insert into userinfo (oid,useroid,name,value) values ({NewParam},{NewParam},'nam{NewParam}','value')", -1, 0 /*Non deferred*/, 1 /*Dflt Ora Ver*/, 0);
lrd_exec(Csr1, 0, 0, 0, 0, 0);
/*
PrintRow2, 0);
lrd_close_cursor(&Csr1, 0);
*/
lrd_commit(0, Con1, 0);
lrd_close_connection(&Con1, 0, 0);
lrd_end(0);
return 0;
} |
|