日期:2014-05-17 浏览次数:20873 次
int main()
{
Environment * env = Environment::createEnvironment( " ZHS16GBK " , " UTF8 " );
char *szInsert = "某插入语句";
string mc;
{
Connection * conn = env->createConnection( " system " , " system " , " orcl_192.168.0.3 " );
try
{
while (1)
{
Statement * stmt = conn->createStatement(szInsert );
stmt->executeUpdate();
conn->terminateStatement(stmt);
conn->commit();
Sleep(10); //10毫秒
}
}
catch (SQLException e)
{
cout << e.what();
}
env -> terminateConnection(conn);
}
Environment::terminateEnvironment(env);
system( " pause " );
return 0 ;
}
try
{
Statement * stmt = conn->createStatement(szInsert );
while (1)
{
stmt->executeUpdate();
conn->commit();
Sleep(10); //10毫秒
}
conn->terminateStatement(stmt);
}
&n