New version 1.005
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Mip
|
||||
|
||||
string CmdString = ("SELECT `DataSuboru`,(LENGTH (`DataSuboru`)) AS `size` FROM `tabformular` WHERE `NazovSuboru` LIKE '%"+_nazov+"%';");
|
||||
MyCommand = new MySqlCommand(CmdString, MyConnection);
|
||||
|
||||
|
||||
MyConnection.Open();
|
||||
|
||||
myData = MyCommand.ExecuteReader();
|
||||
@@ -316,7 +316,7 @@ namespace Mip
|
||||
if (MariaDBConnection != null)
|
||||
MariaDBConnection.Close();
|
||||
|
||||
string connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling=false", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013");
|
||||
string connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling={4}; default command timeout={5};", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013", "false", "3000");
|
||||
MariaDBConnection = new MySqlConnection(connStr);
|
||||
try
|
||||
{
|
||||
@@ -335,7 +335,7 @@ namespace Mip
|
||||
if (dr == DialogResult.Yes)
|
||||
{
|
||||
classGlobal.SetServerIP();
|
||||
connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling=false", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013");
|
||||
connStr = String.Format("server={0}; database={1}; user id={2}; password={3}; pooling={4}; default command timeout={5};", classUser.MariaDBServerIPAddress, "mip", "mip", "mip@2013", "false", "3000");
|
||||
MariaDBConnection = new MySqlConnection(connStr);
|
||||
try
|
||||
{
|
||||
@@ -370,6 +370,15 @@ namespace Mip
|
||||
|
||||
private static void MariaDBCommand(string Command, bool Zistipocet)
|
||||
{
|
||||
//koli zrychleniu je nastavene limit 500
|
||||
string cmd = Command.ToString();
|
||||
if (cmd.Substring(0, 6).ToUpper() == "SELECT")
|
||||
{
|
||||
if (cmd.EndsWith(";")) cmd = cmd.Remove(cmd.Length - 1, 1) + " LIMIT " + classUser.LimitSqlPrikazu.ToString() + ";";
|
||||
else cmd = cmd + " LIMIT " + classUser.LimitSqlPrikazu.ToString() + ";";
|
||||
}
|
||||
Command = cmd;
|
||||
|
||||
try
|
||||
{
|
||||
DataTable celkovypocet = new DataTable();
|
||||
|
||||
Reference in New Issue
Block a user