The question now is when many people at the same time submit data will be submitted to the database link failure, wait for 2 to 3 seconds and can be connected, but sometimes also can quote "ora - 12518 TNS listener" can not connect to distribute the client, then you must wake up to the program, now I have changed the maximum number of connections to the database to 3000, but in fact users only 20 or so, I have been monitoring the session, the biggest also however 400 more, using the data submission is
Sql_str_show="select rq as date, DWHZ as unit, XMH as item number, \ r \ n";
Sql_str_show +="xm as project name, je as amount from" + tab_name + "where dm='" + dm +"' \ r \ n ";
Sql_str_show +="and rq='" + FormatDateTime (" yyyy - mm - dd," dat) + "' order by id \ r \ n ";
Tab_name sql_str="insert into" + + "(dm, DWHZ, rq, XMH, xm, je, user, id) \ r \ n";
Sql_str +="values ('" + dm + "', '" + DWMC +"', '" + FormatDateTime (" yyyy - mm - dd, "dat) +"', \ r \ n ";
Sql_str +="" + IntToStr (XMH) +", '" + XMMC + ", "+ FloatToStr (je) +", "" + this - & gt; Sys_user + "', '" + id +"') \ r \ n ";
This - & gt; Qry_yh_ins - & gt; Close ();
This - & gt; Qry_yh_ins - & gt; SQL - & gt; The Clear ();
This - & gt; Qry_yh_ins - & gt; SQL - & gt; Add (sql_str);
This - & gt; Qry_yh_ins - & gt; ExecSQL ();
This - & gt; Qry_yh - & gt; Close ();
This - & gt; Qry_yh - & gt; SQL - & gt; The Clear ();
This - & gt; Qry_yh - & gt; SQL - & gt; Add (sql_str_show);
This - & gt; Qry_yh - & gt; The Open ();
But I will do at the time of submitting two query, submit and library is a query, everybody look at the problem could be?
CodePudding user response:
Reference:http://bbs.csdn.net/topics/391075158
Please help,
CodePudding user response:
No unified ADOConnection to manage connections?Oracle database have limited the number of connections, you go to check you buy how many users, had better use ADOConnection in program management and database connection, a ADOQuery a connection, will soon explode the number of connections,
CodePudding user response: