diff --git a/.vs/ChessManagement/v14/.suo b/.vs/ChessManagement/v14/.suo index d4a0af6..1a2e369 100644 Binary files a/.vs/ChessManagement/v14/.suo and b/.vs/ChessManagement/v14/.suo differ diff --git a/.vs/config/applicationhost.config b/.vs/config/applicationhost.config index dfa097d..b6ae2bf 100644 --- a/.vs/config/applicationhost.config +++ b/.vs/config/applicationhost.config @@ -163,7 +163,7 @@ - + diff --git a/ChessManagement/ChessManagement.csproj b/ChessManagement/ChessManagement.csproj index b853378..bb08339 100644 --- a/ChessManagement/ChessManagement.csproj +++ b/ChessManagement/ChessManagement.csproj @@ -76,6 +76,7 @@ True + @@ -377,6 +378,7 @@ + Contact.aspx ASPXCodeBehind diff --git a/ChessManagement/MYSQLDB.cs b/ChessManagement/MYSQLDB.cs new file mode 100644 index 0000000..8488023 --- /dev/null +++ b/ChessManagement/MYSQLDB.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using MySql.Data.MySqlClient; + + + +namespace ChessManagement +{ + public class MYSQLDB + { + //hard coded ip address for the external SQL server + private static String conString = "server=172.76.245.119;Port=3306;database=CHESS;uid=webAccess;pwd=qwerty;"; + private static MySqlConnection conn = new MySqlConnection(conString); + + //test if the database is connected + public static bool isConnected() + { + try + { + conn.Open(); + Console.WriteLine("Connection Established"); + conn.Close(); + return true; + } + catch (Exception ex) + { + Console.WriteLine("Connection Error"); + } + return false; + } + + //returns a List<> of every user in the database. + public static List getUsers() + { + List tmpList = new List(); + + return tmpList; + } + + //returns all the data in the DB under a single user entry. + public static List getUserData() + { + List tmpList = new List(); + + return tmpList; + } + + /// + /// Get a user's match history, with each line containing the comma delmimited values of 1 match. + /// Data is displayed from that user's point of view, this determines whether or not the user won + /// or lost a particular match. + /// + /// the username of the user who's match history is desired + /// The designated user's match history as a list of strings + public static List getUserMatchHistory(String username) + { + List tmpList = new List(); + + return tmpList; + } + + //return a list of all the tournaments in the DB + public static List getTournaments() + { + List tmpList = new List(); + + return tmpList; + } + + private static void updateDB() + { + + } + + private static List statement(String commandString,String username,String password, bool query=false) + { + List tmpList = new List(); + + MySqlCommand cmd = new MySqlCommand(commandString, conn); + MySqlDataReader reader; + if (!query) + { + try + { + //open the connection to the DB + cmd.Connection.Open(); + + //execute the SQL command, saving the relevant data + reader = cmd.ExecuteReader(); + conn.Close(); + + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + } + else + { + try + { + //open sesame + cmd.Connection.Open(); + + //attach the reader to the command output + reader = cmd.ExecuteReader(); + if (reader.HasRows) + { + while (reader.Read()) + { + Console.WriteLine(reader.GetString(0)); + + } + } + + }catch(Exception ex) + { + Console.WriteLine(ex.Message); + } + } + + return tmpList; + } + + } +} \ No newline at end of file diff --git a/ChessManagement/bin/ChessManagement.dll b/ChessManagement/bin/ChessManagement.dll index bb48bf3..efe3472 100644 Binary files a/ChessManagement/bin/ChessManagement.dll and b/ChessManagement/bin/ChessManagement.dll differ diff --git a/ChessManagement/bin/ChessManagement.pdb b/ChessManagement/bin/ChessManagement.pdb index 02077b1..82bbf5e 100644 Binary files a/ChessManagement/bin/ChessManagement.pdb and b/ChessManagement/bin/ChessManagement.pdb differ diff --git a/ChessManagement/bin/MySql.Data.dll b/ChessManagement/bin/MySql.Data.dll new file mode 100644 index 0000000..9abfb6b Binary files /dev/null and b/ChessManagement/bin/MySql.Data.dll differ diff --git a/ChessManagement/bin/MySql.Data.xml b/ChessManagement/bin/MySql.Data.xml new file mode 100644 index 0000000..58245ea --- /dev/null +++ b/ChessManagement/bin/MySql.Data.xml @@ -0,0 +1,10569 @@ + + + + MySql.Data + + + + + This is a factory method that is used only internally. It creates an auth plugin based on the method type + + + + + + + + + Returns a byte array containing the proper encryption of the + given password/seed according to the new 4.1.1 authentication scheme. + + + + + + + + The implementation of the sha256_password authentication plugin. + + + + + + + + + + + + + + + Gets or sets the connection. + + The connection. + + + + Gets or sets the field terminator. + + The field terminator. + + + + Gets or sets the line terminator. + + The line terminator. + + + + Gets or sets the name of the table. + + The name of the table. + + + + Gets or sets the character set. + + The character set. + + + + Gets or sets the name of the file. + + The name of the file. + + + + Gets or sets the timeout. + + The timeout. + + + + Gets or sets a value indicating whether the filename that is to be loaded + is local to the client or not + + true if local; otherwise, false. + + + + Gets or sets the number of lines to skip. + + The number of lines to skip. + + + + Gets or sets the line prefix. + + The line prefix. + + + + Gets or sets the field quotation character. + + The field quotation character. + + + + Gets or sets a value indicating whether [field quotation optional]. + + + true if [field quotation optional]; otherwise, false. + + + + + Gets or sets the escape character. + + The escape character. + + + + Gets or sets the conflict option. + + The conflict option. + + + + Gets or sets the priority. + + The priority. + + + + Gets the columns. + + The columns. + + + + Gets the expressions. + + The expressions. + + + + Execute the load operation + + The number of rows inserted. + + + + Async version of Load + + The number of rows inserted. + + + + + + + + + This is the default and indicates normal priority + + + + + Low priority will cause the load operation to wait until all readers of the table + have finished. This only affects storage engines that use only table-level locking + such as MyISAM, Memory, and Merge. + + + + + Concurrent priority is only relevant for MyISAM tables and signals that if the table + has no free blocks in the middle that other readers can retrieve data from the table + while the load operation is happening. + + + + + + + + + + This is the default and indicates normal operation. In the event of a LOCAL load, this + is the same as ignore. When the data file is on the server, then a key conflict will + cause an error to be thrown and the rest of the data file ignored. + + + + + Replace column values when a key conflict occurs. + + + + + Ignore any rows where the primary key conflicts. + + + + + Summary description for CharSetMap. + + + + + Returns the text encoding for a given MySQL character set name + + Version of the connection requesting the encoding + Name of the character set to get the encoding for + Encoding object for the given character set name + + + + + + + + Represents a SQL statement to execute against a MySQL database. This class cannot be inherited. + MySqlCommand features the following methods for executing commands at a MySQL database: + + + Item + Description + + + + ExecuteReader + + Executes commands that return rows. + + + + ExecuteNonQuery + + Executes commands such as SQL INSERT, DELETE, and UPDATE statements. + + + + ExecuteScalar + + Retrieves a single value (for example, an aggregate value) from a database. + + + + You can reset the CommandText property and reuse the MySqlCommand + object. However, you must close the MySqlDataReader + before you can execute a new or previous command. + + If a MySqlException is + generated by the method executing a MySqlCommand, the MySqlConnection + remains open. It is the responsibility of the programmer to close the connection. + + + Using the '@' symbol for paramters is now the preferred approach although the old pattern of using + '?' is still supported. Please be aware though that using '@' can cause conflicts when user variables + are also used. To help with this situation please see the documentation on the 'allow user variables' + connection string option. The 'old syntax' connection string option has now been deprecated. + + + The following example creates a MySqlCommand and + a MySqlConnection. The MySqlConnection is opened and set as the Connection + for the MySqlCommand. The example then calls ExecuteNonQuery, + and closes the connection. To accomplish this, the ExecuteNonQuery is + passed a connection string and a query string that is a SQL INSERT + statement. + + Public Sub InsertRow(myConnectionString As String) + " If the connection string is null, use a default. + If myConnectionString = "" Then + myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass" + End If + Dim myConnection As New MySqlConnection(myConnectionString) + Dim myInsertQuery As String = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)" + Dim myCommand As New MySqlCommand(myInsertQuery) + myCommand.Connection = myConnection + myConnection.Open() + myCommand.ExecuteNonQuery() + myCommand.Connection.Close() + End Sub + + + public void InsertRow(string myConnectionString) + { + // If the connection string is null, use a default. + if(myConnectionString == "") + { + myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass"; + } + MySqlConnection myConnection = new MySqlConnection(myConnectionString); + string myInsertQuery = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)"; + MySqlCommand myCommand = new MySqlCommand(myInsertQuery); + myCommand.Connection = myConnection; + myConnection.Open(); + myCommand.ExecuteNonQuery(); + myCommand.Connection.Close(); + } + + + + + + + Initializes a new instance of the MySqlCommand class. + + + The following example creates a MySqlCommand and sets some of its properties. + + + This example shows how to use one of the overloaded + versions of the MySqlCommand constructor. For other examples that might be available, + see the individual overload topics. + + + + Public Sub CreateMySqlCommand() + Dim myConnection As New MySqlConnection _ + ("Persist Security Info=False;database=test;server=myServer") + myConnection.Open() + Dim myTrans As MySqlTransaction = myConnection.BeginTransaction() + Dim mySelectQuery As String = "SELECT * FROM MyTable" + Dim myCommand As New MySqlCommand(mySelectQuery, myConnection, myTrans) + myCommand.CommandTimeout = 20 + End Sub + + + public void CreateMySqlCommand() + { + MySqlConnection myConnection = new MySqlConnection("Persist Security Info=False; + database=test;server=myServer"); + myConnection.Open(); + MySqlTransaction myTrans = myConnection.BeginTransaction(); + string mySelectQuery = "SELECT * FROM myTable"; + MySqlCommand myCommand = new MySqlCommand(mySelectQuery, myConnection,myTrans); + myCommand.CommandTimeout = 20; + } + + + public: + void CreateMySqlCommand() + { + MySqlConnection* myConnection = new MySqlConnection(S"Persist Security Info=False; + database=test;server=myServer"); + myConnection->Open(); + MySqlTransaction* myTrans = myConnection->BeginTransaction(); + String* mySelectQuery = S"SELECT * FROM myTable"; + MySqlCommand* myCommand = new MySqlCommand(mySelectQuery, myConnection, myTrans); + myCommand->CommandTimeout = 20; + }; + + + + Initializes a new instance of the MySqlCommand class. + + The base constructor initializes all fields to their default values. The + following table shows initial property values for an instance of . + + + Properties + Initial Value + + + + + + empty string ("") + + + + + + 0 + + + + + + CommandType.Text + + + + + + Null + + + + You can change the value for any of these properties through a separate call to + the property. + + + The following example creates a and + sets some of its properties. + + + Public Sub CreateMySqlCommand() + Dim myCommand As New MySqlCommand() + myCommand.CommandType = CommandType.Text + End Sub + + + public void CreateMySqlCommand() + { + MySqlCommand myCommand = new MySqlCommand(); + myCommand.CommandType = CommandType.Text; + } + + + + + + Initializes a new instance of the class with the text of the query. + The text of the query. + When an instance of is created, + the following read/write properties are set to initial values. + + + + Properties + Initial Value + + + + + + + cmdText + + + + + + + 0 + + + + + + CommandType.Text + + + + + + Null + + + + You can change the value for any of these properties through a separate call to + the property. + + + The following example creates a and + sets some of its properties. + + + Public Sub CreateMySqlCommand() + Dim sql as String = "SELECT * FROM mytable" + Dim myCommand As New MySqlCommand(sql) + myCommand.CommandType = CommandType.Text + End Sub + + + public void CreateMySqlCommand() + { + string sql = "SELECT * FROM mytable"; + MySqlCommand myCommand = new MySqlCommand(sql); + myCommand.CommandType = CommandType.Text; + } + + + + + + Initializes a new instance of the class + with the text of the query and a . + The text of the query. + A that represents the + connection to an instance of SQL Server. + + When an instance of is created, + the following read/write properties are set to initial values. + + + + Properties + Initial Value + + + + + + + cmdText + + + + + + + 0 + + + + + + CommandType.Text + + + + + + + connection + + + + + You can change the value for any of these properties through a separate call to + the property. + + + The following example creates a and + sets some of its properties. + + + Public Sub CreateMySqlCommand() + Dim conn as new MySqlConnection("server=myServer") + Dim sql as String = "SELECT * FROM mytable" + Dim myCommand As New MySqlCommand(sql, conn) + myCommand.CommandType = CommandType.Text + End Sub + + + public void CreateMySqlCommand() + { + MySqlConnection conn = new MySqlConnection("server=myserver") + string sql = "SELECT * FROM mytable"; + MySqlCommand myCommand = new MySqlCommand(sql, conn); + myCommand.CommandType = CommandType.Text; + } + + + + + + Initializes a new instance of the class + with the text of the query, a , and the + . + The text of the query. + A that represents the + connection to an instance of SQL Server. + + The in which the executes. + + When an instance of is created, + the following read/write properties are set to initial values. + + + + Properties + Initial Value + + + + + + + cmdText + + + + + + + 0 + + + + + + CommandType.Text + + + + + + + connection + + + + + You can change the value for any of these properties through a separate call to + the property. + + + The following example creates a and + sets some of its properties. + + + Public Sub CreateMySqlCommand() + Dim conn as new MySqlConnection("server=myServer") + conn.Open(); + Dim txn as MySqlTransaction = conn.BeginTransaction() + Dim sql as String = "SELECT * FROM mytable" + Dim myCommand As New MySqlCommand(sql, conn, txn) + myCommand.CommandType = CommandType.Text + End Sub + + + public void CreateMySqlCommand() + { + MySqlConnection conn = new MySqlConnection("server=myserver") + conn.Open(); + MySqlTransaction txn = conn.BeginTransaction(); + string sql = "SELECT * FROM mytable"; + MySqlCommand myCommand = new MySqlCommand(sql, conn, txn); + myCommand.CommandType = CommandType.Text; + } + + + + + + + + + Gets or sets the SQL statement to execute at the data source. + + The SQL statement or stored procedure to execute. The default is an empty string. + + + When the property is set to StoredProcedure, + the CommandText property should be set to the name of the stored procedure. + The user may be required to use escape character syntax if the stored procedure name + contains any special characters. The command executes this stored procedure when + you call one of the Execute methods. Starting with Connector/Net 5.0, having both a stored function + and stored procedure with the same name in the same database is not supported. It is + suggested that you provide unqiue names for your stored routines. + + + The following example creates a and sets some of its properties. + + Public Sub CreateMySqlCommand() + Dim myCommand As New MySqlCommand() + myCommand.CommandText = "SELECT * FROM Mytable ORDER BY id" + myCommand.CommandType = CommandType.Text + End Sub + + + public void CreateMySqlCommand() + { + MySqlCommand myCommand = new MySqlCommand(); + myCommand.CommandText = "SELECT * FROM mytable ORDER BY id"; + myCommand.CommandType = CommandType.Text; + } + + + + + + Gets or sets the wait time before terminating the attempt to execute a command + and generating an error. + + The time (in seconds) to wait for the command to execute. The default is 30 + seconds. + + CommandTimeout is dependent on the ability of MySQL to cancel an executing query. + Because of this, CommandTimeout is only supported when connected to MySQL + version 5.0.0 or higher. + + + + + Gets or sets a value indicating how the property is to be interpreted. + + One of the values. The default is Text. + + + When you set the CommandType property to StoredProcedure, you + should set the property to the name of the stored + procedure. The command executes this stored procedure when you call one of the + Execute methods. + + + The following example creates a and sets some of its properties. + + Public Sub CreateMySqlCommand() + Dim myCommand As New MySqlCommand() + myCommand.CommandType = CommandType.Text + End Sub + + + public void CreateMySqlCommand() + { + MySqlCommand myCommand = new MySqlCommand(); + myCommand.CommandType = CommandType.Text; + } + + + + + + + + + Gets or sets the used by this instance of the + . + + The connection to a data source. The default value is a null reference + (Nothing in Visual Basic). + + + If you set Connection while a transaction is in progress and the + property is not null, an + is generated. If the Transaction property is not null and the transaction + has already been committed or rolled back, Transaction is set to + null. + + + The following example creates a and sets some of its properties. + + Public Sub CreateMySqlCommand() + Dim mySelectQuery As String = "SELECT * FROM mytable ORDER BY id" + Dim myConnectString As String = "Persist Security Info=False;database=test;server=myServer" + Dim myCommand As New MySqlCommand(mySelectQuery) + myCommand.Connection = New MySqlConnection(myConnectString) + myCommand.CommandType = CommandType.Text + End Sub + + + public void CreateMySqlCommand() + { + string mySelectQuery = "SELECT * FROM mytable ORDER BY id"; + string myConnectString = "Persist Security Info=False;database=test;server=myServer"; + MySqlCommand myCommand = new MySqlCommand(mySelectQuery); + myCommand.Connection = new MySqlConnection(myConnectString); + myCommand.CommandType = CommandType.Text; + } + + + + + + Get the + + The parameters of the SQL statement or stored procedure. The default is + an empty collection. + + Connector/Net does not support unnamed parameters. Every parameter added to the collection must + have an associated name. + + The following example creates a and displays its parameters. + To accomplish this, the method is passed a , a query string + that is a SQL SELECT statement, and an array of objects. + + Public Sub CreateMySqlCommand(myConnection As MySqlConnection, _ + mySelectQuery As String, myParamArray() As MySqlParameter) + Dim myCommand As New MySqlCommand(mySelectQuery, myConnection) + myCommand.CommandText = "SELECT id, name FROM mytable WHERE age=@age" + myCommand.UpdatedRowSource = UpdateRowSource.Both + myCommand.Parameters.Add(myParamArray) + Dim j As Integer + For j = 0 To myCommand.Parameters.Count - 1 + myCommand.Parameters.Add(myParamArray(j)) + Next j + Dim myMessage As String = "" + Dim i As Integer + For i = 0 To myCommand.Parameters.Count - 1 + myMessage += myCommand.Parameters(i).ToString() & ControlChars.Cr + Next i + Console.WriteLine(myMessage) + End Sub + + + public void CreateMySqlCommand(MySqlConnection myConnection, string mySelectQuery, + MySqlParameter[] myParamArray) + { + MySqlCommand myCommand = new MySqlCommand(mySelectQuery, myConnection); + myCommand.CommandText = "SELECT id, name FROM mytable WHERE age=@age"; + myCommand.Parameters.Add(myParamArray); + for (int j=0; j<myParamArray.Length; j++) + { + myCommand.Parameters.Add(myParamArray[j]) ; + } + string myMessage = ""; + for (int i = 0; i < myCommand.Parameters.Count; i++) + { + myMessage += myCommand.Parameters[i].ToString() + "\n"; + } + MessageBox.Show(myMessage); + } + + + + + + Gets or sets the within which the executes. + + The . The default value is a null reference (Nothing in Visual Basic). + + You cannot set the Transaction property if it is already set to a + specific value, and the command is in the process of executing. If you set the + transaction property to a object that is not connected + to the same as the object, + an exception will be thrown the next time you attempt to execute a statement. + + + + + Attempts to cancel the execution of a currently active command + + + Cancelling a currently active query only works with MySQL versions 5.0.0 and higher. + + + + + Creates a new instance of a object. + + + This method is a strongly-typed version of . + + A object. + + + + + Check the connection to make sure + - it is open + - it is not currently being used by a reader + - and we have the right version of MySQL for the requested command type + + + + + Executes a SQL statement against the connection and returns the number of rows affected. + Number of rows affected + You can use ExecuteNonQuery to perform any type of database operation, + however any resultsets returned will not be available. Any output parameters + used in calling a stored procedure will be populated with data and can be + retrieved after execution is complete. + For UPDATE, INSERT, and DELETE statements, the return value is the number + of rows affected by the command. For all other types of statements, the return + value is -1. + + The following example creates a MySqlCommand and then + executes it using ExecuteNonQuery. The example is passed a string that is a + SQL statement (such as UPDATE, INSERT, or DELETE) and a string to use to + connect to the data source. + + Public Sub CreateMySqlCommand(myExecuteQuery As String, myConnection As MySqlConnection) + Dim myCommand As New MySqlCommand(myExecuteQuery, myConnection) + myCommand.Connection.Open() + myCommand.ExecuteNonQuery() + myConnection.Close() + End Sub + + + public void CreateMySqlCommand(string myExecuteQuery, MySqlConnection myConnection) + { + MySqlCommand myCommand = new MySqlCommand(myExecuteQuery, myConnection); + myCommand.Connection.Open(); + myCommand.ExecuteNonQuery(); + myConnection.Close(); + } + + + + + + Reset reader to null, to avoid "There is already an open data reader" + on the next ExecuteReader(). Used in error handling scenarios. + + + + + Reset SQL_SELECT_LIMIT that could have been modified by CommandBehavior. + + + + + Sends the to the Connection + and builds a . + + A object. + + + When the property is set to StoredProcedure, + the property should be set to the name of the stored + procedure. The command executes this stored procedure when you call + ExecuteReader. + + + While the is in use, the associated + is busy serving the MySqlDataReader. + While in this state, no other operations can be performed on the + MySqlConnection other than closing it. This is the case until the + method of the MySqlDataReader is called. + + + The following example creates a , then executes it by + passing a string that is a SQL SELECT statement, and a string to use to connect to the + data source. + + Public Sub CreateMySqlDataReader(mySelectQuery As String, myConnection As MySqlConnection) + Dim myCommand As New MySqlCommand(mySelectQuery, myConnection) + myConnection.Open() + Dim myReader As MySqlDataReader + myReader = myCommand.ExecuteReader() + Try + While myReader.Read() + Console.WriteLine(myReader.GetString(0)) + End While + Finally + myReader.Close + myConnection.Close + End Try + End Sub + + + public void CreateMySqlDataReader(string mySelectQuery, MySqlConnection myConnection) + { + MySqlCommand myCommand = new MySqlCommand(mySelectQuery, myConnection); + myConnection.Open(); + MMySqlDataReader myReader; + myReader = myCommand.ExecuteReader(); + try + { + while(myReader.Read()) + { + Console.WriteLine(myReader.GetString(0)); + } + } + finally + { + myReader.Close(); + myConnection.Close(); + } + } + + + + + + Sends the to the Connection, + and builds a using one of the values. + + One of the values. + + + When the property is set to StoredProcedure, + the property should be set to the name of the stored + procedure. The command executes this stored procedure when you call + ExecuteReader. + + + The supports a special mode that enables large binary + values to be read efficiently. For more information, see the SequentialAccess + setting for . + + + While the is in use, the associated + is busy serving the MySqlDataReader. + While in this state, no other operations can be performed on the + MySqlConnection other than closing it. This is the case until the + method of the MySqlDataReader is called. + If the MySqlDataReader is created with CommandBehavior set to + CloseConnection, closing the MySqlDataReader closes the connection + automatically. + + + When calling ExecuteReader with the SingleRow behavior, you should be aware that using a limit + clause in your SQL will cause all rows (up to the limit given) to be retrieved by the client. The + method will still return false after the first row but pulling all rows of data + into the client will have a performance impact. If the limit clause is not necessary, it should + be avoided. + + + A object. + + + + + Executes the query, and returns the first column of the first row in the + result set returned by the query. Extra columns or rows are ignored. + + The first column of the first row in the result set, or a null reference if the + result set is empty + + + Use the ExecuteScalar method to retrieve a single value (for example, + an aggregate value) from a database. This requires less code than using the + method, and then performing the operations necessary + to generate the single value using the data returned by a + + + The following example creates a and then + executes it using ExecuteScalar. The example is passed a string that is a + SQL statement that returns an aggregate result, and a string to use to + connect to the data source. + + + Public Sub CreateMySqlCommand(myScalarQuery As String, myConnection As MySqlConnection) + Dim myCommand As New MySqlCommand(myScalarQuery, myConnection) + myCommand.Connection.Open() + myCommand.ExecuteScalar() + myConnection.Close() + End Sub + + + public void CreateMySqlCommand(string myScalarQuery, MySqlConnection myConnection) + { + MySqlCommand myCommand = new MySqlCommand(myScalarQuery, myConnection); + myCommand.Connection.Open(); + myCommand.ExecuteScalar(); + myConnection.Close(); + } + + + public: + void CreateMySqlCommand(String* myScalarQuery, MySqlConnection* myConnection) + { + MySqlCommand* myCommand = new MySqlCommand(myScalarQuery, myConnection); + myCommand->Connection->Open(); + myCommand->ExecuteScalar(); + myConnection->Close(); + } + + + + + + + + + + Creates a prepared version of the command on an instance of MySQL Server. + + + Prepared statements are only supported on MySQL version 4.1 and higher. Calling + prepare while connected to earlier versions of MySQL will succeed but will execute + the statement in the same way as unprepared. + + + The following example demonstrates the use of the Prepare method. + + public sub PrepareExample() + Dim cmd as New MySqlCommand("INSERT INTO mytable VALUES (@val)", myConnection) + cmd.Parameters.Add( "@val", 10 ) + cmd.Prepare() + cmd.ExecuteNonQuery() + + cmd.Parameters(0).Value = 20 + cmd.ExecuteNonQuery() + end sub + + + private void PrepareExample() + { + MySqlCommand cmd = new MySqlCommand("INSERT INTO mytable VALUES (@val)", myConnection); + cmd.Parameters.Add( "@val", 10 ); + cmd.Prepare(); + cmd.ExecuteNonQuery(); + + cmd.Parameters[0].Value = 20; + cmd.ExecuteNonQuery(); + } + + + + + + Initiates the asynchronous execution of the SQL statement or stored procedure + that is described by this , and retrieves one or more + result sets from the server. + + An that can be used to poll, wait for results, + or both; this value is also needed when invoking EndExecuteReader, + which returns a instance that can be used to retrieve + the returned rows. + + + + Initiates the asynchronous execution of the SQL statement or stored procedure + that is described by this using one of the + CommandBehavior values. + + One of the values, indicating + options for statement execution and data retrieval. + An that can be used to poll, wait for results, + or both; this value is also needed when invoking EndExecuteReader, + which returns a instance that can be used to retrieve + the returned rows. + + + + Finishes asynchronous execution of a SQL statement, returning the requested + . + + The returned by the call to + . + A MySqlDataReader object that can be used to retrieve the requested rows. + + + + Initiates the asynchronous execution of the SQL statement or stored procedure + that is described by this . + + + An delegate that is invoked when the command's + execution has completed. Pass a null reference (Nothing in Visual Basic) + to indicate that no callback is required. + A user-defined state object that is passed to the + callback procedure. Retrieve this object from within the callback procedure + using the property. + An that can be used to poll or wait for results, + or both; this value is also needed when invoking , + which returns the number of affected rows. + + + + Initiates the asynchronous execution of the SQL statement or stored procedure + that is described by this . + + An that can be used to poll or wait for results, + or both; this value is also needed when invoking , + which returns the number of affected rows. + + + + Finishes asynchronous execution of a SQL statement. + + The returned by the call + to . + + + + + Verifies if a query is valid even if it has not spaces or is a stored procedure call + + Query to validate + If it is necessary to add call statement + + + + Creates a clone of this MySqlCommand object. CommandText, Connection, and Transaction properties + are included as well as the entire parameter list. + + The cloned MySqlCommand object + + + + Gets or sets how command results are applied to the DataRow when used by the + Update method of the DbDataAdapter. + + + + + Gets or sets a value indicating whether the command object should be visible in a Windows Form Designer control. + + + + + Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated MySQL database. This class cannot be inherited. + + + The does not automatically generate the SQL statements required to + reconcile changes made to a DataSet with the associated instance of MySQL. + However, you can create a MySqlCommandBuilder object to automatically generate SQL statements for + single-table updates if you set the SelectCommand property + of the MySqlDataAdapter. Then, any additional SQL statements that you do not set are generated by the + MySqlCommandBuilder. + + + + The MySqlCommandBuilder registers itself as a listener for RowUpdating + events whenever you set the property. You can only associate one + MySqlDataAdapter or MySqlCommandBuilder object with each other at one time. + + + + To generate INSERT, UPDATE, or DELETE statements, the MySqlCommandBuilder uses the + SelectCommand property to retrieve a required set of metadata automatically. If you change + the SelectCommand after the metadata has is retrieved (for example, after the first update), you + should call the method to update the metadata. + + + + The SelectCommand must also return at least one primary key or unique + column. If none are present, an InvalidOperation exception is generated, + and the commands are not generated. + + + + The MySqlCommandBuilder also uses the Connection, + CommandTimeout, and Transaction + properties referenced by the SelectCommand. The user should call + RefreshSchema if any of these properties are modified, or if the + SelectCommand itself is replaced. Otherwise the InsertCommand, + UpdateCommand, and + DeleteCommand properties retain + their previous values. + + + + If you call Dispose, the MySqlCommandBuilder is disassociated + from the MySqlDataAdapter, and the generated commands are no longer used. + + + + Caution must be used when using MySqlCOmmandBuilder on MySql 4.0 systems. With MySql 4.0, + database/schema information is not provided to the connector for a query. This means that + a query that pulls columns from two identically named tables in two or more different databases + will not cause an exception to be thrown but will not work correctly. Even more dangerous + is the situation where your select statement references database X but is executed in + database Y and both databases have tables with similar layouts. This situation can cause + unwanted changes or deletes. + This note does not apply to MySQL versions 4.1 and later. + + + + The following example uses the , along + and , to + select rows from a data source. The example is passed an initialized + , a connection string, a + query string that is a SQL SELECT statement, and a string that is the + name of the database table. The example then creates a MySqlCommandBuilder. + + + Public Shared Function SelectRows(myConnection As String, mySelectQuery As String, myTableName As String) As DataSet + Dim myConn As New MySqlConnection(myConnection) + Dim myDataAdapter As New MySqlDataAdapter() + myDataAdapter.SelectCommand = New MySqlCommand(mySelectQuery, myConn) + Dim cb As SqlCommandBuilder = New MySqlCommandBuilder(myDataAdapter) + + myConn.Open() + + Dim ds As DataSet = New DataSet + myDataAdapter.Fill(ds, myTableName) + + ' Code to modify data in DataSet here + + ' Without the MySqlCommandBuilder this line would fail. + myDataAdapter.Update(ds, myTableName) + + myConn.Close() + End Function 'SelectRows + + + public static DataSet SelectRows(string myConnection, string mySelectQuery, string myTableName) + { + MySqlConnection myConn = new MySqlConnection(myConnection); + MySqlDataAdapter myDataAdapter = new MySqlDataAdapter(); + myDataAdapter.SelectCommand = new MySqlCommand(mySelectQuery, myConn); + MySqlCommandBuilder cb = new MySqlCommandBuilder(myDataAdapter); + + myConn.Open(); + + DataSet ds = new DataSet(); + myDataAdapter.Fill(ds, myTableName); + + //code to modify data in DataSet here + + //Without the MySqlCommandBuilder this line would fail + myDataAdapter.Update(ds, myTableName); + + myConn.Close(); + + return ds; + } + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the associated object. + + The to use. + + + The registers itself as a listener for + events that are generated by the + specified in this property. + + + When you create a new instance MySqlCommandBuilder, any existing + MySqlCommandBuilder associated with this MySqlDataAdapter + is released. + + + + + + Gets or sets a object for which SQL statements are automatically generated. + + A object. + + + The registers itself as a listener for + events that are generated by the + specified in this property. + + + When you create a new instance MySqlCommandBuilder, any existing + MySqlCommandBuilder associated with this MySqlDataAdapter + is released. + + + + + + Retrieves parameter information from the stored procedure specified + in the MySqlCommand and populates the Parameters collection of the + specified MySqlCommand object. + This method is not currently supported since stored procedures are + not available in MySql. + + The MySqlCommand referencing the stored + procedure from which the parameter information is to be derived. + The derived parameters are added to the Parameters collection of the + MySqlCommand. + The command text is not + a valid stored procedure name. + + + + Gets the delete command. + + + + + + Gets the update command. + + + + + + Gets the insert command. + + + + + + + + + + + + + Read a single quoted identifier from the stream + + + + + + + Summary description for CompressedStream. + + + + + Represents an open connection to a MySQL Server database. This class cannot be inherited. + + + A MySqlConnection object represents a session to a MySQL Server + data source. When you create an instance of MySqlConnection, all + properties are set to their initial values. For a list of these values, see the + MySqlConnection constructor. + + + + If the MySqlConnection goes out of scope, it is not closed. Therefore, + you must explicitly close the connection by calling + or . + + + The following example creates a and + a MySqlConnection. The MySqlConnection is opened and set as the + for the MySqlCommand. The example then calls + , and closes the connection. To accomplish this, the ExecuteNonQuery is + passed a connection string and a query string that is a SQL INSERT + statement. + + + Public Sub InsertRow(myConnectionString As String) + ' If the connection string is null, use a default. + If myConnectionString = "" Then + myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass" + End If + Dim myConnection As New MySqlConnection(myConnectionString) + Dim myInsertQuery As String = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)" + Dim myCommand As New MySqlCommand(myInsertQuery) + myCommand.Connection = myConnection + myConnection.Open() + myCommand.ExecuteNonQuery() + myCommand.Connection.Close() + End Sub + + + + + public void InsertRow(string myConnectionString) + { + // If the connection string is null, use a default. + if(myConnectionString == "") + { + myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass"; + } + MySqlConnection myConnection = new MySqlConnection(myConnectionString); + string myInsertQuery = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)"; + MySqlCommand myCommand = new MySqlCommand(myInsertQuery); + myCommand.Connection = myConnection; + myConnection.Open(); + myCommand.ExecuteNonQuery(); + myCommand.Connection.Close(); + } + + + + + + Occurs when MySQL returns warnings as a result of executing a command or query. + + + + + Initializes a new instance of the class. + + When a new instance of is created, the read/write + properties are set to the following initial values unless they are specifically + set using their associated keywords in the property. + + + + Properties + Initial Value + + + + + + empty string ("") + + + + + + 15 + + + + + + empty string ("") + + + + + + empty string ("") + + + + + + empty string ("") + + + + You can change the value for these properties only by using the ConnectionString property. + + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class when given a string containing the connection string. + + When a new instance of is created, the read/write + properties are set to the following initial values unless they are specifically + set using their associated keywords in the property. + + + + Properties + Initial Value + + + + + + empty string ("") + + + + + + 15 + + + + + + empty string ("") + + + + + + empty string ("") + + + + + + empty string ("") + + + + You can change the value for these properties only by using the ConnectionString property. + + The connection properties used to open the MySQL database. + + + + Returns the id of the server thread this connection is executing on + + + + + Gets the name of the MySQL server to which to connect. + + + + + Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. + The value set is less than 0. + A value of 0 indicates no limit, and should be avoided in a + because an attempt to connect + will wait indefinitely. + + The following example creates a MySqlConnection + and sets some of its properties in the connection string. + + Public Sub CreateSqlConnection() + Dim myConnection As New MySqlConnection() + myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30" + myConnection.Open() + End Sub + + + public void CreateSqlConnection() + { + MySqlConnection myConnection = new MySqlConnection(); + myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30"; + myConnection.Open(); + } + + + + + Gets the name of the current database or the database to be used after a connection is opened.The name of the current database or the name of the database to be used after a connection is opened. The default value is an empty string. + + The Database property does not update dynamically. + If you change the current database using a SQL statement, then this property + may reflect the wrong value. If you change the current database using the + method, this property is updated to reflect the new database. + + + The following example creates a and displays + some of its read-only properties. + + + Public Sub CreateMySqlConnection() + Dim myConnString As String = _ + "Persist Security Info=False;database=test;server=localhost;user id=joeuser;pwd=pass" + Dim myConnection As New MySqlConnection( myConnString ) + myConnection.Open() + MessageBox.Show( "Server Version: " + myConnection.ServerVersion _ + + ControlChars.NewLine + "Database: " + myConnection.Database ) + myConnection.ChangeDatabase( "test2" ) + MessageBox.Show( "ServerVersion: " + myConnection.ServerVersion _ + + ControlChars.NewLine + "Database: " + myConnection.Database ) + myConnection.Close() + End Sub + + + + public void CreateMySqlConnection() + { + string myConnString = + "Persist Security Info=False;database=test;server=localhost;user id=joeuser;pwd=pass"; + MySqlConnection myConnection = new MySqlConnection( myConnString ); + myConnection.Open(); + MessageBox.Show( "Server Version: " + myConnection.ServerVersion + + "\nDatabase: " + myConnection.Database ); + myConnection.ChangeDatabase( "test2" ); + MessageBox.Show( "ServerVersion: " + myConnection.ServerVersion + + "\nDatabase: " + myConnection.Database ); + myConnection.Close(); + } + + + + + + Indicates if this connection should use compression when communicating with the server. + + + + Gets the current state of the connection. + A bitwise combination of the values. The default is Closed. + + The allowed state changes are: + + + From Closed to Open, using the Open method of the connection object. + + + From Open to Closed, using either the Close method or the Dispose method of the connection object. + + + + The following example creates a , opens it, + displays some of its properties, then closes the connection. + + + Public Sub CreateMySqlConnection(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion _ + + ControlChars.Cr + "State: " + myConnection.State.ToString()) + myConnection.Close() + End Sub + + + public void CreateMySqlConnection(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion + + "\nState: " + myConnection.State.ToString()); + myConnection.Close(); + } + + + + + Gets a string containing the version of the MySQL server to which the client is connected.The version of the instance of MySQL.The connection is closed. + The following example creates a , opens it, + displays some of its properties, then closes the connection. + + + Public Sub CreateMySqlConnection(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion _ + + ControlChars.Cr + "State: " + myConnection.State.ToString()) + myConnection.Close() + End Sub + + + public void CreateMySqlConnection(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion + + "\nState: " + myConnection.State.ToString()); + myConnection.Close(); + } + + + + + + Gets or sets the string used to connect to a MySQL Server database. + + + The ConnectionString returned may not be exactly like what was originally + set but will be indentical in terms of keyword/value pairs. Security information + will not be included unless the Persist Security Info value is set to true. + + + You can use the ConnectionString property to connect to a database. + The following example illustrates a typical connection string. + + "Persist Security Info=False;database=MyDB;server=MySqlServer;user id=myUser;Password=myPass" + + The ConnectionString property can be set only when the connection is + closed. Many of the connection string values have corresponding read-only + properties. When the connection string is set, all of these properties are + updated, except when an error is detected. In this case, none of the properties + are updated. properties return only those settings contained in the + ConnectionString. + + + To connect to a local machine, specify "localhost" for the server. If you do not + specify a server, localhost is assumed. + + + Resetting the ConnectionString on a closed connection resets all + connection string values (and related properties) including the password. For + example, if you set a connection string that includes "Database= MyDb", and + then reset the connection string to "Data Source=myserver;User Id=myUser;Password=myPass", + the property is no longer set to MyDb. + + + The connection string is parsed immediately after being set. If errors in + syntax are found when parsing, a runtime exception, such as , + is generated. Other errors can be found only when an attempt is made to open the + connection. + + + The basic format of a connection string consists of a series of keyword/value + pairs separated by semicolons. The equal sign (=) connects each keyword and its + value. To include values that contain a semicolon, single-quote character, or + double-quote character, the value must be enclosed in double quotes. If the + value contains both a semicolon and a double-quote character, the value can be + enclosed in single quotes. The single quote is also useful if the value begins + with a double-quote character. Conversely, the double quote can be used if the + value begins with a single quote. If the value contains both single-quote and + double-quote characters, the quote character used to enclose the value must be + doubled each time it occurs within the value. + + + To include preceding or trailing spaces in the string value, the value must + be enclosed in either single quotes or double quotes. Any leading or trailing + spaces around integer, Boolean, or enumerated values are ignored, even if + enclosed in quotes. However, spaces within a string literal keyword or value are + preserved. Using .NET Framework version 1.1, single or double quotes may be used + within a connection string without using delimiters (for example, Data Source= + my'Server or Data Source= my"Server), unless a quote character is the first or + last character in the value. + + + To include an equal sign (=) in a keyword or value, it must be preceded by + another equal sign. For example, in the hypothetical connection string + + "key==word=value" + + the keyword is "key=word" and the value is "value". + + If a specific keyword in a keyword= value pair occurs multiple times in a + connection string, the last occurrence listed is used in the value set. + + Keywords are not case sensitive. + + The following table lists the valid names for keyword values within the + ConnectionString. + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefaultDescription
+ Connect Timeout -or- Connection Timeout + 15 + The length of time (in seconds) to wait for a connection to the server before + terminating the attempt and generating an error. +
+ Host -or- Server -or- Data Source -or- + DataSource -or- Address -or- Addr -or- + Network Address + localhost + + The name or network address of the instance of MySQL to which to connect. Multiple hosts can be + specified separated by &. This can be useful where multiple MySQL servers are configured for replication + and you are not concerned about the precise server you are connecting to. No attempt is made by the provider to + synchronize writes to the database so care should be taken when using this option. + + + In Unix environment with Mono, this can be a fully qualified path to MySQL socket filename. With this configuration, the Unix socket will be used instead of TCP/IP socket. + Currently only a single socket name can be given so accessing MySQL in a replicated environment using Unix sockets is not currently supported. + +
Port3306 + The port MySQL is using to listen for connections. This value is ignored if the connection protocol + is anything but socket. +
Protocolsocket + Specifies the type of connection to make to the server.Values can be: + socket or tcp for a socket connection
+ pipe for a named pipe connection
+ unix for a Unix socket connection
+ memory to use MySQL shared memory +
+ CharSet -or Character Set + + + Specifies the character set that should be used to encode all queries sent to the server. + Resultsets are still returned in the character set of the data returned. +
LoggingfalseWhen true, various pieces of information is output to any configured TraceListeners.
Allow Batchtrue + When true, multiple SQL statements can be sent with one command execution.

+ -Note-
+ Starting with MySQL 4.1.1, batch statements should be separated by the server-defined seperator character.
+ Commands sent to earlier versions of MySQL should be seperated with ';'. +
Encryptfalse + When true, SSL/TLS encryption is used for all data sent between the + client and server if the server has a certificate installed. Recognized values + are true, false, yes, and no. +
+ Initial Catalog -or- Database + mysqlThe name of the database to use intially
+ Password -or- pwd + + The password for the MySQL account being used.
Persist Security Infofalse + When set to false or no (strongly recommended), security-sensitive + information, such as the password, is not returned as part of the connection if + the connection is open or has ever been in an open state. Resetting the + connection string resets all connection string values including the password. + Recognized values are true, false, yes, and no. +
+ User Id -or- Username -or- Uid -or- User name + + The MySQL login account being used.
Shared Memory NameMYSQLThe name of the shared memory object to use for communication if the connection protocol is set to memory.
Allow Zero Datetimefalse + True to have MySqlDataReader.GetValue() return a MySqlDateTime for date or datetime columns that have illegal values. + False will cause a DateTime object to be returned for legal values and an exception will be thrown for illegal values. +
Convert Zero Datetimefalse + True to have MySqlDataReader.GetValue() and MySqlDataReader.GetDateTime() + return DateTime.MinValue for date or datetime columns that have illegal values. +
+ Pipe Name -or- Pipe + mysql + When set to the name of a named pipe, the MySqlConnection will attempt to connect to MySQL + on that named pipe.

This settings only applies to the Windows platform. +
+ Use Performance Monitor -or- UsePerformanceMonitor + false + Posts performance data that can be tracked using perfmon +
+ Procedure Cache Size + 25 + How many stored procedure definitions can be held in the cache +
+ Ignore Prepare + true + Instructs the provider to ignore any attempts to prepare commands. This option + was added to allow a user to disable prepared statements in an entire application + without modifying the code. A user might want to do this if errors or bugs are + encountered with MySQL prepared statements. +
Use Procedure Bodiestrue + Instructs the provider to attempt to call the procedure without first resolving the metadata. This + is useful in situations where the calling user does not have access to the mysql.proc table. To + use this mode, the parameters for the procedure must be added to the command in the same order + as they appear in the procedure definition and their types must be explicitly set. +
Auto Enlisttrue + Indicates whether the connection should automatically enlist in the current transaction, + if there is one. +
Respect Binary Flagstrue + Indicates whether the connection should respect all binary flags sent to the client + as part of column metadata. False will cause the connector to behave like + Connector/Net 5.0 and earlier. +
BlobAsUTF8IncludePatternnull + Pattern that should be used to indicate which blob columns should be treated as UTF-8. +
BlobAsUTF8ExcludePatternnull + Pattern that should be used to indicate which blob columns should not be treated as UTF-8. +
Default Command Timeout30 + The default timeout that new MySqlCommand objects will use unless changed. +
Allow User Variablesfalse + Should the provider expect user variables in the SQL. +
Interactive -or- Interactive Sessionfalse + Should this session be considered interactive? +
Functions Return Stringfalse + Set this option to true to force the return value of SQL functions to be string. +
Use Affected Rowsfalse + Set this option to true to cause the affected rows reported to reflect only the + rows that are actually changed. By default, the number of rows that are matched + is returned. +
+
+ + The following table lists the valid names for connection pooling values within + the ConnectionString. For more information about connection pooling, see + Connection Pooling for the MySql Data Provider. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDefaultDescription
Connection Lifetime0 + When a connection is returned to the pool, its creation time is compared with + the current time, and the connection is destroyed if that time span (in seconds) + exceeds the value specified by Connection Lifetime. This is useful in + clustered configurations to force load balancing between a running server and a + server just brought online. + + A value of zero (0) causes pooled connections to have the maximum connection + timeout. + +
Max Pool Size100The maximum number of connections allowed in the pool.
Min Pool Size0The minimum number of connections allowed in the pool.
Poolingtrue + When true, the MySqlConnection object is drawn from the appropriate + pool, or if necessary, is created and added to the appropriate pool. Recognized + values are true, false, yes, and no. +
Connection Resetfalse + Specifies whether the database connection should be reset when being + drawn from the pool. Leaving this as false will yeild much faster + connection opens but the user should understand the side effects + of doing this such as temporary tables and user variables from the previous + session not being cleared out. +
Cache Server Propertiesfalse + Specifies whether the server variables are cached between pooled connections. + On systems where the variables change infrequently and there are lots of + connection attempts, this can speed up things dramatically. +
+
+ + When setting keyword or connection pooling values that require a Boolean + value, you can use 'yes' instead of 'true', and 'no' instead of 'false'. + + + Note The MySql Data Provider uses the native socket protocol to + communicate with MySQL. Therefore, it does not support the use of an ODBC data source name (DSN) when + connecting to MySQL because it does not add an ODBC layer. + + + CAUTION In this release, the application should use caution when constructing a + connection string based on user input (for example when retrieving user ID and password information from a + dialog box, and appending it to the connection string). The application should + ensure that a user cannot embed extra connection string parameters in these + values (for example, entering a password as "validpassword;database=somedb" in + an attempt to attach to a different database). + +
+ The following example creates a and sets some of its properties + + Public Sub CreateConnection() + Dim myConnection As New MySqlConnection() + myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass" + myConnection.Open() + End Sub 'CreateConnection + + + public void CreateConnection() + { + MySqlConnection myConnection = new MySqlConnection(); + myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass"; + myConnection.Open(); + } + + + The following example creates a in Unix environment with Mono installed. MySQL socket filename used in this example is "/var/lib/mysql/mysql.sock". The actual filename depends on your MySQL configuration. + + Public Sub CreateConnection() + Dim myConnection As New MySqlConnection() + myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass" + myConnection.Open() + End Sub 'CreateConnection + + + public void CreateConnection() + { + MySqlConnection myConnection = new MySqlConnection(); + myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass"; + myConnection.Open(); + } + + +
+ + + Enlists in the specified transaction. + + + A reference to an existing in which to enlist. + + + + Begins a database transaction.An object representing the new transaction.Parallel transactions are not supported. + This command is equivalent to the MySQL BEGIN TRANSACTION command. + + You must explicitly commit or roll back the transaction using the or + method. + + If you do not specify an isolation level, the default isolation level is used. To specify an isolation + level with the method, use the overload that takes the iso parameter. Also + note that any attempt to begin a transaction while a transaction is in progress will throw an exception on MySQL 4.1 and higher. + On MySQL 4.0, an exception will not be thrown because servers 4.0 and earlier did not report their transacation status. + + + + The following example creates a and a + . It also demonstrates how to use the BeginTransaction, a + , and methods. + + Public Sub RunTransaction(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + + Dim myCommand As MySqlCommand = myConnection.CreateCommand() + Dim myTrans As MySqlTransaction + + ' Start a local transaction + myTrans = myConnection.BeginTransaction() + ' Must assign both transaction object and connection + ' to Command object for a pending local transaction + myCommand.Connection = myConnection + myCommand.Transaction = myTrans + + Try + myCommand.CommandText = "Insert into Test (id, desc) VALUES (100, 'Description')" + myCommand.ExecuteNonQuery() + myCommand.CommandText = "Insert into Test (id, desc) VALUES (101, 'Description')" + myCommand.ExecuteNonQuery() + myTrans.Commit() + Console.WriteLine("Both records are written to database.") + Catch e As Exception + Try + myTrans.Rollback() + Catch ex As MySqlException + If Not myTrans.Connection Is Nothing Then + Console.WriteLine("An exception of type " + ex.GetType().ToString() + _ + " was encountered while attempting to roll back the transaction.") + End If + End Try + + Console.WriteLine("An exception of type " + e.GetType().ToString() + _ + "was encountered while inserting the data.") + Console.WriteLine("Neither record was written to database.") + Finally + myConnection.Close() + End Try + End Sub + + + public void RunTransaction(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + + MySqlCommand myCommand = myConnection.CreateCommand(); + MySqlTransaction myTrans; + + // Start a local transaction + myTrans = myConnection.BeginTransaction(); + // Must assign both transaction object and connection + // to Command object for a pending local transaction + myCommand.Connection = myConnection; + myCommand.Transaction = myTrans; + + try + { + myCommand.CommandText = "insert into Test (id, desc) VALUES (100, 'Description')"; + myCommand.ExecuteNonQuery(); + myCommand.CommandText = "insert into Test (id, desc) VALUES (101, 'Description')"; + myCommand.ExecuteNonQuery(); + myTrans.Commit(); + Console.WriteLine("Both records are written to database."); + } + catch(Exception e) + { + try + { + myTrans.Rollback(); + } + catch (SqlException ex) + { + if (myTrans.Connection != null) + { + Console.WriteLine("An exception of type " + ex.GetType() + + " was encountered while attempting to roll back the transaction."); + } + } + + Console.WriteLine("An exception of type " + e.GetType() + + " was encountered while inserting the data."); + Console.WriteLine("Neither record was written to database."); + } + finally + { + myConnection.Close(); + } + } + + + + + Begins a database transaction with the specified isolation level.The isolation level under which the transaction should run. An object representing the new transaction.Parallel exceptions are not supported. + This command is equivalent to the MySQL BEGIN TRANSACTION command. + + You must explicitly commit or roll back the transaction using the or + method. + + If you do not specify an isolation level, the default isolation level is used. To specify an isolation + level with the method, use the overload that takes the iso parameter. + Also note that any attempt to begin a transaction while a transaction is in progress will throw an exception on MySQL 4.1 and higher. + On MySQL 4.0, an exception will not be thrown because servers 4.0 and earlier did not report their transacation status. + + + + The following example creates a and a + . It also demonstrates how to use the BeginTransaction, a + , and methods. + + Public Sub RunTransaction(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + + Dim myCommand As MySqlCommand = myConnection.CreateCommand() + Dim myTrans As MySqlTransaction + + ' Start a local transaction + myTrans = myConnection.BeginTransaction() + ' Must assign both transaction object and connection + ' to Command object for a pending local transaction + myCommand.Connection = myConnection + myCommand.Transaction = myTrans + + Try + myCommand.CommandText = "Insert into Test (id, desc) VALUES (100, 'Description')" + myCommand.ExecuteNonQuery() + myCommand.CommandText = "Insert into Test (id, desc) VALUES (101, 'Description')" + myCommand.ExecuteNonQuery() + myTrans.Commit() + Console.WriteLine("Both records are written to database.") + Catch e As Exception + Try + myTrans.Rollback() + Catch ex As MySqlException + If Not myTrans.Connection Is Nothing Then + Console.WriteLine("An exception of type " + ex.GetType().ToString() + _ + " was encountered while attempting to roll back the transaction.") + End If + End Try + + Console.WriteLine("An exception of type " + e.GetType().ToString() + _ + "was encountered while inserting the data.") + Console.WriteLine("Neither record was written to database.") + Finally + myConnection.Close() + End Try + End Sub + + + public void RunTransaction(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + + MySqlCommand myCommand = myConnection.CreateCommand(); + MySqlTransaction myTrans; + + // Start a local transaction + myTrans = myConnection.BeginTransaction(); + // Must assign both transaction object and connection + // to Command object for a pending local transaction + myCommand.Connection = myConnection; + myCommand.Transaction = myTrans; + + try + { + myCommand.CommandText = "insert into Test (id, desc) VALUES (100, 'Description')"; + myCommand.ExecuteNonQuery(); + myCommand.CommandText = "insert into Test (id, desc) VALUES (101, 'Description')"; + myCommand.ExecuteNonQuery(); + myTrans.Commit(); + Console.WriteLine("Both records are written to database."); + } + catch(Exception e) + { + try + { + myTrans.Rollback(); + } + catch (SqlException ex) + { + if (myTrans.Connection != null) + { + Console.WriteLine("An exception of type " + ex.GetType() + + " was encountered while attempting to roll back the transaction."); + } + } + + Console.WriteLine("An exception of type " + e.GetType() + + " was encountered while inserting the data."); + Console.WriteLine("Neither record was written to database."); + } + finally + { + myConnection.Close(); + } + } + + + + + Changes the current database for an open MySqlConnection.The name of the database to use. + + The value supplied in the database parameter must be a valid database + name. The database parameter cannot contain a null value, an empty + string, or a string with only blank characters. + + + + When you are using connection pooling against MySQL, and you close + the connection, it is returned to the connection pool. The next time the + connection is retrieved from the pool, the reset connection request + executes before the user performs any operations. + + The database name is not valid.The connection is not open.Cannot change the database. + The following example creates a and displays + some of its read-only properties. + + + Public Sub CreateMySqlConnection() + Dim myConnString As String = _ + "Persist Security Info=False;database=test;server=localhost;user id=joeuser;pwd=pass" + Dim myConnection As New MySqlConnection( myConnString ) + myConnection.Open() + MessageBox.Show( "Server Version: " + myConnection.ServerVersion _ + + ControlChars.NewLine + "Database: " + myConnection.Database ) + myConnection.ChangeDatabase( "test2" ) + MessageBox.Show( "ServerVersion: " + myConnection.ServerVersion _ + + ControlChars.NewLine + "Database: " + myConnection.Database ) + myConnection.Close() + End Sub + + + + public void CreateMySqlConnection() + { + string myConnString = + "Persist Security Info=False;database=test;server=localhost;user id=joeuser;pwd=pass"; + MySqlConnection myConnection = new MySqlConnection( myConnString ); + myConnection.Open(); + MessageBox.Show( "Server Version: " + myConnection.ServerVersion + + "\nDatabase: " + myConnection.Database ); + myConnection.ChangeDatabase( "test2" ); + MessageBox.Show( "ServerVersion: " + myConnection.ServerVersion + + "\nDatabase: " + myConnection.Database ); + myConnection.Close(); + } + + + + + + Ping + + + + + Opens a database connection with the property settings specified by the ConnectionString.Cannot open a connection without specifying a data source or server.A connection-level error occurred while opening the connection. + + The draws an open connection from the connection pool if one is available. + Otherwise, it establishes a new connection to an instance of MySQL. + + + The following example creates a , opens it, + displays some of its properties, then closes the connection. + + + Public Sub CreateMySqlConnection(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion _ + + ControlChars.Cr + "State: " + myConnection.State.ToString()) + myConnection.Close() + End Sub + + + public void CreateMySqlConnection(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion + + "\nState: " + myConnection.State.ToString()); + myConnection.Close(); + } + + + + + + Creates and returns a object associated with the . + + A object. + + + + + Creates a new MySqlConnection object with the exact same ConnectionString value + + A cloned MySqlConnection object + + + Closes the connection to the database. This is the preferred method of closing any open connection. + + The Close method rolls back any pending transactions. It then releases + the connection to the connection pool, or closes the connection if connection + pooling is disabled. + + + An application can call Close more than one time. No exception is + generated. + + + The following example creates a , opens it, + displays some of its properties, then closes the connection. + + + Public Sub CreateMySqlConnection(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion _ + + ControlChars.Cr + "State: " + myConnection.State.ToString()) + myConnection.Close() + End Sub + + + public void CreateMySqlConnection(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + MessageBox.Show("ServerVersion: " + myConnection.ServerVersion + + "\nState: " + myConnection.State.ToString()); + myConnection.Close(); + } + + + + + + Sets query timeout. If timeout has been set prior and not + yet cleared ClearCommandTimeout(), it has no effect. + + timeout in seconds + true if + + + + Clears query timeout, allowing next SetCommandTimeout() to succeed. + + + + Empties the connection pool associated with the specified connection. + The associated with the pool to be cleared. + + + ClearPool clears the connection pool that is associated with the connection. + If additional connections associated with connection are in use at the time of the call, + they are marked appropriately and are discarded (instead of being returned to the pool) + when Close is called on them. + + + + + Clears all connection pools. + + ClearAllPools essentially performs a on all current connection + pools. + + + + + + Async version of BeginTransaction + + An object representing the new transaction. + + + + Async version of BeginTransaction + + The isolation level under which the transaction should run. + An object representing the new transaction. + + + + Async version of ChangeDataBase + + The name of the database to use. + + + + + Async version of Close + + + + + + Async version of ClearPool + + The connection associated with the pool to be cleared. + + + + + Async version of ClearAllPools + + + + + + Async version of GetSchemaCollection + + Name of the collection + Values to restrict + A schema collection + + + + Returns schema information for the data source of this . + + A that contains schema information. + + + + Returns schema information for the data source of this + using the specified string for the schema name. + + Specifies the name of the schema to return. + A that contains schema information. + + + + Returns schema information for the data source of this + using the specified string for the schema name and the specified string array + for the restriction values. + + Specifies the name of the schema to return. + Specifies a set of restriction values for the requested schema. + A that contains schema information. + + + + Represents the method that will handle the event of a + . + + + + + Provides data for the InfoMessage event. This class cannot be inherited. + + + + + + + + + + IDisposable wrapper around SetCommandTimeout and ClearCommandTimeout + functionality + + + + + Summary description for Crypt. + + + + + Simple XOR scramble + + Source array + Index inside source array + Destination array + Index inside destination array + Password used to xor the bits + Number of bytes to scramble + + + + Returns a byte array containing the proper encryption of the + given password/seed according to the new 4.1.1 authentication scheme. + + + + + + + + Encrypts a password using the MySql encryption scheme + + The password to encrypt + The encryption seed the server gave us + Indicates if we should use the old or new encryption scheme + + + + + Hashes a password using the algorithm from Monty's code. + The first element in the return is the result of the "old" hash. + The second element is the rest of the "new" hash. + + Password to be hashed + Two element array containing the hashed values + + + + Represents a set of data commands and a database connection that are used to fill a dataset and update a MySQL database. This class cannot be inherited. + + + The MySQLDataAdapter, serves as a bridge between a + and MySQL for retrieving and saving data. The MySQLDataAdapter provides this + bridge by mapping , which changes the data in the + DataSet to match the data in the data source, and , + which changes the data in the data source to match the data in the DataSet, + using the appropriate SQL statements against the data source. + + + When the MySQLDataAdapter fills a DataSet, it will create the necessary + tables and columns for the returned data if they do not already exist. However, primary + key information will not be included in the implicitly created schema unless the + property is set to . + You may also have the MySQLDataAdapter create the schema of the DataSet, + including primary key information, before filling it with data using . + + + MySQLDataAdapter is used in conjunction with + and to increase performance when connecting to a MySQL database. + + + The MySQLDataAdapter also includes the , + , , + , and + properties to facilitate the loading and updating of data. + + + When an instance of MySQLDataAdapter is created, the read/write properties + are set to initial values. For a list of these values, see the MySQLDataAdapter + constructor. + + + Please be aware that the class allows only + Int16, Int32, and Int64 to have the AutoIncrement property set. + If you plan to use autoincremement columns with MySQL, you should consider + using signed integer columns. + + + The following example creates a and a . + The MySqlConnection is opened and set as the for the + MySqlCommand. The example then calls , and closes + the connection. To accomplish this, the ExecuteNonQuery is + passed a connection string and a query string that is a SQL INSERT + statement. + + Public Function SelectRows(dataSet As DataSet, connection As String, query As String) As DataSet + Dim conn As New MySqlConnection(connection) + Dim adapter As New MySqlDataAdapter() + adapter.SelectCommand = new MySqlCommand(query, conn) + adapter.Fill(dataset) + Return dataset + End Function + + + public DataSet SelectRows(DataSet dataset,string connection,string query) + { + MySqlConnection conn = new MySqlConnection(connection); + MySqlDataAdapter adapter = new MySqlDataAdapter(); + adapter.SelectCommand = new MySqlCommand(query, conn); + adapter.Fill(dataset); + return dataset; + } + + + + + + Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires. + + + + + Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires. + + + + + Initializes a new instance of the MySqlDataAdapter class. + + + When an instance of is created, + the following read/write properties are set to the following initial + values. + + + + Properties + Initial Value + + + + + + + MissingMappingAction.Passthrough + + + + + + + + MissingSchemaAction.Add + + + + + You can change the value of any of these properties through a separate call + to the property. + + + The following example creates a and sets some of + its properties. + + Public Sub CreateSqlDataAdapter() + Dim conn As MySqlConnection = New MySqlConnection("Data Source=localhost;" & _ + "database=test") + Dim da As MySqlDataAdapter = New MySqlDataAdapter + da.MissingSchemaAction = MissingSchemaAction.AddWithKey + + da.SelectCommand = New MySqlCommand("SELECT id, name FROM mytable", conn) + da.InsertCommand = New MySqlCommand("INSERT INTO mytable (id, name) " & _ + "VALUES (@id, @name)", conn) + da.UpdateCommand = New MySqlCommand("UPDATE mytable SET id=@id, name=@name " & _ + "WHERE id=@oldId", conn) + da.DeleteCommand = New MySqlCommand("DELETE FROM mytable WHERE id=@id", conn) + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + End Sub + + + public static void CreateSqlDataAdapter() + { + MySqlConnection conn = new MySqlConnection("Data Source=localhost;database=test"); + MySqlDataAdapter da = new MySqlDataAdapter(); + da.MissingSchemaAction = MissingSchemaAction.AddWithKey; + + da.SelectCommand = new MySqlCommand("SELECT id, name FROM mytable", conn); + da.InsertCommand = new MySqlCommand("INSERT INTO mytable (id, name) " + + "VALUES (@id, @name)", conn); + da.UpdateCommand = new MySqlCommand("UPDATE mytable SET id=@id, name=@name " + + "WHERE id=@oldId", conn); + da.DeleteCommand = new MySqlCommand("DELETE FROM mytable WHERE id=@id", conn); + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + } + + + + + + Initializes a new instance of the class with + the specified as the + property. + + that is a SQL SELECT statement or stored procedure and is set + as the property of the . + + + When an instance of is created, + the following read/write properties are set to the following initial + values. + + + + Properties + Initial Value + + + + + + + MissingMappingAction.Passthrough + + + + + + + + MissingSchemaAction.Add + + + + + You can change the value of any of these properties through a separate call + to the property. + + + When SelectCommand (or any of the other command properties) is assigned + to a previously created , the MySqlCommand is not cloned. + The SelectCommand maintains a reference to the previously created MySqlCommand + object. + + + The following example creates a and sets some of + its properties. + + Public Sub CreateSqlDataAdapter() + Dim conn As MySqlConnection = New MySqlConnection("Data Source=localhost;" & _ + "database=test") + Dim cmd as new MySqlCommand("SELECT id, name FROM mytable", conn) + Dim da As MySqlDataAdapter = New MySqlDataAdapter(cmd) + da.MissingSchemaAction = MissingSchemaAction.AddWithKey + + da.InsertCommand = New MySqlCommand("INSERT INTO mytable (id, name) " & _ + "VALUES (@id, @name)", conn) + da.UpdateCommand = New MySqlCommand("UPDATE mytable SET id=@id, name=@name " & _ + "WHERE id=@oldId", conn) + da.DeleteCommand = New MySqlCommand("DELETE FROM mytable WHERE id=@id", conn) + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + End Sub + + + public static void CreateSqlDataAdapter() + { + MySqlConnection conn = new MySqlConnection("Data Source=localhost;database=test"); + MySqlCommand cmd = new MySqlCommand("SELECT id, name FROM mytable", conn); + MySqlDataAdapter da = new MySqlDataAdapter(cmd); + da.MissingSchemaAction = MissingSchemaAction.AddWithKey; + + da.InsertCommand = new MySqlCommand("INSERT INTO mytable (id, name) " + + "VALUES (@id, @name)", conn); + da.UpdateCommand = new MySqlCommand("UPDATE mytable SET id=@id, name=@name " + + "WHERE id=@oldId", conn); + da.DeleteCommand = new MySqlCommand("DELETE FROM mytable WHERE id=@id", conn); + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + } + + + + + + Initializes a new instance of the class with + a and a object. + + A String that is a SQL SELECT statement or stored procedure to be used by + the property of the . + + A that represents the connection. + + + This implementation of the opens and closes a + if it is not already open. This can be useful in a an application that must call the + method for two or more MySqlDataAdapter objects. + If the MySqlConnection is already open, you must explicitly call + or to close it. + + + When an instance of is created, + the following read/write properties are set to the following initial + values. + + + + Properties + Initial Value + + + + + + + MissingMappingAction.Passthrough + + + + + + + + MissingSchemaAction.Add + + + + + You can change the value of any of these properties through a separate call + to the property. + + + The following example creates a and sets some of + its properties. + + Public Sub CreateSqlDataAdapter() + Dim conn As MySqlConnection = New MySqlConnection("Data Source=localhost;" & _ + "database=test") + Dim da As MySqlDataAdapter = New MySqlDataAdapter("SELECT id, name FROM mytable", conn) + da.MissingSchemaAction = MissingSchemaAction.AddWithKey + + da.InsertCommand = New MySqlCommand("INSERT INTO mytable (id, name) " & _ + "VALUES (@id, @name)", conn) + da.UpdateCommand = New MySqlCommand("UPDATE mytable SET id=@id, name=@name " & _ + "WHERE id=@oldId", conn) + da.DeleteCommand = New MySqlCommand("DELETE FROM mytable WHERE id=@id", conn) + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + End Sub + + + public static void CreateSqlDataAdapter() + { + MySqlConnection conn = new MySqlConnection("Data Source=localhost;database=test"); + MySqlDataAdapter da = new MySqlDataAdapter("SELECT id, name FROM mytable", conn); + da.MissingSchemaAction = MissingSchemaAction.AddWithKey; + + da.InsertCommand = new MySqlCommand("INSERT INTO mytable (id, name) " + + "VALUES (@id, @name)", conn); + da.UpdateCommand = new MySqlCommand("UPDATE mytable SET id=@id, name=@name " + + "WHERE id=@oldId", conn); + da.DeleteCommand = new MySqlCommand("DELETE FROM mytable WHERE id=@id", conn); + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + } + + + + + + Initializes a new instance of the class with + a and a connection string. + + A that is a SQL SELECT statement or stored procedure to + be used by the property of the . + The connection string + + When an instance of is created, + the following read/write properties are set to the following initial + values. + + + + Properties + Initial Value + + + + + + + MissingMappingAction.Passthrough + + + + + + + + MissingSchemaAction.Add + + + + + You can change the value of any of these properties through a separate call + to the property. + + + The following example creates a and sets some of + its properties. + + Public Sub CreateSqlDataAdapter() + Dim da As MySqlDataAdapter = New MySqlDataAdapter("SELECT id, name FROM mytable", "Data Source=localhost;database=test") + Dim conn As MySqlConnection = da.SelectCommand.Connection + da.MissingSchemaAction = MissingSchemaAction.AddWithKey + + da.InsertCommand = New MySqlCommand("INSERT INTO mytable (id, name) " & _ + "VALUES (@id, @name)", conn) + da.UpdateCommand = New MySqlCommand("UPDATE mytable SET id=@id, name=@name " & _ + "WHERE id=@oldId", conn) + da.DeleteCommand = New MySqlCommand("DELETE FROM mytable WHERE id=@id", conn) + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name") + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original + End Sub + + + public static void CreateSqlDataAdapter() + { + MySqlDataAdapter da = new MySqlDataAdapter("SELECT id, name FROM mytable", "Data Source=localhost;database=test"); + MySqlConnection conn = da.SelectCommand.Connection; + da.MissingSchemaAction = MissingSchemaAction.AddWithKey; + + da.InsertCommand = new MySqlCommand("INSERT INTO mytable (id, name) " + + "VALUES (@id, @name)", conn); + da.UpdateCommand = new MySqlCommand("UPDATE mytable SET id=@id, name=@name " + + "WHERE id=@oldId", conn); + da.DeleteCommand = new MySqlCommand("DELETE FROM mytable WHERE id=@id", conn); + + da.InsertCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.InsertCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + + da.UpdateCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + da.UpdateCommand.Parameters.Add("@name", MySqlDbType.VarChar, 40, "name"); + da.UpdateCommand.Parameters.Add("@oldId", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + + da.DeleteCommand.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id").SourceVersion = DataRowVersion.Original; + } + + + + + + Gets or sets a SQL statement or stored procedure used to delete records from the data set. + + A used during to delete records in the + database that correspond to deleted rows in the . + + + During , if this property is not set and primary key information + is present in the , the DeleteCommand can be generated + automatically if you set the property and use the + . Then, any additional commands that you do not set are + generated by the MySqlCommandBuilder. This generation logic requires key column + information to be present in the DataSet. + + + When DeleteCommand is assigned to a previously created , + the MySqlCommand is not cloned. The DeleteCommand maintains a reference + to the previously created MySqlCommand object. + + + The following example creates a and sets the + and DeleteCommand properties. It assumes you have already + created a object. + + Public Shared Function CreateCustomerAdapter(conn As MySqlConnection) As MySqlDataAdapter + + Dim da As MySqlDataAdapter = New MySqlDataAdapter() + Dim cmd As MySqlCommand + Dim parm As MySqlParameter + + ' Create the SelectCommand. + cmd = New MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn) + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15) + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15) + + da.SelectCommand = cmd + + ' Create the DeleteCommand. + cmd = New MySqlCommand("DELETE FROM mytable WHERE id=@id", conn) + + parm = cmd.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id") + parm.SourceVersion = DataRowVersion.Original + + da.DeleteCommand = cmd + + Return da + End Function + + + public static MySqlDataAdapter CreateCustomerAdapter(MySqlConnection conn) + { + MySqlDataAdapter da = new MySqlDataAdapter(); + MySqlCommand cmd; + MySqlParameter parm; + + // Create the SelectCommand. + cmd = new MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn); + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15); + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15); + + da.SelectCommand = cmd; + + // Create the DeleteCommand. + cmd = new MySqlCommand("DELETE FROM mytable WHERE id=@id", conn); + + parm = cmd.Parameters.Add("@id", MySqlDbType.VarChar, 5, "id"); + parm.SourceVersion = DataRowVersion.Original; + + da.DeleteCommand = cmd; + + return da; + } + + + + + + Gets or sets a SQL statement or stored procedure used to insert records into the data set. + + A used during to insert records into the + database that correspond to new rows in the . + + + During , if this property is not set and primary key information + is present in the , the InsertCommand can be generated + automatically if you set the property and use the + . Then, any additional commands that you do not set are + generated by the MySqlCommandBuilder. This generation logic requires key column + information to be present in the DataSet. + + + When InsertCommand is assigned to a previously created , + the MySqlCommand is not cloned. The InsertCommand maintains a reference + to the previously created MySqlCommand object. + + + If execution of this command returns rows, these rows may be added to the DataSet + depending on how you set the property of the MySqlCommand object. + + + The following example creates a and sets the + and InsertCommand properties. It assumes you have already + created a object. + + Public Shared Function CreateCustomerAdapter(conn As MySqlConnection) As MySqlDataAdapter + + Dim da As MySqlDataAdapter = New MySqlDataAdapter() + Dim cmd As MySqlCommand + Dim parm As MySqlParameter + + ' Create the SelectCommand. + cmd = New MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn) + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15) + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15) + + da.SelectCommand = cmd + + ' Create the InsertCommand. + cmd = New MySqlCommand("INSERT INTO mytable (id,name) VALUES (@id, @name)", conn) + + cmd.Parameters.Add( "@id", MySqlDbType.VarChar, 15, "id" ) + cmd.Parameters.Add( "@name", MySqlDbType.VarChar, 15, "name" ) + da.InsertCommand = cmd + + Return da + End Function + + + public static MySqlDataAdapter CreateCustomerAdapter(MySqlConnection conn) + { + MySqlDataAdapter da = new MySqlDataAdapter(); + MySqlCommand cmd; + MySqlParameter parm; + + // Create the SelectCommand. + cmd = new MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn); + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15); + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15); + + da.SelectCommand = cmd; + + // Create the InsertCommand. + cmd = new MySqlCommand("INSERT INTO mytable (id,name) VALUES (@id,@name)", conn); + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15, "id" ); + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15, "name" ); + + da.InsertCommand = cmd; + + return da; + } + + + + + + Gets or sets a SQL statement or stored procedure used to select records in the data source. + + A used during to select records from the + database for placement in the . + + + When SelectCommand is assigned to a previously created , + the MySqlCommand is not cloned. The SelectCommand maintains a reference to the + previously created MySqlCommand object. + + + If the SelectCommand does not return any rows, no tables are added to the + , and no exception is raised. + + + The following example creates a and sets the + and InsertCommand properties. It assumes you have already + created a object. + + Public Shared Function CreateCustomerAdapter(conn As MySqlConnection) As MySqlDataAdapter + + Dim da As MySqlDataAdapter = New MySqlDataAdapter() + Dim cmd As MySqlCommand + Dim parm As MySqlParameter + + ' Create the SelectCommand. + cmd = New MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn) + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15) + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15) + + da.SelectCommand = cmd + + ' Create the InsertCommand. + cmd = New MySqlCommand("INSERT INTO mytable (id,name) VALUES (@id, @name)", conn) + + cmd.Parameters.Add( "@id", MySqlDbType.VarChar, 15, "id" ) + cmd.Parameters.Add( "@name", MySqlDbType.VarChar, 15, "name" ) + da.InsertCommand = cmd + + Return da + End Function + + + public static MySqlDataAdapter CreateCustomerAdapter(MySqlConnection conn) + { + MySqlDataAdapter da = new MySqlDataAdapter(); + MySqlCommand cmd; + MySqlParameter parm; + + // Create the SelectCommand. + cmd = new MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn); + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15); + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15); + + da.SelectCommand = cmd; + + // Create the InsertCommand. + cmd = new MySqlCommand("INSERT INTO mytable (id,name) VALUES (@id,@name)", conn); + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15, "id" ); + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15, "name" ); + + da.InsertCommand = cmd; + + return da; + } + + + + + + Gets or sets a SQL statement or stored procedure used to updated records in the data source. + + A used during to update records in the + database with data from the . + + + During , if this property is not set and primary key information + is present in the , the UpdateCommand can be generated + automatically if you set the property and use the + . Then, any additional commands that you do not set are + generated by the MySqlCommandBuilder. This generation logic requires key column + information to be present in the DataSet. + + + When UpdateCommand is assigned to a previously created , + the MySqlCommand is not cloned. The UpdateCommand maintains a reference + to the previously created MySqlCommand object. + + + If execution of this command returns rows, these rows may be merged with the DataSet + depending on how you set the property of the MySqlCommand object. + + + The following example creates a and sets the + and UpdateCommand properties. It assumes you have already + created a object. + + Public Shared Function CreateCustomerAdapter(conn As MySqlConnection) As MySqlDataAdapter + + Dim da As MySqlDataAdapter = New MySqlDataAdapter() + Dim cmd As MySqlCommand + Dim parm As MySqlParameter + + ' Create the SelectCommand. + cmd = New MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn) + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15) + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15) + + da.SelectCommand = cmd + + ' Create the UpdateCommand. + cmd = New MySqlCommand("UPDATE mytable SET id=@id, name=@name WHERE id=@oldId", conn) + + cmd.Parameters.Add( "@id", MySqlDbType.VarChar, 15, "id" ) + cmd.Parameters.Add( "@name", MySqlDbType.VarChar, 15, "name" ) + + parm = cmd.Parameters.Add("@oldId", MySqlDbType.VarChar, 15, "id") + parm.SourceVersion = DataRowVersion.Original + + da.UpdateCommand = cmd + + Return da + End Function + + + public static MySqlDataAdapter CreateCustomerAdapter(MySqlConnection conn) + { + MySqlDataAdapter da = new MySqlDataAdapter(); + MySqlCommand cmd; + MySqlParameter parm; + + // Create the SelectCommand. + cmd = new MySqlCommand("SELECT * FROM mytable WHERE id=@id AND name=@name", conn); + + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15); + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15); + + da.SelectCommand = cmd; + + // Create the UpdateCommand. + cmd = new MySqlCommand("UPDATE mytable SET id=@id, name=@name WHERE id=@oldId", conn); + cmd.Parameters.Add("@id", MySqlDbType.VarChar, 15, "id" ); + cmd.Parameters.Add("@name", MySqlDbType.VarChar, 15, "name" ); + + parm = cmd.Parameters.Add( "@oldId", MySqlDbType.VarChar, 15, "id" ); + parm.SourceVersion = DataRowVersion.Original; + + da.UpdateCommand = cmd; + + return da; + } + + + + + + Open connection if it was closed. + Necessary to workaround "connection must be open and valid" error + with batched updates. + + Row state + list of opened connections + If connection is opened by this function, the list is updated + + true if connection was opened + + + + Overridden. See . + + + + + + + + + + Overridden. See . + + + + + + + + + + Overridden. Raises the RowUpdating event. + + A MySqlRowUpdatingEventArgs that contains the event data. + + + + Overridden. Raises the RowUpdated event. + + A MySqlRowUpdatedEventArgs that contains the event data. + + + + Async version of Fill + + Dataset to use + int + + + + Async version of Fill + + Datatable to use + int + + + + Async version of Fill + + DataSet to use + Source table + int + + + + Async version of Fill + + Datatable to use + DataReader to use + int + + + + Async version of Fill + + DataTable to use + DbCommand to use + Command Behavior + int + + + + Async version of Fill + + Start record + Max records + DataTable[] to use + int + + + + Async version of Fill + + DataSet to use + Start record + Max records + Source table + int + + + + Async version of Fill + + DataSet to use + Source table + DataReader to use + Start record + Max records + + + + + Async version of Fill + + DataTable[] to use + Start record + Max records + DbCommand to use + Command Behavior + + + + + Async version of Fill + + DataSet to use + Start record + Max records + Source table + DbCommand to use + Command Behavior + + + + + Async version of FillSchema + + DataSet to use + Schema Type + DataTable[] + + + + Async version of FillSchema + + DataSet to use + Schema Type + Source Table + DataTable[] + + + + Async version of FillSchema + + DataSet to use + Schema Type + Source Table + DataReader to use + DataTable[] + + + + Async version of FillSchema + + DataSet to use + Schema Type + DBCommand to use + Source Table + Command Behavior + DataTable[] + + + + Async version of FillSchema + + DataTable to use + Schema Type + DataTable + + + + Async version of FillSchema + + DataTable to use + Schema Type + DataReader to use + DataTable + + + + Async version of FillSchema + + DataTable to use + Schema Type + DBCommand to use + Command Behavior + DataTable + + + + Async version of Update + + DataRow[] to use + int + + + + Async version of Update + + DataSet to use + int + + + + Async version of Update + + DataTable to use + int + + + + Async version of Update + + DataRow[] to use + Data Table Mapping + int + + + + Async version of Update + + DataSet to use + Source Table + + + + + Represents the method that will handle the event of a . + + + + + Represents the method that will handle the event of a . + + + + + Provides data for the RowUpdating event. This class cannot be inherited. + + + + + Initializes a new instance of the MySqlRowUpdatingEventArgs class. + + The to + . + The to execute during . + One of the values that specifies the type of query executed. + The sent through an . + + + + Gets or sets the MySqlCommand to execute when performing the Update. + + + + + Provides data for the RowUpdated event. This class cannot be inherited. + + + + + Initializes a new instance of the MySqlRowUpdatedEventArgs class. + + The sent through an . + The executed when is called. + One of the values that specifies the type of query executed. + The sent through an . + + + + Gets or sets the MySqlCommand executed when Update is called. + + + + + Provides a means of reading a forward-only stream of rows from a MySQL database. This class cannot be inherited. + + + To create a MySQLDataReader, you must call the + method of the object, rather than directly using a constructor. + + + While the MySqlDataReader is in use, the associated + is busy serving the MySqlDataReader, and no other operations can be performed + on the MySqlConnection other than closing it. This is the case until the + method of the MySqlDataReader is called. + + + and + are the only properties that you can call after the MySqlDataReader is + closed. Though the RecordsAffected property may be accessed at any time + while the MySqlDataReader exists, always call Close before returning + the value of RecordsAffected to ensure an accurate return value. + + + For optimal performance, MySqlDataReader avoids creating + unnecessary objects or making unnecessary copies of data. As a result, multiple calls + to methods such as return a reference to the + same object. Use caution if you are modifying the underlying value of the objects + returned by methods such as GetValue. + + + The following example creates a , + a , and a MySqlDataReader. The example reads through + the data, writing it out to the console. Finally, the example closes the MySqlDataReader, then the + MySqlConnection. + + Public Sub ReadMyData(myConnString As String) + Dim mySelectQuery As String = "SELECT OrderID, CustomerID FROM Orders" + Dim myConnection As New MySqlConnection(myConnString) + Dim myCommand As New MySqlCommand(mySelectQuery, myConnection) + myConnection.Open() + Dim myReader As MySqlDataReader + myReader = myCommand.ExecuteReader() + ' Always call Read before accessing data. + While myReader.Read() + Console.WriteLine((myReader.GetInt32(0) & ", " & myReader.GetString(1))) + End While + ' always call Close when done reading. + myReader.Close() + ' Close the connection when done with it. + myConnection.Close() + End Sub 'ReadMyData + + + public void ReadMyData(string myConnString) { + string mySelectQuery = "SELECT OrderID, CustomerID FROM Orders"; + MySqlConnection myConnection = new MySqlConnection(myConnString); + MySqlCommand myCommand = new MySqlCommand(mySelectQuery,myConnection); + myConnection.Open(); + MySqlDataReader myReader; + myReader = myCommand.ExecuteReader(); + // Always call Read before accessing data. + while (myReader.Read()) { + Console.WriteLine(myReader.GetInt32(0) + ", " + myReader.GetString(1)); + } + // always call Close when done reading. + myReader.Close(); + // Close the connection when done with it. + myConnection.Close(); + } + + + + + + Gets the number of columns in the current row. + + + + + Gets a value indicating whether the MySqlDataReader contains one or more rows. + + + + + Gets a value indicating whether the data reader is closed. + + + + + Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. + + + + + Overloaded. Gets the value of a column in its native format. + In C#, this property is the indexer for the MySqlDataReader class. + + + + + Gets the value of a column in its native format. + [C#] In C#, this property is the indexer for the MySqlDataReader class. + + + + + Closes the MySqlDataReader object. + + + + + Gets the value of the specified column as a Boolean. + + + + + + + Gets the value of the specified column as a Boolean. + + + + + + + Gets the value of the specified column as a byte. + + + + + + + Gets the value of the specified column as a byte. + + + + + + + Gets the value of the specified column as a sbyte. + + + + + + + Gets the value of the specified column as a sbyte. + + + + + + + Reads a stream of bytes from the specified column offset into the buffer an array starting at the given buffer offset. + + The zero-based column ordinal. + The index within the field from which to begin the read operation. + The buffer into which to read the stream of bytes. + The index for buffer to begin the read operation. + The maximum length to copy into the buffer. + The actual number of bytes read. + + + + + Gets the value of the specified column as a single character. + + + + + + + Gets the value of the specified column as a single character. + + + + + + + Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset. + + + + + + + + + + + Gets the name of the source data type. + + + + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a DateTime object. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a DateTime object. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a DateTime object. + + + Call IsDBNull to check for null values before calling this method. + + + + MySql allows date columns to contain the value '0000-00-00' and datetime + columns to contain the value '0000-00-00 00:00:00'. The DateTime structure cannot contain + or represent these values. To read a datetime value from a column that might + contain zero values, use . + + + The behavior of reading a zero datetime column using this method is defined by the + ZeroDateTimeBehavior connection string option. For more information on this option, + please refer to . + + + The column name.The value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a DateTime object. + + + Call IsDBNull to check for null values before calling this method. + + + + MySql allows date columns to contain the value '0000-00-00' and datetime + columns to contain the value '0000-00-00 00:00:00'. The DateTime structure cannot contain + or represent these values. To read a datetime value from a column that might + contain zero values, use . + + + The behavior of reading a zero datetime column using this method is defined by the + ZeroDateTimeBehavior connection string option. For more information on this option, + please refer to . + + + The zero-based column ordinal.The value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a Decimal object. + + + Call IsDBNull to check for null values before calling this method. + + The column nameThe value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a Decimal object. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinalThe value of the specified column. + + + Gets the value of the specified column as a double-precision floating point number. + + No conversions are performed; therefore, the data retrieved must already be a Double object. + + + Call IsDBNull to check for null values before calling this method. + + The column nameThe value of the specified column. + + + Gets the value of the specified column as a double-precision floating point number. + + No conversions are performed; therefore, the data retrieved must already be a Double object. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal.The value of the specified column. + + + + Gets the Type that is the data type of the object. + + + + + + + Gets the value of the specified column as a single-precision floating point number. + + + No conversions are performed; therefore, the data retrieved must already be a Float object. + + + Call IsDBNull to check for null values before calling this method. + + The column nameThe value of the specified column. + + + + Gets the value of the specified column as a single-precision floating point number. + + + No conversions are performed; therefore, the data retrieved must already be a Float object. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal.The value of the specified column. + + + + + + + + + Gets the value of the specified column as a 16-bit signed integer. + + No conversions are performed; threfore, the data retrieved must already be a 16 bit integer value. + + + Call IsDBNull to check for null values before calling this method. + + The column nameThe value of the specified column. + + + Gets the value of the specified column as a 16-bit signed integer. + + No conversions are performed; therefore, the data retrieved must already be a 16 bit integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal.The value of the specified column. + + + Gets the value of the specified column as a 32-bit signed integer. + + No conversions are performed; therefore, the data retrieved must already be a 32 bit integer value. + + + Call IsDBNull to check for null values before calling this method. + + The column name.The value of the specified column. + + + Gets the value of the specified column as a 32-bit signed integer. + + No conversions are performed; therefore, the data retrieved must already be a 32 bit integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal.The value of the specified column. + + + Gets the value of the specified column as a 64-bit signed integer. + + No conversions are performed; therefore, the data retrieved must already be a 64 bit integer value. + + + Call IsDBNull to check for null values before calling this method. + + The column name.The value of the specified column. + + + Gets the value of the specified column as a 64-bit signed integer. + + No conversions are performed; therefore, the data retrieved must already be a 64 bit integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal.The value of the specified column. + + + + Gets the name of the specified column. + + + + + + + Gets the column ordinal, given the name of the column. + + + + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a String object. + + + Call IsDBNull to check for null values before calling this method. + + The column name.The value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a String object. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal.The value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a Time value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + + Gets the value of the specified column as a object. + + + No conversions are performed; therefore, the data retrieved must already be a Time value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + + Gets the value of the specified column in its native format. + + + + + + + Gets all attribute columns in the collection for the current row. + + + + + + Gets the value of the specified column as a 16-bit unsigned integer. + + No conversions are performed; therefore, the data retrieved must already be a 16 bit unsigned integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + Gets the value of the specified column as a 16-bit unsigned integer. + + No conversions are performed; therefore, the data retrieved must already be a 16 bit unsigned integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + Gets the value of the specified column as a 32-bit unsigned integer. + + No conversions are performed; therefore, the data retrieved must already be a 32 bit unsigned integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + Gets the value of the specified column as a 32-bit unsigned integer. + + No conversions are performed; therefore, the data retrieved must already be a 32 bit unsigned integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + Gets the value of the specified column as a 64-bit unsigned integer. + + No conversions are performed; therefore, the data retrieved must already be a 64 bit unsigned integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + Gets the value of the specified column as a 64-bit unsigned integer. + + No conversions are performed; therefore, the data retrieved must already be a 64 bit unsigned integer value. + + + Call IsDBNull to check for null values before calling this method. + + The zero-based column ordinal or column name.The value of the specified column. + + + + Gets a value indicating whether the column contains non-existent or missing values. + + + + + + + Advances the data reader to the next result, when reading the results of batch SQL statements. + + + + + + Advances the MySqlDataReader to the next record. + + + + + + Gets a value indicating the depth of nesting for the current row. This method is not + supported currently and always returns 0. + + + + + Returns a DataTable that describes the column metadata of the MySqlDataReader. + + + + + + Returns an that iterates through the . + + + + + + Summary description for BaseDriver. + + + + + For pooled connections, time when the driver was + put into idle queue + + + + + Loads the properties from the connected server into a hashtable + + + + + + + Loads all the current character set names and ids for this server + into the charSets hashtable + + + + + The exception that is thrown when MySQL returns an error. This class cannot be inherited. + + + + This class is created whenever the MySql Data Provider encounters an error generated from the server. + + + Any open connections are not automatically closed when an exception is thrown. If + the client application determines that the exception is fatal, it should close any open + objects or objects. + + + The following example generates a MySqlException due to a missing server, + and then displays the exception. + + + Public Sub ShowException() + Dim mySelectQuery As String = "SELECT column1 FROM table1" + Dim myConnection As New MySqlConnection ("Data Source=localhost;Database=Sample;") + Dim myCommand As New MySqlCommand(mySelectQuery, myConnection) + + Try + myCommand.Connection.Open() + Catch e As MySqlException + MessageBox.Show( e.Message ) + End Try + End Sub + + + public void ShowException() + { + string mySelectQuery = "SELECT column1 FROM table1"; + MySqlConnection myConnection = + new MySqlConnection("Data Source=localhost;Database=Sample;"); + MySqlCommand myCommand = new MySqlCommand(mySelectQuery,myConnection); + + try + { + myCommand.Connection.Open(); + } + catch (MySqlException e) + { + MessageBox.Show( e.Message ); + } + } + + + + + + Gets a number that identifies the type of error. + + + + + True if this exception was fatal and cause the closing of the connection, false otherwise. + + + + + Gets or sets the name of the server. + + The server. + + + + Gets or sets the name of the database the connection should + initially connect to. + + + + + Gets or sets the protocol that should be used for communicating + with MySQL. + + + + + Gets or sets the name of the named pipe that should be used + for communicating with MySQL. + + + + + Gets or sets a boolean value that indicates whether this connection + should use compression. + + + + + Gets or sets a boolean value that indicates whether this connection will allow + commands to send multiple SQL statements in one execution. + + + + + Gets or sets a boolean value that indicates whether logging is enabled. + + + + + Gets or sets the base name of the shared memory objects used to + communicate with MySQL when the shared memory protocol is being used. + + + + + Gets or sets a boolean value that indicates whether this connection uses + the old style (@) parameter markers or the new (?) style. + + + + + Gets or sets the port number that is used when the socket + protocol is being used. + + + + + Gets or sets the connection timeout. + + + + + Gets or sets the default command timeout. + + + + + Gets or sets the user id that should be used to connect with. + + + + + Gets or sets the password that should be used to connect with. + + + + + Gets or sets a boolean value that indicates if the password should be persisted + in the connection string. + + + + + Gets or sets a boolean value that indicates if zero date time values are supported. + + + + + Gets or sets a boolean value indicating if zero datetime values should be + converted to DateTime.MinValue. + + + + + Gets or sets a boolean value indicating if the Usage Advisor should be enabled. + + + + + Gets or sets the size of the stored procedure cache. + + + + + Gets or sets a boolean value indicating if the permon hooks should be enabled. + + + + + Gets or sets a boolean value indicating if calls to Prepare() should be ignored. + + + + + Gets or sets the lifetime of a pooled connection. + + + + + Gets or sets a boolean value indicating if connection pooling is enabled. + + + + + Gets the minimum connection pool size. + + + + + Gets or sets the maximum connection pool setting. + + + + + Gets or sets a boolean value indicating if the connection should be reset when retrieved + from the pool. + + + + + Gets or sets the character set that should be used for sending queries to the server. + + + + + Indicates whether the driver should treat binary blobs as UTF8 + + + + + Gets or sets the pattern that matches the columns that should be treated as UTF8 + + + + + Gets or sets the pattern that matches the columns that should not be treated as UTF8 + + + + + Indicates whether to use SSL connections and how to handle server certificate errors. + + + + + Represents a parameter to a , and optionally, its mapping to columns. This class cannot be inherited. + + + + + Initializes a new instance of the class with the parameter name, the , the size, and the source column name. + + The name of the parameter to map. + One of the values. + The length of the parameter. + The name of the source column. + + + + Initializes a new instance of the class with the parameter name, the type of the parameter, the size of the parameter, a , the precision of the parameter, the scale of the parameter, the source column, a to use, and the value of the parameter. + + The name of the parameter to map. + One of the values. + The length of the parameter. + One of the values. + true if the value of the field can be null, otherwise false. + The total number of digits to the left and right of the decimal point to which is resolved. + The total number of decimal places to which is resolved. + The name of the source column. + One of the values. + An that is the value of the . + + + + + Gets or sets the to use when loading . + + + + + Gets or sets the name of the source column that is mapped to the and used for loading or returning the . + + + + + Resets the DbType property to its original settings. + + + + + Sets or gets a value which indicates whether the source column is nullable. + This allows to correctly generate Update statements + for nullable columns. + + + + + Gets or sets the of the parameter. + + + + + Initializes a new instance of the class with the parameter name and a value of the new MySqlParameter. + + The name of the parameter to map. + An that is the value of the . + + + + Initializes a new instance of the class with the parameter name and the data type. + + The name of the parameter to map. + One of the values. + + + + Initializes a new instance of the class with the parameter name, the , and the size. + + The name of the parameter to map. + One of the values. + The length of the parameter. + + + + Gets or sets a value indicating whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter. + As of MySql version 4.1 and earlier, input-only is the only valid choice. + + + + + Gets or sets a value indicating whether the parameter accepts null values. + + + + + Gets or sets the MySqlDbType of the parameter. + + + + + Gets or sets the maximum number of digits used to represent the property. + + + + + Gets or sets the number of decimal places to which is resolved. + + + + + Gets or sets the maximum size, in bytes, of the data within the column. + + + + + Gets or sets the value of the parameter. + + + + + Returns the possible values for this parameter if this parameter is of type + SET or ENUM. Returns null otherwise. + + + + + Overridden. Gets a string containing the . + + + + + + Represents a collection of parameters relevant to a as well as their respective mappings to columns in a . This class cannot be inherited. + + + The number of the parameters in the collection must be equal to the number of + parameter placeholders within the command text, or an exception will be generated. + + The following example creates multiple instances of + through the MySqlParameterCollection collection within the . + These parameters are used to select data within the data source and place the data in + the . This code assumes that a DataSet and a MySqlDataAdapter + have already been created with the appropriate schema, commands, and connection. + + Public Sub AddParameters() + ' ... + ' create myDataSet and myDataAdapter + ' ... + myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters" + myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239 + + myDataAdapter.Fill(myDataSet) + End Sub 'AddSqlParameters + + + public void AddSqlParameters() + { + // ... + // create myDataSet and myDataAdapter + // ... + + myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters"; + myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239; + myDataAdapter.Fill(myDataSet); + + } + + + + + + Adds a to the with the parameter name, the data type, the column length, and the source column name. + + The name of the parameter. + One of the values. + The length of the column. + The name of the source column. + The newly added object. + + + + Adds an array of values to the end of the . + + + + + + Retrieve the parameter with the given name. + + + + + + + Adds the specified object to the . + + The to add to the collection. + The index of the new object. + + + + Gets a value indicating whether a with the specified parameter name exists in the collection. + + The name of the object to find. + true if the collection contains the parameter; otherwise, false. + + + + Gets a value indicating whether a MySqlParameter exists in the collection. + + The value of the object to find. + true if the collection contains the object; otherwise, false. + Gets a value indicating whether a exists in the collection. + + + + Copies MySqlParameter objects from the MySqlParameterCollection to the specified array. + + + + + + + Returns an enumerator that iterates through the . + + + + + + Inserts a MySqlParameter into the collection at the specified index. + + + + + + + Gets a value that indicates whether the + has a fixed size. + + + + + Gets a value that indicates whether the + is read-only. + + + + + Gets a value that indicates whether the + is synchronized. + + + + + Removes the specified MySqlParameter from the collection. + + + + + + Removes the specified from the collection using the parameter name. + + The name of the object to retrieve. + + + + Removes the specified from the collection using a specific index. + + The zero-based index of the parameter. + Removes the specified from the collection. + + + + Gets an object that can be used to synchronize access to the + . + + + + + Gets the number of MySqlParameter objects in the collection. + + + + + Gets the at the specified index. + + Gets the with a specified attribute. + [C#] In C#, this property is the indexer for the class. + + + + + Gets the with the specified name. + + + + + Adds the specified object to the . + + The to add to the collection. + The newly added object. + + + + Adds a to the given the specified parameter name and value. + + The name of the parameter. + The of the to add to the collection. + The newly added object. + + + + Adds a to the given the parameter name and the data type. + + The name of the parameter. + One of the values. + The newly added object. + + + + Adds a to the with the parameter name, the data type, and the column length. + + The name of the parameter. + One of the values. + The length of the column. + The newly added object. + + + + Removes all items from the collection. + + + + + Gets the location of the in the collection with a specific parameter name. + + The name of the object to retrieve. + The zero-based location of the in the collection. + + + + Gets the location of a in the collection. + + The object to locate. + The zero-based location of the in the collection. + Gets the location of a in the collection. + + + + This method will update all the items in the index hashes when + we insert a parameter somewhere in the middle + + + + + + + Represents a SQL transaction to be made in a MySQL database. This class cannot be inherited. + + The application creates a MySqlTransaction object by calling + on the object. All subsequent operations associated with the + transaction (for example, committing or aborting the transaction), are performed on the + MySqlTransaction object. + + The following example creates a and a MySqlTransaction. + It also demonstrates how to use the , + , and methods. + + Public Sub RunTransaction(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + + Dim myCommand As MySqlCommand = myConnection.CreateCommand() + Dim myTrans As MySqlTransaction + + ' Start a local transaction + myTrans = myConnection.BeginTransaction() + ' Must assign both transaction object and connection + ' to Command object for a pending local transaction + myCommand.Connection = myConnection + myCommand.Transaction = myTrans + + Try + myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')" + myCommand.ExecuteNonQuery() + myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')" + myCommand.ExecuteNonQuery() + myTrans.Commit() + Console.WriteLine("Both records are written to database.") + Catch e As Exception + Try + myTrans.Rollback() + Catch ex As MySqlException + If Not myTrans.Connection Is Nothing Then + Console.WriteLine("An exception of type " & ex.GetType().ToString() & _ + " was encountered while attempting to roll back the transaction.") + End If + End Try + + Console.WriteLine("An exception of type " & e.GetType().ToString() & _ + "was encountered while inserting the data.") + Console.WriteLine("Neither record was written to database.") + Finally + myConnection.Close() + End Try + End Sub 'RunTransaction + + + public void RunTransaction(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + + MySqlCommand myCommand = myConnection.CreateCommand(); + MySqlTransaction myTrans; + + // Start a local transaction + myTrans = myConnection.BeginTransaction(); + // Must assign both transaction object and connection + // to Command object for a pending local transaction + myCommand.Connection = myConnection; + myCommand.Transaction = myTrans; + + try + { + myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')"; + myCommand.ExecuteNonQuery(); + myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')"; + myCommand.ExecuteNonQuery(); + myTrans.Commit(); + Console.WriteLine("Both records are written to database."); + } + catch(Exception e) + { + try + { + myTrans.Rollback(); + } + catch (MySqlException ex) + { + if (myTrans.Connection != null) + { + Console.WriteLine("An exception of type " + ex.GetType() + + " was encountered while attempting to roll back the transaction."); + } + } + + Console.WriteLine("An exception of type " + e.GetType() + + " was encountered while inserting the data."); + Console.WriteLine("Neither record was written to database."); + } + finally + { + myConnection.Close(); + } + } + + + + + + Gets the object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid. + + The object associated with this transaction. + + A single application may have multiple database connections, each + with zero or more transactions. This property enables you to + determine the connection object associated with a particular + transaction created by . + + + + + Specifies the for this transaction. + + + The for this transaction. The default is ReadCommitted. + + + Parallel transactions are not supported. Therefore, the IsolationLevel + applies to the entire transaction. + + + + + Commits the database transaction. + + The Commit method is equivalent to the MySQL SQL statement + COMMIT. + + The following example creates a and a + . It also demonstrates how to use the + , , and Rollback + methods. + + Public Sub RunSqlTransaction(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + + Dim myCommand As MySqlCommand = myConnection.CreateCommand() + Dim myTrans As MySqlTransaction + + ' Start a local transaction + myTrans = myConnection.BeginTransaction() + + ' Must assign both transaction object and connection + ' to Command object for a pending local transaction + myCommand.Connection = myConnection + myCommand.Transaction = myTrans + + Try + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (100, 'Description')" + myCommand.ExecuteNonQuery() + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (101, 'Description')" + myCommand.ExecuteNonQuery() + myTrans.Commit() + Console.WriteLine("Success.") + Catch e As Exception + Try + myTrans.Rollback() + Catch ex As MySqlException + If Not myTrans.Connection Is Nothing Then + Console.WriteLine("An exception of type " & ex.GetType().ToString() & _ + " was encountered while attempting to roll back the transaction.") + End If + End Try + + Console.WriteLine("An exception of type " & e.GetType().ToString() & _ + "was encountered while inserting the data.") + Console.WriteLine("Neither record was written to database.") + Finally + myConnection.Close() + End Try + End Sub + + + public void RunSqlTransaction(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + + MySqlCommand myCommand = myConnection.CreateCommand(); + MySqlTransaction myTrans; + + // Start a local transaction + myTrans = myConnection.BeginTransaction(); + // Must assign both transaction object and connection + // to Command object for a pending local transaction + myCommand.Connection = myConnection; + myCommand.Transaction = myTrans; + + try + { + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (100, 'Description')"; + myCommand.ExecuteNonQuery(); + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (101, 'Description')"; + myCommand.ExecuteNonQuery(); + myTrans.Commit(); + Console.WriteLine("Both records are written to database."); + } + catch(Exception e) + { + try + { + myTrans.Rollback(); + } + catch (MySqlException ex) + { + if (myTrans.Connection != null) + { + Console.WriteLine("An exception of type " + ex.GetType() + + " was encountered while attempting to roll back the transaction."); + } + } + + Console.WriteLine("An exception of type " + e.GetType() + + " was encountered while inserting the data."); + Console.WriteLine("Neither record was written to database."); + } + finally + { + myConnection.Close(); + } + } + + + + + + Rolls back a transaction from a pending state. + + The Rollback method is equivalent to the MySQL statement ROLLBACK. + The transaction can only be rolled back from a pending state + (after BeginTransaction has been called, but before Commit is + called). + + The following example creates a and a + . It also demonstrates how to use the + , , and Rollback + methods. + + Public Sub RunSqlTransaction(myConnString As String) + Dim myConnection As New MySqlConnection(myConnString) + myConnection.Open() + + Dim myCommand As MySqlCommand = myConnection.CreateCommand() + Dim myTrans As MySqlTransaction + + ' Start a local transaction + myTrans = myConnection.BeginTransaction() + + ' Must assign both transaction object and connection + ' to Command object for a pending local transaction + myCommand.Connection = myConnection + myCommand.Transaction = myTrans + + Try + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (100, 'Description')" + myCommand.ExecuteNonQuery() + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (101, 'Description')" + myCommand.ExecuteNonQuery() + myTrans.Commit() + Console.WriteLine("Success.") + Catch e As Exception + Try + myTrans.Rollback() + Catch ex As MySqlException + If Not myTrans.Connection Is Nothing Then + Console.WriteLine("An exception of type " & ex.GetType().ToString() & _ + " was encountered while attempting to roll back the transaction.") + End If + End Try + + Console.WriteLine("An exception of type " & e.GetType().ToString() & _ + "was encountered while inserting the data.") + Console.WriteLine("Neither record was written to database.") + Finally + myConnection.Close() + End Try + End Sub + + + public void RunSqlTransaction(string myConnString) + { + MySqlConnection myConnection = new MySqlConnection(myConnString); + myConnection.Open(); + + MySqlCommand myCommand = myConnection.CreateCommand(); + MySqlTransaction myTrans; + + // Start a local transaction + myTrans = myConnection.BeginTransaction(); + // Must assign both transaction object and connection + // to Command object for a pending local transaction + myCommand.Connection = myConnection; + myCommand.Transaction = myTrans; + + try + { + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (100, 'Description')"; + myCommand.ExecuteNonQuery(); + myCommand.CommandText = "Insert into mytable (id, desc) VALUES (101, 'Description')"; + myCommand.ExecuteNonQuery(); + myTrans.Commit(); + Console.WriteLine("Both records are written to database."); + } + catch(Exception e) + { + try + { + myTrans.Rollback(); + } + catch (MySqlException ex) + { + if (myTrans.Connection != null) + { + Console.WriteLine("An exception of type " + ex.GetType() + + " was encountered while attempting to roll back the transaction."); + } + } + + Console.WriteLine("An exception of type " + e.GetType() + + " was encountered while inserting the data."); + Console.WriteLine("Neither record was written to database."); + } + finally + { + myConnection.Close(); + } + } + + + + + + Summary description for Field. + + + + + We are adding a custom installer class to our assembly so our installer + can make proper changes to the machine.config file. + + + + + We override Install so we can add our assembly to the proper + machine.config files. + + + + + + We override Uninstall so we can remove out assembly from the + machine.config files. + + + + + + BaseCommandInterceptor is the base class that should be used for all userland + command interceptors + + + + + CommandInterceptor is the "manager" class that keeps the list of registered interceptors + for the given connection. + + + + + Interceptor is the base class for the "manager" classes such as ExceptionInterceptor, + CommandInterceptor, etc + + + + + BaseExceptionInterceptor is the base class that should be used for all userland + exception interceptors + + + + + StandardExceptionInterceptor is the standard interceptor that simply throws the exception. + It is the default action. + + + + + ExceptionInterceptor is the "manager" class that keeps the list of registered interceptors + for the given connection. + + + + + Return schema information about procedures and functions + Restrictions supported are: + schema, name, type + + + + + + + Return schema information about parameters for procedures and functions + Restrictions supported are: + schema, name, type, parameter name + + + + + Initializes a new row for the procedure parameters table. + + + + + Parses out the elements of a procedure parameter data type. + + + + + Implementation of memcached binary client protocol. + + According to http://code.google.com/p/memcached/wiki/BinaryProtocolRevamped + + + + Sends an store command (add, replace, set). + + + + + + + + + + Sends a get command. + + + + + + + + + Sends a delete command. + + + + + + + + + Sends a command without args (like flush). + + + + + + + + + Sends a command with amount (INCR/DECR) + + + + + + + + + + The base exception class for all Memcached exceptions. + + + + + Implementation of the Memcached text client protocol. + + + + + + + Send a command to memcached server. + + + + + + This version is for commands that don't need flags neither expiration fields. + + + + Sends a command to the server. + + + + This version is for commands that only require a key + + + + + + An interface of the client memcached protocol. This class is abstract for + implementation of the Memcached client interface see for the + text protocol version and for the binary protocol version. + + + + + The port used by the connection. + + + + + The server DNS or IP address used by the connection. + + + + + The network stream used by the connecition. + + + + + Factory method for creating instances of that implement a connection with the requested features. + The connection object returned must be explicitely opened see method . + + The Memcached server DNS or IP address. + The port for the Memcached server + A set of flags indicating characterestics requested. + An instance of a client connection ready to be used. + + + + Opens the client connection. + + + + + Closes the client connection. + + + + + Adds a new key/value pair with the given TimeSpan expiration. + + The key for identifying the entry. + The data to associate with the key. + The interval of timespan, use TimeSpan.Zero for no expiration. + + + + Appens the data to the existing data for the associated key. + + The key for identifying the entry. + The data to append with the data associated with the key. + + + + Executes the Check-and-set Memcached operation. + + The key for identifying the entry. + The data to use in the CAS. + The interval of timespan, use TimeSpan.Zero for no expiration. + The CAS unique value to use. + + + + + Decrements the value associated with a key by the given amount. + + The key associated with the value to decrement. + The amount to decrement the value. + + + + Removes they pair key/value given the specified key. + + + + + + Removes all entries from the storage, effectively invalidating the whole cache. + + The interval after which the cache will be cleaned. Can be TimeSpan.Zero for immediately. + + + + Get the key/value pair associated with a given key. + + The key for which to returm the key/value. + The key/value associated with the key or a MemcachedException if it does not exists. + + + + Increments the value associated with a key by the given amount. + + The key associated with the value to increment. + The amount to increment the value. + + + + Prepends the data to the existing data for the associated key. + + The key for identifying the entry. + The data to append with the data associated with the key. + + + + Replaces the value associated with the given key with another value. + + The key for identifying the entry. + The data to replace the value associated with the key. + The interval of timespan, use TimeSpan.Zero for no expiration. + + + + Set the value of a given key. + + The key for identifying the entry. + The data to associate with the given key. + The interval of timespan, use TimeSpan.Zero for no expiration. + + + + A set of flags for requesting new instances of connections + + + + + Requests a connection implememting the text protocol. + + + + + Requests a connection implementing the binary protocol. + + + + + Requests a TCP connection. Currently UDP is not supported. + + + + + DBProviderFactory implementation for MysqlClient. + + + + + Gets an instance of the . + This can be used to retrieve strongly typed data objects. + + + + + Returns a strongly typed instance. + + A new strongly typed instance of DbCommandBuilder. + + + + Returns a strongly typed instance. + + A new strongly typed instance of DbCommand. + + + + Returns a strongly typed instance. + + A new strongly typed instance of DbConnection. + + + + Returns a strongly typed instance. + + A new strongly typed instance of DbDataAdapter. + + + + Returns a strongly typed instance. + + A new strongly typed instance of DbParameter. + + + + Returns a strongly typed instance. + + A new strongly typed instance of DbConnectionStringBuilder. + + + + Returns true if a MySqlDataSourceEnumerator can be created; + otherwise false. + + + + + Provide a simple caching layer + + + + + Adds a new connection string with set of restricted keywords to the MySqlClientPermission object + + Settings to be used for the connection + Keywords to define the restrictions + KeyRestrictionBehavior to be used + + + + Returns MySqlClientPermission as an IPermission + + + + + + + + + + + + + + + + + + + + + + Summary description for ClientParam. + + + + + DB Operations Code + + + + + Specifies MySQL specific data type of a field, property, for use in a . + + + + + + A fixed precision and scale numeric value between -1038 + -1 and 10 38 -1. + + + + + The signed range is -128 to 127. The unsigned + range is 0 to 255. + + + + + A 16-bit signed integer. The signed range is + -32768 to 32767. The unsigned range is 0 to 65535 + + + + + Specifies a 24 (3 byte) signed or unsigned value. + + + + + A 32-bit signed integer + + + + + A 64-bit signed integer. + + + + + A small (single-precision) floating-point + number. Allowable values are -3.402823466E+38 to -1.175494351E-38, + 0, and 1.175494351E-38 to 3.402823466E+38. + + + + + A normal-size (double-precision) + floating-point number. Allowable values are -1.7976931348623157E+308 + to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to + 1.7976931348623157E+308. + + + + + A timestamp. The range is '1970-01-01 00:00:00' to sometime in the + year 2037 + + + + + Date The supported range is '1000-01-01' to '9999-12-31'. + + + + + Time The range is '-838:59:59' to '838:59:59'. + + + + + DateTime The supported range is '1000-01-01 00:00:00' to + '9999-12-31 23:59:59'. + + + + + Datetime The supported range is '1000-01-01 00:00:00' to + '9999-12-31 23:59:59'. + + + + + A year in 2- or 4-digit format (default is 4-digit). The + allowable values are 1901 to 2155, 0000 in the 4-digit year + format, and 1970-2069 if you use the 2-digit format (70-69). + + + + + Obsolete Use Datetime or Date type + + + + + A variable-length string containing 0 to 65535 characters + + + + + Bit-field data type + + + + + JSON + + + + + New Decimal + + + + + An enumeration. A string object that can have only one value, + chosen from the list of values 'value1', 'value2', ..., NULL + or the special "" error value. An ENUM can have a maximum of + 65535 distinct values + + + + + A set. A string object that can have zero or more values, each + of which must be chosen from the list of values 'value1', 'value2', + ... A SET can have a maximum of 64 members. + + + + + A binary column with a maximum length of 255 (2^8 - 1) + characters + + + + + A binary column with a maximum length of 16777215 (2^24 - 1) bytes. + + + + + A binary column with a maximum length of 4294967295 or + 4G (2^32 - 1) bytes. + + + + + A binary column with a maximum length of 65535 (2^16 - 1) bytes. + + + + + A variable-length string containing 0 to 255 bytes. + + + + + A fixed-length string. + + + + + Geometric (GIS) data type. + + + + + Unsigned 8-bit value. + + + + + Unsigned 16-bit value. + + + + + Unsigned 24-bit value. + + + + + Unsigned 32-bit value. + + + + + Unsigned 64-bit value. + + + + + Fixed length binary string. + + + + + Variable length binary string. + + + + + A text column with a maximum length of 255 (2^8 - 1) characters. + + + + + A text column with a maximum length of 16777215 (2^24 - 1) characters. + + + + + A text column with a maximum length of 4294967295 or + 4G (2^32 - 1) characters. + + + + + A text column with a maximum length of 65535 (2^16 - 1) characters. + + + + + A guid column + + + + + Allows the user to specify the type of connection that should + be used. + + + + + TCP/IP style connection. Works everywhere. + + + + + Named pipe connection. Works only on Windows systems. + + + + + Unix domain socket connection. Works only with Unix systems. + + + + + Shared memory connection. Currently works only with Windows systems. + + + + + SSL options for connection. + + + + + Do not use SSL. + + + + + Use SSL, if server supports it. + + + + + Always use SSL. Deny connection if server does not support SSL. + Do not perform server certificate validation. + + + + + Always use SSL. Validate server SSL certificate, but different host name mismatch. + + + + + Always use SSL and perform full certificate validation. + + + + + Specifies the connection types supported + + + + + Use TCP/IP sockets. + + + + + Use client library. + + + + + Use MySQL embedded server. + + + + + Do not use certificate store + + + + + Use certificate store for the current user + + + + + User certificate store for the machine + + + + + Collection of error codes that can be returned by the server + + + + + + + + + + + Error level + + + + + Error code + + + + + Error message + + + + + Provides a reference to error codes returned by MySQL. + + + + + ER_HASHCHK + + + + ER_NISAMCHK + + + + ER_NO + + + + ER_YES + + + The file couldn't be created. + ER_CANT_CREATE_FILE + + + The table couldn't be created. + ER_CANT_CREATE_TABLE + + + The database couldn't be created. + ER_CANT_CREATE_DB + + + The database couldn't be created, it already exists. + ER_DB_CREATE_EXISTS + + + The database couldn't be dropped, it doesn't exist. + ER_DB_DROP_EXISTS + + + The database couldn't be dropped, the file can't be deleted. + ER_DB_DROP_DELETE + + + The database couldn't be dropped, the directory can't be deleted. + ER_DB_DROP_RMDIR + + + The file couldn't be deleted. + ER_CANT_DELETE_FILE + + + The record couldn't be read from the system table. + ER_CANT_FIND_SYSTEM_REC + + + The status couldn't be retrieved. + ER_CANT_GET_STAT + + + The working directory couldn't be retrieved. + ER_CANT_GET_WD + + + The file couldn't be locked. + ER_CANT_LOCK + + + The file couldn't be opened. + ER_CANT_OPEN_FILE + + + The file couldn't be found. + ER_FILE_NOT_FOUND + + + The directory couldn't be read. + ER_CANT_READ_DIR + + + The working directory couldn't be entered. + ER_CANT_SET_WD + + + The record changed since it was last read. + ER_CHECKREAD + + + The disk is full. + ER_DISK_FULL + + + + There is already a key with the given values. + + + + An error occurred when closing the file. + ER_ERROR_ON_CLOSE + + + An error occurred when reading from the file. + ER_ERROR_ON_READ + + + An error occurred when renaming then file. + ER_ERROR_ON_RENAME + + + An error occurred when writing to the file. + ER_ERROR_ON_WRITE + + + The file is in use. + ER_FILE_USED + + + Sorting has been aborted. + ER_FILSORT_ABORT + + + The view doesn't exist. + ER_FORM_NOT_FOUND + + + Got the specified error from the table storage engine. + ER_GET_ERRNO + + + The table storage engine doesn't support the specified option. + ER_ILLEGAL_HA + + + + The specified key was not found. + + + + The file contains incorrect information. + ER_NOT_FORM_FILE + + + The key file is incorrect for the table, it should be repaired. + ER_NOT_KEYFILE + + + The key file is old for the table, it should be repaired. + ER_OLD_KEYFILE + + + The table is read-only + ER_OPEN_AS_READONLY + + + The server is out of memory, it should be restarted. + ER_OUTOFMEMORY + + + The server is out of sort-memory, the sort buffer size should be increased. + ER_OUT_OF_SORTMEMORY + + + An unexpected EOF was found when reading from the file. + ER_UNEXPECTED_EOF + + + Too many connections are open. + ER_CON_COUNT_ERROR + + + The server is out of resources, check if MySql or some other process is using all available memory. + ER_OUT_OF_RESOURCES + + + + Given when the connection is unable to successfully connect to host. + + + + The handshake was invalid. + ER_HANDSHAKE_ERROR + + + Access was denied for the specified user using the specified database. + ER_DBACCESS_DENIED_ERROR + + + + Normally returned when an incorrect password is given + + + + No database has been selected. + ER_NO_DB_ERROR + + + The command is unknown. + ER_UNKNOWN_COM_ERROR + + + The specified column cannot be NULL. + ER_BAD_NULL_ERROR + + + The specified database is not known. + + + The specified table already exists. + ER_TABLE_EXISTS_ERROR + + + The specified table is unknown. + ER_BAD_TABLE_ERROR + + + The specified column is ambiguous. + ER_NON_UNIQ_ERROR + + + The server is currently being shutdown. + ER_SERVER_SHUTDOWN + + + The specified columns is unknown. + ER_BAD_FIELD_ERROR + + + The specified column isn't in GROUP BY. + ER_WRONG_FIELD_WITH_GROUP + + + The specified columns cannot be grouped on. + ER_WRONG_GROUP_FIELD + + + There are sum functions and columns in the same statement. + ER_WRONG_SUM_SELECT + + + The column count doesn't match the value count. + ER_WRONG_VALUE_COUNT + + + The identifier name is too long. + ER_TOO_LONG_IDENT + + + The column name is duplicated. + ER_DUP_FIELDNAME + + + + Duplicate Key Name + + + + + Duplicate Key Entry + + + + The column specifier is incorrect. + ER_WRONG_FIELD_SPEC + + + An error occurred when parsing the statement. + ER_PARSE_ERROR + + + The statement is empty. + ER_EMPTY_QUERY + + + The table alias isn't unique. + ER_NONUNIQ_TABLE + + + The default value is invalid for the specified field. + ER_INVALID_DEFAULT + + + The table has multiple primary keys defined. + ER_MULTIPLE_PRI_KEY + + + Too many keys were defined for the table. + ER_TOO_MANY_KEYS + + + Too many parts to the keys were defined for the table. + ER_TOO_MANY_KEY_PARTS + + + The specified key is too long + ER_TOO_LONG_KEY + + + The specified key column doesn't exist in the table. + ER_KEY_COLUMN_DOES_NOT_EXITS + + + The BLOB column was used as a key, this can't be done. + ER_BLOB_USED_AS_KEY + + + The column length is too big for the specified column type. + ER_TOO_BIG_FIELDLENGTH + + + There can only be one auto-column, and it must be defined as a PK. + ER_WRONG_AUTO_KEY + + + The server is ready to accept connections. + ER_READY + + + + ER_NORMAL_SHUTDOWN + + + The server received the specified signal and is aborting. + ER_GOT_SIGNAL + + + The server shutdown is complete. + ER_SHUTDOWN_COMPLETE + + + The server is forcing close of the specified thread. + ER_FORCING_CLOSE + + + An error occurred when creating the IP socket. + ER_IPSOCK_ERROR + + + The table has no index like the one used in CREATE INDEX. + ER_NO_SUCH_INDEX + + + The field separator argument is not what is expected, check the manual. + ER_WRONG_FIELD_TERMINATORS + + + The BLOB columns must terminated, fixed row lengths cannot be used. + ER_BLOBS_AND_NO_TERMINATED + + + The text file cannot be read. + ER_TEXTFILE_NOT_READABLE + + + The specified file already exists. + ER_FILE_EXISTS_ERROR + + + Information returned by the LOAD statement. + ER_LOAD_INFO + + + Information returned by an UPDATE statement. + ER_ALTER_INFO + + + The prefix key is incorrect. + ER_WRONG_SUB_KEY + + + All columns cannot be removed from a table, use DROP TABLE instead. + ER_CANT_REMOVE_ALL_FIELDS + + + Cannot DROP, check that the column or key exists. + ER_CANT_DROP_FIELD_OR_KEY + + + Information returned by an INSERT statement. + ER_INSERT_INFO + + + The target table cannot be specified for update in FROM clause. + ER_UPDATE_TABLE_USED + + + The specified thread ID is unknown. + ER_NO_SUCH_THREAD + + + The thread cannot be killed, the current user is not the owner. + ER_KILL_DENIED_ERROR + + + No tables used in the statement. + ER_NO_TABLES_USED + + + Too many string have been used for the specified column and SET. + ER_TOO_BIG_SET + + + A unique filename couldn't be generated. + ER_NO_UNIQUE_LOGFILE + + + The specified table was locked with a READ lock, and can't be updated. + ER_TABLE_NOT_LOCKED_FOR_WRITE + + + The specified table was not locked with LOCK TABLES. + ER_TABLE_NOT_LOCKED + + + BLOB and Text columns cannot have a default value. + ER_BLOB_CANT_HAVE_DEFAULT + + + The specified database name is incorrect. + ER_WRONG_DB_NAME + + + The specified table name is incorrect. + ER_WRONG_TABLE_NAME + + + The SELECT command would examine more than MAX_JOIN_SIZE rows, check the WHERE clause and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok. + ER_TOO_BIG_SELECT + + + An unknown error occurred. + ER_UNKNOWN_ERROR + + + The specified procedure is unknown. + ER_UNKNOWN_PROCEDURE + + + The number of parameters provided for the specified procedure is incorrect. + ER_WRONG_PARAMCOUNT_TO_PROCEDURE + + + The parameters provided for the specified procedure are incorrect. + ER_WRONG_PARAMETERS_TO_PROCEDURE + + + The specified table is unknown. + ER_UNKNOWN_TABLE + + + The specified column has been specified twice. + ER_FIELD_SPECIFIED_TWICE + + + The group function has been incorrectly used. + ER_INVALID_GROUP_FUNC_USE + + + The specified table uses an extension that doesn't exist in this MySQL version. + ER_UNSUPPORTED_EXTENSION + + + The table must have at least one column. + ER_TABLE_MUST_HAVE_COLUMNS + + + The specified table is full. + ER_RECORD_FILE_FULL + + + The specified character set is unknown. + ER_UNKNOWN_CHARACTER_SET + + + Too many tables, MySQL can only use the specified number of tables in a JOIN. + ER_TOO_MANY_TABLES + + + Too many columns + ER_TOO_MANY_FIELDS + + + The row size is too large, the maximum row size for the used tables (not counting BLOBS) is specified, change some columns or BLOBS. + ER_TOO_BIG_ROWSIZE + + + A thread stack overrun occurred. Stack statistics are specified. + ER_STACK_OVERRUN + + + A cross dependency was found in the OUTER JOIN, examine the ON conditions. + ER_WRONG_OUTER_JOIN + + + The table handler doesn't support NULL in the given index, change specified column to be NOT NULL or use another handler. + ER_NULL_COLUMN_IN_INDEX + + + The specified user defined function cannot be loaded. + ER_CANT_FIND_UDF + + + The specified user defined function cannot be initialised. + ER_CANT_INITIALIZE_UDF + + + No paths are allowed for the shared library. + ER_UDF_NO_PATHS + + + The specified user defined function already exists. + ER_UDF_EXISTS + + + The specified shared library cannot be opened. + ER_CANT_OPEN_LIBRARY + + + The specified symbol cannot be found in the library. + ER_CANT_FIND_DL_ENTRY + + + The specified function is not defined. + ER_FUNCTION_NOT_DEFINED + + + The specified host is blocked because of too many connection errors, unblock with 'mysqladmin flush-hosts'. + ER_HOST_IS_BLOCKED + + + + The given host is not allowed to connect + + + + + The anonymous user is not allowed to connect + + + + + The given password is not allowed + + + + + The given password does not match + + + + Information returned by an UPDATE statement. + ER_UPDATE_INFO + + + A new thread couldn't be created. + ER_CANT_CREATE_THREAD + + + The column count doesn't match the value count. + ER_WRONG_VALUE_COUNT_ON_ROW + + + The specified table can't be re-opened. + ER_CANT_REOPEN_TABLE + + + The NULL value has been used incorrectly. + ER_INVALID_USE_OF_NULL + + + The regular expression contains an error. + ER_REGEXP_ERROR + + + GROUP columns (MIN(), MAX(), COUNT(), ...) cannot be mixes with no GROUP columns if there is not GROUP BY clause. + ER_MIX_OF_GROUP_FUNC_AND_FIELDS + + + + ER_NONEXISTING_GRANT + + + + ER_TABLEACCESS_DENIED_ERROR + + + + ER_COLUMNACCESS_DENIED_ERROR + + + + ER_ILLEGAL_GRANT_FOR_TABLE + + + + ER_GRANT_WRONG_HOST_OR_USER + + + + ER_NO_SUCH_TABLE + + + + ER_NONEXISTING_TABLE_GRANT + + + + ER_NOT_ALLOWED_COMMAND + + + + ER_SYNTAX_ERROR + + + + ER_DELAYED_CANT_CHANGE_LOCK + + + + ER_TOO_MANY_DELAYED_THREADS + + + + ER_ABORTING_CONNECTION + + + + An attempt was made to send or receive a packet larger than + max_allowed_packet_size + + + + + ER_NET_READ_ERROR_FROM_PIPE + + + + ER_NET_FCNTL_ERROR + + + + ER_NET_PACKETS_OUT_OF_ORDER + + + + ER_NET_UNCOMPRESS_ERROR + + + + ER_NET_READ_ERROR + + + + ER_NET_READ_INTERRUPTED + + + + ER_NET_ERROR_ON_WRITE + + + + ER_NET_WRITE_INTERRUPTED + + + + ER_TOO_LONG_STRING + + + + ER_TABLE_CANT_HANDLE_BLOB + + + + ER_TABLE_CANT_HANDLE_AUTO_INCREMENT + + + + ER_DELAYED_INSERT_TABLE_LOCKED + + + + ER_WRONG_COLUMN_NAME + + + + ER_WRONG_KEY_COLUMN + + + + ER_WRONG_MRG_TABLE + + + + ER_DUP_UNIQUE + + + + ER_BLOB_KEY_WITHOUT_LENGTH + + + + ER_PRIMARY_CANT_HAVE_NULL + + + + ER_TOO_MANY_ROWS + + + + ER_REQUIRES_PRIMARY_KEY + + + + ER_NO_RAID_COMPILED + + + + ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE + + + + ER_KEY_DOES_NOT_EXITS + + + + ER_CHECK_NO_SUCH_TABLE + + + + ER_CHECK_NOT_IMPLEMENTED + + + + ER_CANT_DO_THIS_DURING_AN_TRANSACTION + + + + ER_ERROR_DURING_COMMIT + + + + ER_ERROR_DURING_ROLLBACK + + + + ER_ERROR_DURING_FLUSH_LOGS + + + + ER_ERROR_DURING_CHECKPOINT + + + + ER_NEW_ABORTING_CONNECTION + + + + ER_DUMP_NOT_IMPLEMENTED + + + + ER_FLUSH_MASTER_BINLOG_CLOSED + + + + ER_INDEX_REBUILD + + + + ER_MASTER + + + + ER_MASTER_NET_READ + + + + ER_MASTER_NET_WRITE + + + + ER_FT_MATCHING_KEY_NOT_FOUND + + + + ER_LOCK_OR_ACTIVE_TRANSACTION + + + + ER_UNKNOWN_SYSTEM_VARIABLE + + + + ER_CRASHED_ON_USAGE + + + + ER_CRASHED_ON_REPAIR + + + + ER_WARNING_NOT_COMPLETE_ROLLBACK + + + + ER_TRANS_CACHE_FULL + + + + ER_SLAVE_MUST_STOP + + + + ER_SLAVE_NOT_RUNNING + + + + ER_BAD_SLAVE + + + + ER_MASTER_INFO + + + + ER_SLAVE_THREAD + + + + ER_TOO_MANY_USER_CONNECTIONS + + + + ER_SET_CONSTANTS_ONLY + + + + ER_LOCK_WAIT_TIMEOUT + + + + ER_LOCK_TABLE_FULL + + + + ER_READ_ONLY_TRANSACTION + + + + ER_DROP_DB_WITH_READ_LOCK + + + + ER_CREATE_DB_WITH_READ_LOCK + + + + ER_WRONG_ARGUMENTS + + + + ER_NO_PERMISSION_TO_CREATE_USER + + + + ER_UNION_TABLES_IN_DIFFERENT_DIR + + + + ER_LOCK_DEADLOCK + + + + ER_TABLE_CANT_HANDLE_FT + + + + ER_CANNOT_ADD_FOREIGN + + + + ER_NO_REFERENCED_ROW + + + + ER_ROW_IS_REFERENCED + + + + ER_CONNECT_TO_MASTER + + + + ER_QUERY_ON_MASTER + + + + ER_ERROR_WHEN_EXECUTING_COMMAND + + + + ER_WRONG_USAGE + + + + ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT + + + + ER_CANT_UPDATE_WITH_READLOCK + + + + ER_MIXING_NOT_ALLOWED + + + + ER_DUP_ARGUMENT + + + + ER_USER_LIMIT_REACHED + + + + ER_SPECIFIC_ACCESS_DENIED_ERROR + + + + ER_LOCAL_VARIABLE + + + + ER_GLOBAL_VARIABLE + + + + ER_NO_DEFAULT + + + + ER_WRONG_VALUE_FOR_VAR + + + + ER_WRONG_TYPE_FOR_VAR + + + + ER_VAR_CANT_BE_READ + + + + ER_CANT_USE_OPTION_HERE + + + + ER_NOT_SUPPORTED_YET + + + + ER_MASTER_FATAL_ERROR_READING_BINLOG + + + + ER_SLAVE_IGNORED_TABLE + + + + ER_INCORRECT_GLOBAL_LOCAL_VAR + + + + ER_WRONG_FK_DEF + + + + ER_KEY_REF_DO_NOT_MATCH_TABLE_REF + + + + ER_OPERAND_COLUMNS + + + + ER_SUBQUERY_NO_1_ROW + + + + ER_UNKNOWN_STMT_HANDLER + + + + ER_CORRUPT_HELP_DB + + + + ER_CYCLIC_REFERENCE + + + + ER_AUTO_CONVERT + + + + ER_ILLEGAL_REFERENCE + + + + ER_DERIVED_MUST_HAVE_ALIAS + + + + ER_SELECT_REDUCED + + + + ER_TABLENAME_NOT_ALLOWED_HERE + + + + ER_NOT_SUPPORTED_AUTH_MODE + + + + ER_SPATIAL_CANT_HAVE_NULL + + + + ER_COLLATION_CHARSET_MISMATCH + + + + ER_SLAVE_WAS_RUNNING + + + + ER_SLAVE_WAS_NOT_RUNNING + + + + ER_TOO_BIG_FOR_UNCOMPRESS + + + + ER_ZLIB_Z_MEM_ERROR + + + + ER_ZLIB_Z_BUF_ERROR + + + + ER_ZLIB_Z_DATA_ERROR + + + + ER_CUT_VALUE_GROUP_CONCAT + + + + ER_WARN_TOO_FEW_RECORDS + + + + ER_WARN_TOO_MANY_RECORDS + + + + ER_WARN_NULL_TO_NOTNULL + + + + ER_WARN_DATA_OUT_OF_RANGE + + + + WARN_DATA_TRUNCATED + + + + ER_WARN_USING_OTHER_HANDLER + + + + ER_CANT_AGGREGATE_2COLLATIONS + + + + ER_DROP_USER + + + + ER_REVOKE_GRANTS + + + + ER_CANT_AGGREGATE_3COLLATIONS + + + + ER_CANT_AGGREGATE_NCOLLATIONS + + + + ER_VARIABLE_IS_NOT_STRUCT + + + + ER_UNKNOWN_COLLATION + + + + ER_SLAVE_IGNORED_SSL_PARAMS + + + + ER_SERVER_IS_IN_SECURE_AUTH_MODE + + + + ER_WARN_FIELD_RESOLVED + + + + ER_BAD_SLAVE_UNTIL_COND + + + + ER_MISSING_SKIP_SLAVE + + + + ER_UNTIL_COND_IGNORED + + + + ER_WRONG_NAME_FOR_INDEX + + + + ER_WRONG_NAME_FOR_CATALOG + + + + ER_WARN_QC_RESIZE + + + + ER_BAD_FT_COLUMN + + + + ER_UNKNOWN_KEY_CACHE + + + + ER_WARN_HOSTNAME_WONT_WORK + + + + ER_UNKNOWN_STORAGE_ENGINE + + + + ER_WARN_DEPRECATED_SYNTAX + + + + ER_NON_UPDATABLE_TABLE + + + + ER_FEATURE_DISABLED + + + + ER_OPTION_PREVENTS_STATEMENT + + + + ER_DUPLICATED_VALUE_IN_TYPE + + + + ER_TRUNCATED_WRONG_VALUE + + + + ER_TOO_MUCH_AUTO_TIMESTAMP_COLS + + + + ER_INVALID_ON_UPDATE + + + + ER_UNSUPPORTED_PS + + + + ER_GET_ERRMSG + + + + ER_GET_TEMPORARY_ERRMSG + + + + ER_UNKNOWN_TIME_ZONE + + + + ER_WARN_INVALID_TIMESTAMP + + + + ER_INVALID_CHARACTER_STRING + + + + ER_WARN_ALLOWED_PACKET_OVERFLOWED + + + + ER_CONFLICTING_DECLARATIONS + + + + ER_SP_NO_RECURSIVE_CREATE + + + + ER_SP_ALREADY_EXISTS + + + + ER_SP_DOES_NOT_EXIST + + + + ER_SP_DROP_FAILED + + + + ER_SP_STORE_FAILED + + + + ER_SP_LILABEL_MISMATCH + + + + ER_SP_LABEL_REDEFINE + + + + ER_SP_LABEL_MISMATCH + + + + ER_SP_UNINIT_VAR + + + + ER_SP_BADSELECT + + + + ER_SP_BADRETURN + + + + ER_SP_BADSTATEMENT + + + + ER_UPDATE_LOG_DEPRECATED_IGNORED + + + + ER_UPDATE_LOG_DEPRECATED_TRANSLATED + + + + ER_QUERY_INTERRUPTED + + + + ER_SP_WRONG_NO_OF_ARGS + + + + ER_SP_COND_MISMATCH + + + + ER_SP_NORETURN + + + + ER_SP_NORETURNEND + + + + ER_SP_BAD_CURSOR_QUERY + + + + ER_SP_BAD_CURSOR_SELECT + + + + ER_SP_CURSOR_MISMATCH + + + + ER_SP_CURSOR_ALREADY_OPEN + + + + ER_SP_CURSOR_NOT_OPEN + + + + ER_SP_UNDECLARED_VAR + + + + ER_SP_WRONG_NO_OF_FETCH_ARGS + + + + ER_SP_FETCH_NO_DATA + + + + ER_SP_DUP_PARAM + + + + ER_SP_DUP_VAR + + + + ER_SP_DUP_COND + + + + ER_SP_DUP_CURS + + + + ER_SP_CANT_ALTER + + + + ER_SP_SUBSELECT_NYI + + + + ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG + + + + ER_SP_VARCOND_AFTER_CURSHNDLR + + + + ER_SP_CURSOR_AFTER_HANDLER + + + + ER_SP_CASE_NOT_FOUND + + + + ER_FPARSER_TOO_BIG_FILE + + + + ER_FPARSER_BAD_HEADER + + + + ER_FPARSER_EOF_IN_COMMENT + + + + ER_FPARSER_ERROR_IN_PARAMETER + + + + ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER + + + + ER_VIEW_NO_EXPLAIN + + + + ER_FRM_UNKNOWN_TYPE + + + + ER_WRONG_OBJECT + + + + ER_NONUPDATEABLE_COLUMN + + + + ER_VIEW_SELECT_DERIVED + + + + ER_VIEW_SELECT_CLAUSE + + + + ER_VIEW_SELECT_VARIABLE + + + + ER_VIEW_SELECT_TMPTABLE + + + + ER_VIEW_WRONG_LIST + + + + ER_WARN_VIEW_MERGE + + + + ER_WARN_VIEW_WITHOUT_KEY + + + + ER_VIEW_INVALID + + + + ER_SP_NO_DROP_SP + + + + ER_SP_GOTO_IN_HNDLR + + + + ER_TRG_ALREADY_EXISTS + + + + ER_TRG_DOES_NOT_EXIST + + + + ER_TRG_ON_VIEW_OR_TEMP_TABLE + + + + ER_TRG_CANT_CHANGE_ROW + + + + ER_TRG_NO_SUCH_ROW_IN_TRG + + + + ER_NO_DEFAULT_FOR_FIELD + + + + ER_DIVISION_BY_ZERO + + + + ER_TRUNCATED_WRONG_VALUE_FOR_FIELD + + + + ER_ILLEGAL_VALUE_FOR_TYPE + + + + ER_VIEW_NONUPD_CHECK + + + + ER_VIEW_CHECK_FAILED + + + + ER_PROCACCESS_DENIED_ERROR + + + + ER_RELAY_LOG_FAIL + + + + ER_PASSWD_LENGTH + + + + ER_UNKNOWN_TARGET_BINLOG + + + + ER_IO_ERR_LOG_INDEX_READ + + + + ER_BINLOG_PURGE_PROHIBITED + + + + ER_FSEEK_FAIL + + + + ER_BINLOG_PURGE_FATAL_ERR + + + + ER_LOG_IN_USE + + + + ER_LOG_PURGE_UNKNOWN_ERR + + + + ER_RELAY_LOG_INIT + + + + ER_NO_BINARY_LOGGING + + + + ER_RESERVED_SYNTAX + + + + ER_WSAS_FAILED + + + + ER_DIFF_GROUPS_PROC + + + + ER_NO_GROUP_FOR_PROC + + + + ER_ORDER_WITH_PROC + + + + ER_LOGGING_PROHIBIT_CHANGING_OF + + + + ER_NO_FILE_MAPPING + + + + ER_WRONG_MAGIC + + + + ER_PS_MANY_PARAM + + + + ER_KEY_PART_0 + + + + ER_VIEW_CHECKSUM + + + + ER_VIEW_MULTIUPDATE + + + + ER_VIEW_NO_INSERT_FIELD_LIST + + + + ER_VIEW_DELETE_MERGE_VIEW + + + + ER_CANNOT_USER + + + + ER_XAER_NOTA + + + + ER_XAER_INVAL + + + + ER_XAER_RMFAIL + + + + ER_XAER_OUTSIDE + + + + ER_XAER_RMERR + + + + ER_XA_RBROLLBACK + + + + ER_NONEXISTING_PROC_GRANT + + + + ER_PROC_AUTO_GRANT_FAIL + + + + ER_PROC_AUTO_REVOKE_FAIL + + + + ER_DATA_TOO_LONG + + + + ER_SP_BAD_SQLSTATE + + + + ER_STARTUP + + + + ER_LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR + + + + ER_CANT_CREATE_USER_WITH_GRANT + + + + ER_WRONG_VALUE_FOR_TYPE + + + + ER_TABLE_DEF_CHANGED + + + + ER_SP_DUP_HANDLER + + + + ER_SP_NOT_VAR_ARG + + + + ER_SP_NO_RETSET + + + + ER_CANT_CREATE_GEOMETRY_OBJECT + + + + ER_FAILED_ROUTINE_BREAK_BINLOG + + + + ER_BINLOG_UNSAFE_ROUTINE + + + + ER_BINLOG_CREATE_ROUTINE_NEED_SUPER + + + + ER_EXEC_STMT_WITH_OPEN_CURSOR + + + + ER_STMT_HAS_NO_OPEN_CURSOR + + + + ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG + + + + ER_NO_DEFAULT_FOR_VIEW_FIELD + + + + ER_SP_NO_RECURSION + + + + ER_TOO_BIG_SCALE + + + + ER_TOO_BIG_PRECISION + + + + ER_M_BIGGER_THAN_D + + + + ER_WRONG_LOCK_OF_SYSTEM_TABLE + + + + ER_CONNECT_TO_FOREIGN_DATA_SOURCE + + + + ER_QUERY_ON_FOREIGN_DATA_SOURCE + + + + ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST + + + + ER_FOREIGN_DATA_STRING_INVALID_CANT_CREATE + + + + ER_FOREIGN_DATA_STRING_INVALID + + + + ER_CANT_CREATE_FEDERATED_TABLE + + + + ER_TRG_IN_WRONG_SCHEMA + + + + ER_STACK_OVERRUN_NEED_MORE + + + + ER_TOO_LONG_BODY + + + + ER_WARN_CANT_DROP_DEFAULT_KEYCACHE + + + + ER_TOO_BIG_DISPLAYWIDTH + + + + ER_XAER_DUPID + + + + ER_DATETIME_FUNCTION_OVERFLOW + + + + ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG + + + + ER_VIEW_PREVENT_UPDATE + + + + ER_PS_NO_RECURSION + + + + ER_SP_CANT_SET_AUTOCOMMIT + + + + ER_MALFORMED_DEFINER + + + + ER_VIEW_FRM_NO_USER + + + + ER_VIEW_OTHER_USER + + + + ER_NO_SUCH_USER + + + + ER_FORBID_SCHEMA_CHANGE + + + + ER_ROW_IS_REFERENCED_2 + + + + ER_NO_REFERENCED_ROW_2 + + + + ER_SP_BAD_VAR_SHADOW + + + + ER_TRG_NO_DEFINER + + + + ER_OLD_FILE_FORMAT + + + + ER_SP_RECURSION_LIMIT + + + + ER_SP_PROC_TABLE_CORRUPT + + + + ER_SP_WRONG_NAME + + + + ER_TABLE_NEEDS_UPGRADE + + + + ER_SP_NO_AGGREGATE + + + + ER_MAX_PREPARED_STMT_COUNT_REACHED + + + + ER_VIEW_RECURSIVE + + + + ER_NON_GROUPING_FIELD_USED + + + + ER_TABLE_CANT_HANDLE_SPKEYS + + + + ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA + + + + ER_REMOVED_SPACES + + + + ER_AUTOINC_READ_FAILED + + + + ER_USERNAME + + + + ER_HOSTNAME + + + + ER_WRONG_STRING_LENGTH + + + + ER_NON_INSERTABLE_TABLE + + + + ER_ADMIN_WRONG_MRG_TABLE + + + + ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT + + + + ER_NAME_BECOMES_EMPTY + + + + ER_AMBIGUOUS_FIELD_TERM + + + + ER_FOREIGN_SERVER_EXISTS + + + + ER_FOREIGN_SERVER_DOESNT_EXIST + + + + ER_ILLEGAL_HA_CREATE_OPTION + + + + ER_PARTITION_REQUIRES_VALUES_ERROR + + + + ER_PARTITION_WRONG_VALUES_ERROR + + + + ER_PARTITION_MAXVALUE_ERROR + + + + ER_PARTITION_SUBPARTITION_ERROR + + + + ER_PARTITION_SUBPART_MIX_ERROR + + + + ER_PARTITION_WRONG_NO_PART_ERROR + + + + ER_PARTITION_WRONG_NO_SUBPART_ERROR + + + + ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR + + + + ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR + + + + ER_FIELD_NOT_FOUND_PART_ERROR + + + + ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR + + + + ER_INCONSISTENT_PARTITION_INFO_ERROR + + + + ER_PARTITION_FUNC_NOT_ALLOWED_ERROR + + + + ER_PARTITIONS_MUST_BE_DEFINED_ERROR + + + + ER_RANGE_NOT_INCREASING_ERROR + + + + ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR + + + + ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR + + + + ER_PARTITION_ENTRY_ERROR + + + + ER_MIX_HANDLER_ERROR + + + + ER_PARTITION_NOT_DEFINED_ERROR + + + + ER_TOO_MANY_PARTITIONS_ERROR + + + + ER_SUBPARTITION_ERROR + + + + ER_CANT_CREATE_HANDLER_FILE + + + + ER_BLOB_FIELD_IN_PART_FUNC_ERROR + + + + ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF + + + + ER_NO_PARTS_ERROR + + + + ER_PARTITION_MGMT_ON_NONPARTITIONED + + + + ER_FOREIGN_KEY_ON_PARTITIONED + + + + ER_DROP_PARTITION_NON_EXISTENT + + + + ER_DROP_LAST_PARTITION + + + + ER_COALESCE_ONLY_ON_HASH_PARTITION + + + + ER_REORG_HASH_ONLY_ON_SAME_NO + + + + ER_REORG_NO_PARAM_ERROR + + + + ER_ONLY_ON_RANGE_LIST_PARTITION + + + + ER_ADD_PARTITION_SUBPART_ERROR + + + + ER_ADD_PARTITION_NO_NEW_PARTITION + + + + ER_COALESCE_PARTITION_NO_PARTITION + + + + ER_REORG_PARTITION_NOT_EXIST + + + + ER_SAME_NAME_PARTITION + + + + ER_NO_BINLOG_ERROR + + + + ER_CONSECUTIVE_REORG_PARTITIONS + + + + ER_REORG_OUTSIDE_RANGE + + + + ER_PARTITION_FUNCTION_FAILURE + + + + ER_PART_STATE_ERROR + + + + ER_LIMITED_PART_RANGE + + + + ER_PLUGIN_IS_NOT_LOADED + + + + ER_WRONG_VALUE + + + + ER_NO_PARTITION_FOR_GIVEN_VALUE + + + + ER_FILEGROUP_OPTION_ONLY_ONCE + + + + ER_CREATE_FILEGROUP_FAILED + + + + ER_DROP_FILEGROUP_FAILED + + + + ER_TABLESPACE_AUTO_EXTEND_ERROR + + + + ER_WRONG_SIZE_NUMBER + + + + ER_SIZE_OVERFLOW_ERROR + + + + ER_ALTER_FILEGROUP_FAILED + + + + ER_BINLOG_ROW_LOGGING_FAILED + + + + ER_BINLOG_ROW_WRONG_TABLE_DEF + + + + ER_BINLOG_ROW_RBR_TO_SBR + + + + ER_EVENT_ALREADY_EXISTS + + + + ER_EVENT_STORE_FAILED + + + + ER_EVENT_DOES_NOT_EXIST + + + + ER_EVENT_CANT_ALTER + + + + ER_EVENT_DROP_FAILED + + + + ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG + + + + ER_EVENT_ENDS_BEFORE_STARTS + + + + ER_EVENT_EXEC_TIME_IN_THE_PAST + + + + ER_EVENT_OPEN_TABLE_FAILED + + + + ER_EVENT_NEITHER_M_EXPR_NOR_M_AT + + + + ER_COL_COUNT_DOESNT_MATCH_CORRUPTED + + + + ER_CANNOT_LOAD_FROM_TABLE + + + + ER_EVENT_CANNOT_DELETE + + + + ER_EVENT_COMPILE_ERROR + + + + ER_EVENT_SAME_NAME + + + + ER_EVENT_DATA_TOO_LONG + + + + ER_DROP_INDEX_FK + + + + ER_WARN_DEPRECATED_SYNTAX_WITH_VER + + + + ER_CANT_WRITE_LOCK_LOG_TABLE + + + + ER_CANT_LOCK_LOG_TABLE + + + + ER_FOREIGN_DUPLICATE_KEY + + + + ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE + + + + ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR + + + + ER_STORED_FUNCTION_PREVENTS_SWITCH_BINLOG_FORMAT + + + + ER_NDB_CANT_SWITCH_BINLOG_FORMAT + + + + ER_PARTITION_NO_TEMPORARY + + + + ER_PARTITION_CONST_DOMAIN_ERROR + + + + ER_PARTITION_FUNCTION_IS_NOT_ALLOWED + + + + ER_DDL_LOG_ERROR + + + + ER_NULL_IN_VALUES_LESS_THAN + + + + ER_WRONG_PARTITION_NAME + + + + ER_CANT_CHANGE_TX_ISOLATION + + + + ER_DUP_ENTRY_AUTOINCREMENT_CASE + + + + ER_EVENT_MODIFY_QUEUE_ERROR + + + + ER_EVENT_SET_VAR_ERROR + + + + ER_PARTITION_MERGE_ERROR + + + + ER_CANT_ACTIVATE_LOG + + + + ER_RBR_NOT_AVAILABLE + + + + ER_BASE64_DECODE_ERROR + + + + ER_EVENT_RECURSION_FORBIDDEN + + + + ER_EVENTS_DB_ERROR + + + + ER_ONLY_INTEGERS_ALLOWED + + + + ER_UNSUPORTED_LOG_ENGINE + + + + ER_BAD_LOG_STATEMENT + + + + ER_CANT_RENAME_LOG_TABLE + + + + ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT + + + + ER_WRONG_PARAMETERS_TO_NATIVE_FCT + + + + ER_WRONG_PARAMETERS_TO_STORED_FCT + + + + ER_NATIVE_FCT_NAME_COLLISION + + + + ER_DUP_ENTRY_WITH_KEY_NAME + + + + ER_BINLOG_PURGE_EMFILE + + + + ER_EVENT_CANNOT_CREATE_IN_THE_PAST + + + + ER_EVENT_CANNOT_ALTER_IN_THE_PAST + + + + ER_SLAVE_INCIDENT + + + + ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT + + + + ER_BINLOG_UNSAFE_STATEMENT + + + + ER_SLAVE_FATAL_ERROR + + + + ER_SLAVE_RELAY_LOG_READ_FAILURE + + + + ER_SLAVE_RELAY_LOG_WRITE_FAILURE + + + + ER_SLAVE_CREATE_EVENT_FAILURE + + + + ER_SLAVE_MASTER_COM_FAILURE + + + + ER_BINLOG_LOGGING_IMPOSSIBLE + + + + ER_VIEW_NO_CREATION_CTX + + + + ER_VIEW_INVALID_CREATION_CTX + + + + ER_SR_INVALID_CREATION_CTX + + + + ER_TRG_CORRUPTED_FILE + + + + ER_TRG_NO_CREATION_CTX + + + + ER_TRG_INVALID_CREATION_CTX + + + + ER_EVENT_INVALID_CREATION_CTX + + + + ER_TRG_CANT_OPEN_TABLE + + + + ER_CANT_CREATE_SROUTINE + + + + ER_SLAVE_AMBIGOUS_EXEC_MODE + + + + ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BINLOG_STATEMENT + + + + ER_SLAVE_CORRUPT_EVENT + + + + ER_LOAD_DATA_INVALID_COLUMN + + + + ER_LOG_PURGE_NO_FILE + + + + ER_XA_RBTIMEOUT + + + + ER_XA_RBDEADLOCK + + + + ER_NEED_REPREPARE + + + + ER_DELAYED_NOT_SUPPORTED + + + + WARN_NO_MASTER_INFO + + + + WARN_OPTION_IGNORED + + + + WARN_PLUGIN_DELETE_BUILTIN + + + + WARN_PLUGIN_BUSY + + + + ER_VARIABLE_IS_READONLY + + + + ER_WARN_ENGINE_TRANSACTION_ROLLBACK + + + + ER_SLAVE_HEARTBEAT_FAILURE + + + + ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE + + + + ER_NDB_REPLICATION_SCHEMA_ERROR + + + + ER_CONFLICT_FN_PARSE_ERROR + + + + ER_EXCEPTIONS_WRITE_ERROR + + + + ER_TOO_LONG_TABLE_COMMENT + + + + ER_TOO_LONG_FIELD_COMMENT + + + + ER_FUNC_INEXISTENT_NAME_COLLISION + + + + ER_DATABASE_NAME + + + + ER_TABLE_NAME + + + + ER_PARTITION_NAME + + + + ER_SUBPARTITION_NAME + + + + ER_TEMPORARY_NAME + + + + ER_RENAMED_NAME + + + + ER_TOO_MANY_CONCURRENT_TRXS + + + + WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED + + + + ER_DEBUG_SYNC_TIMEOUT + + + + ER_DEBUG_SYNC_HIT_LIMIT + + + + ER_ERROR_LAST + + + + Helper class that makes it easier to work with the provider. + + + + + Executes a single command against a MySQL database. The is assumed to be + open when the method is called and remains open after the method completes. + + object to use + SQL command to be executed + Array of objects to use with the command. + + + + + Executes a single command against a MySQL database. A new is created + using the given. + + to use + SQL command to be executed + Array of objects to use with the command. + + + + + Executes a single SQL command and returns the first row of the resultset. A new MySqlConnection object + is created, opened, and closed during this method. + + Settings to be used for the connection + Command to execute + Parameters to use for the command + DataRow containing the first row of the resultset + + + + Executes a single SQL command and returns the resultset in a . + A new MySqlConnection object is created, opened, and closed during this method. + + Settings to be used for the connection + Command to execute + containing the resultset + + + + Executes a single SQL command and returns the resultset in a . + A new MySqlConnection object is created, opened, and closed during this method. + + Settings to be used for the connection + Command to execute + Parameters to use for the command + containing the resultset + + + + Executes a single SQL command and returns the resultset in a . + The state of the object remains unchanged after execution + of this method. + + object to use + Command to execute + containing the resultset + + + + Executes a single SQL command and returns the resultset in a . + The state of the object remains unchanged after execution + of this method. + + object to use + Command to execute + Parameters to use for the command + containing the resultset + + + + Updates the given table with data from the given + + Settings to use for the update + Command text to use for the update + containing the new data to use in the update + Tablename in the dataset to update + + + + Executes a single command against a MySQL database, possibly inside an existing transaction. + + object to use for the command + object to use for the command + Command text to use + Array of objects to use with the command + True if the connection should be preserved, false if not + object ready to read the results of the command + + + + Executes a single command against a MySQL database. + + Settings to use for this command + Command text to use + object ready to read the results of the command + + + + Executes a single command against a MySQL database. + + object to use for the command + Command text to use + object ready to read the results of the command + + + + Executes a single command against a MySQL database. + + Settings to use for this command + Command text to use + Array of objects to use with the command + object ready to read the results of the command + + + + Executes a single command against a MySQL database. + + Connection to use for the command + Command text to use + Array of objects to use with the command + object ready to read the results of the command + + + + Execute a single command against a MySQL database. + + Settings to use for the update + Command text to use for the update + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + Execute a single command against a MySQL database. + + Settings to use for the command + Command text to use for the command + Parameters to use for the command + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + Execute a single command against a MySQL database. + + object to use + Command text to use for the command + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + Execute a single command against a MySQL database. + + object to use + Command text to use for the command + Parameters to use for the command + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + Escapes the string. + + The string to escape + The string with all quotes escaped. + + + + Async version of ExecuteDataRow + + Settings to be used for the connection + Command to execute + Parameters to use for the command + DataRow containing the first row of the resultset + + + + Async version of ExecuteNonQuery + + object to use + SQL command to be executed + Array of objects to use with the command. + Rows affected + + + + Async version of ExecuteNonQuery + + to use + SQL command to be executed + Array of objects to use with the command. + Rows affected + + + + Async version of ExecuteDataset + + Settings to be used for the connection + Command to execute + containing the resultset + + + + Async version of ExecuteDataset + + Settings to be used for the connection + Command to execute + Parameters to use for the command + containing the resultset + + + + Async version of ExecuteDataset + + object to use + Command to execute + containing the resultset + + + + Async version of ExecuteDataset + + object to use + Command to execute + Parameters to use for the command + containing the resultset + + + + Async version of UpdateDataset + + Settings to use for the update + Command text to use for the update + containing the new data to use in the update + Tablename in the dataset to update + + + + Async version of ExecuteReader + + object to use for the command + object to use for the command + Command text to use + Array of objects to use with the command + True if the connection should be preserved, false if not + object ready to read the results of the command + + + + Async version of ExecuteReader + + Settings to use for this command + Command text to use + object ready to read the results of the command + + + + Async version of ExecuteReader + + object to use for the command + Command text to use + object ready to read the results of the command + + + + Async version of ExecuteReader + + Settings to use for this command + Command text to use + Array of objects to use with the command + object ready to read the results of the command + + + + Async version of ExecuteReader + + Connection to use for the command + Command text to use + Array of objects to use with the command + object ready to read the results of the command + + + + Async version of ExecuteScalar + + Settings to use for the update + Command text to use for the update + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + Async version of ExecuteScalar + + Settings to use for the command + Command text to use for the command + Parameters to use for the command + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + Async version of ExecuteScalar + + object to use + Command text to use for the command + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + Async version of ExecuteScalar + + object to use + Command text to use for the command + Parameters to use for the command + The first column of the first row in the result set, or a null reference if the result set is empty. + + + + WriteInteger + + + + + + + Summary description for MySqlPool. + + + + + It is assumed that this property will only be used from inside an active + lock. + + + + + Indicates whether this pool is being cleared. + + + + + It is assumed that this method is only called from inside an active lock. + + + + + It is assumed that this method is only called from inside an active lock. + + + + + Removes a connection from the in use pool. The only situations where this method + would be called are when a connection that is in use gets some type of fatal exception + or when the connection is being returned to the pool and it's too old to be + returned. + + + + + + Clears this pool of all idle connections and marks this pool and being cleared + so all other connections are closed when they are returned. + + + + + Remove expired drivers from the idle pool + + + + Closing driver is a potentially lengthy operation involving network + IO. Therefore we do not close expired drivers while holding + idlePool.SyncRoot lock. We just remove the old drivers from the idle + queue and return them to the caller. The caller will need to close + them (or let GC close them) + + + + + Summary description for MySqlPoolManager. + + + + + Remove drivers that have been idle for too long. + + + + + Represents a single(not nested) TransactionScope + + + + + Provides a class capable of executing a SQL script containing + multiple SQL statements including CREATE PROCEDURE statements + that require changing the delimiter + + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the + class. + + The connection. + + + + Initializes a new instance of the + class. + + The query. + + + + Initializes a new instance of the + class. + + The connection. + The query. + + + + Gets or sets the connection. + + The connection. + + + + Gets or sets the query. + + The query. + + + + Gets or sets the delimiter. + + The delimiter. + + + + Executes this instance. + + The number of statements executed as part of the script. + + + + Async version of Execute + + The number of statements executed as part of the script inside. + + + + + + + + + + + + + + + + + + + Gets the statement text. + + The statement text. + + + + Gets the line. + + The line. + + + + Gets the position. + + The position. + + + + + + + + + Initializes a new instance of the class. + + The exception. + + + + Gets the exception. + + The exception. + + + + Gets or sets a value indicating whether this is ignore. + + true if ignore; otherwise, false. + + + + Summary description for MySqlStream. + + + + + ReadPacket is called by NativeDriver to start reading the next + packet on the stream. + + + + + Reads the specified number of bytes from the stream and stores them at given + offset in the buffer. + Throws EndOfStreamException if not all bytes can be read. + + Stream to read from + Array to store bytes read from the stream + The offset in buffer at which to begin storing the data read from the current stream. + Number of bytes to read + + + + LoadPacket loads up and decodes the header of the incoming packet. + + + + + Summary description for Driver. + + + + + Sets the current database for the this connection + + + + + + Retrieve client SSL certificates. Dependent on connection string + settings we use either file or store based certificates. + + + + + Return the appropriate set of connection flags for our + server capabilities and our user requested options. + + + + + Query is the method that is called to send all queries to the server + + + + + Sends the specified file to the server. + This supports the LOAD DATA LOCAL INFILE + + + + + + FetchDataRow is the method that the data reader calls to see if there is another + row to fetch. In the non-prepared mode, it will simply read the next data packet. + In the prepared mode (statementId > 0), it will + + + + + Execution timeout, in milliseconds. When the accumulated time for network IO exceeds this value + TimeoutException is thrown. This timeout needs to be reset for every new command + + + + + + Summary description for PreparedStatement. + + + + + Prepares CommandText for use with the Prepare method + + Command text stripped of all paramter names + + Takes the output of TokenizeSql and creates a single string of SQL + that only contains '?' markers for each parameter. It also creates + the parameterMap array list that includes all the paramter names in the + order they appeared in the SQL + + + + + Used to define a Replication configurarion element in configuration file + + + + + Used to define a Replication server group in configuration file + + + + + Defines a Replication server in configuration file + + + + + + Returns Replication Server Group List + + + + + Adds a Default Server Group to the list + + Group name + Time between reconnections for failed servers + Replication Server Group added + + + + Adds a Server Group to the list + + Group name + ServerGroup type reference + Time between reconnections for failed servers + Server Group added + + + + Gets the next server from a replication group + + Group name + True if the server to return must be a master + Replication Server defined by the Load Balancing plugin + + + + Gets a Server Group by name + + Group name + Server Group if found, otherwise throws an MySqlException + + + + Validates if the replication group name exists + + Group name to validate + True if replication group name is found, otherwise false + + + + Assigns a new server driver to the connection object + + Group name + True if the server connection to assign must be a master + MySqlConnection object where the new driver will be assigned + + + + Class that implements Round Robing Load Balancing technique + + + + + Gets an available server based on Round Robin load balancing + + True if the server to return must be a master + Next available server + + + + Represents a server in Replication environment + + + + + Server name + + + + + Defines if the server is master (True) or slave + + + + + Connection string used to connect to the server + + + + + Defines if the server is available to be considered in load balancing + + + + + Base class used to implement load balancing features + + + + Group name + + + + + Group name + + + + + Retry time between connections to failed servers + + + + + Servers list in the group + + + + + Adds a server into the group + + Server name + True if the server to add is master, False for slave server + Connection string used by this server + + + + + Removes a server from group + + Server name + + + + Gets a server by name + + Server name + Replication server + + + + Must be implemented. Defines the next server for a custom load balancing implementation. + + Defines if the server to return is a master or any + Next server based on the load balancing implementation. + Null if no available server is found. + + + + + Handles a failed connection to a server. + This method can be overrided to implement a custom failover handling + + The failed server + + + + Handles a failed connection to a server. + + The failed server + Exception that caused the failover + + + + return the ordinal for the given column name + + + + + + + Retrieve the value as the given column index + + The column value to retrieve + The value as the given column + + + + Closes the current resultset, dumping any data still on the wire + + + + + Loads the column metadata for the current resultset + + + + + GetForeignKeysOnTable retrieves the foreign keys on the given table. + Since MySQL supports foreign keys on versions prior to 5.0, we can't use + information schema. MySQL also does not include any type of SHOW command + for foreign keys so we have to resort to use SHOW CREATE TABLE and parsing + the output. + + The table to store the key info in. + The table to get the foeign key info for. + Only get foreign keys that match this name. + Should column information be included in the table. + + + + Serializes the given parameter to the given memory stream + + + This method is called by PrepareSqlBuffers to convert the given + parameter to bytes and write those bytes to the given memory stream. + + + True if the parameter was successfully serialized, false otherwise. + + + + Summary description for StoredProcedure. + + + + + Stream that supports timeout of IO operations. + This class is used is used to support timeouts for SQL command, where a + typical operation involves several network reads/writes. + Timeout here is defined as the accumulated duration of all IO operations. + + + + + Construct a TimedStream + + Undelying stream + + + + Figure out whether it is necessary to reset timeout on stream. + We track the current value of timeout and try to avoid + changing it too often, because setting Read/WriteTimeout property + on network stream maybe a slow operation that involves a system call + (setsockopt). Therefore, we allow a small difference, and do not + reset timeout if current value is slightly greater than the requested + one (within 0.1 second). + + + + + Common handler for IO exceptions. + Resets timeout to infinity if timeout exception is + detected and stops the times. + + original exception + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter is null. + + + + + Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter's SelectCommand is null. + + + + + Looks up a localized string similar to Invalid attempt to access a field before calling Read(). + + + + + Looks up a localized string similar to Authentication to host '{0}' for user '{1}' using method '{2}' failed with message: {3}. + + + + + Looks up a localized string similar to Authentication method '{0}' not supported by any of the available plugins.. + + + + + Looks up a localized string similar to Version string not in acceptable format. + + + + + Looks up a localized string similar to The buffer cannot be null. + + + + + Looks up a localized string similar to Buffer is not large enough. + + + + + Looks up a localized string similar to Canceling an executing query requires MySQL 5.0 or higher.. + + + + + Looks up a localized string similar to Canceling an active query is only supported on MySQL 5.0.0 and above. . + + + + + Looks up a localized string similar to Parameters can only be derived for commands using the StoredProcedure command type.. + + + + + Looks up a localized string similar to MySqlCommandBuilder does not support multi-table statements. + + + + + Looks up a localized string similar to MySqlCommandBuilder cannot operate on tables with no unique or key columns. + + + + + Looks up a localized string similar to Chaos isolation level is not supported. + + + + + Looks up a localized string similar to The CommandText property has not been properly initialized.. + + + + + Looks up a localized string similar to The connection is already open.. + + + + + Looks up a localized string similar to Connection unexpectedly terminated.. + + + + + Looks up a localized string similar to Connection must be valid and open. + + + + + Looks up a localized string similar to The connection is not open.. + + + + + Looks up a localized string similar to The connection property has not been set or is null.. + + + + + Looks up a localized string similar to Could not find specified column in results: {0}. + + + + + Looks up a localized string similar to Count cannot be negative. + + + + + Looks up a localized string similar to SetLength is not a valid operation on CompressedStream. + + + + + Looks up a localized string similar to The given value was not in a supported format.. + + + + + Looks up a localized string similar to There is already an open DataReader associated with this Connection which must be closed first.. + + + + + Looks up a localized string similar to The default connection encoding was not found. Please report this as a bug along with your connection string and system details.. + + + + + Looks up a localized string similar to MySQL Connector/Net does not currently support distributed transactions.. + + + + + Looks up a localized string similar to Error creating socket connection. + + + + + Looks up a localized string similar to Fatal error encountered during command execution.. + + + + + Looks up a localized string similar to Fatal error encountered during data read.. + + + + + Looks up a localized string similar to Fatal error encountered attempting to read the resultset.. + + + + + Looks up a localized string similar to File based certificates are only supported when connecting to MySQL Server 5.1 or greater.. + + + + + Looks up a localized string similar to From index and length use more bytes than from contains. + + + + + Looks up a localized string similar to From index must be a valid index inside the from buffer. + + + + + Looks up a localized string similar to Call to GetHostEntry failed after {0} while querying for hostname '{1}': SocketErrorCode={2}, ErrorCode={3}, NativeErrorCode={4}.. + + + + + Looks up a localized string similar to Retrieving procedure metadata for {0} from server.. + + + + + Looks up a localized string similar to Value has an unsupported format.. + + + + + Looks up a localized string similar to An incorrect response was received from the server.. + + + + + Looks up a localized string similar to Index and length use more bytes than to has room for. + + + + + Looks up a localized string similar to Index must be a valid position in the buffer. + + + + + Looks up a localized string similar to You have specified an invalid column ordinal.. + + + + + Looks up a localized string similar to The requested value '{0}' is invalid for the given keyword '{1}'.. + + + + + Looks up a localized string similar to Microsecond must be a value between 0 and 999999.. + + + + + Looks up a localized string similar to Millisecond must be a value between 0 and 999. For more precision use Microsecond.. + + + + + Looks up a localized string similar to Procedure or function '{0}' cannot be found in database '{1}'.. + + + + + Looks up a localized string similar to '{0}' is an illegal value for a boolean option.. + + + + + Looks up a localized string similar to Keyword does not allow null values.. + + + + + Looks up a localized string similar to Keyword not supported.. + + + + + Looks up a localized string similar to ACCESSIBLE + ADD + ALL + ALTER + ANALYZE + AND + AS + ASC + ASENSITIVE + BEFORE + BEGIN + BETWEEN + BIGINT + BINARY + BLOB + BOTH + BY + CALL + CASCADE + CASE + CHANGE + CHAR + CHARACTER + CHECK + COLLATE + COLUMN + COMMIT + CONDITION + CONNECTION + CONSTRAINT + CONTINUE + CONVERT + CREATE + CROSS + CURRENT_DATE + CURRENT_TIME + CURRENT_TIMESTAMP + CURRENT_USER + CURSOR + DATABASE + DATABASES + DAY_HOUR + DAY_MICROSECOND + DAY_MINUTE + DAY_SECOND + DEC + DECIMAL + DECLARE + DEFAULT + DELAYED + DELETE + DESC + DESCRIBE + DETERMINISTIC + DISTINCT + DISTINCTROW + D [rest of string was truncated]";. + + + + + Looks up a localized string similar to Mixing named and unnamed parameters is not allowed.. + + + + + Looks up a localized string similar to INTERNAL ERROR: More than one output parameter row detected.. + + + + + Looks up a localized string similar to Multiple simultaneous connections or connections with different connection strings inside the same transaction are not currently supported.. + + + + + Looks up a localized string similar to NamedPipeStream does not support seeking. + + + + + Looks up a localized string similar to NamedPipeStream doesn't support SetLength. + + + + + Looks up a localized string similar to The new value must be a MySqlParameter object.. + + + + + Looks up a localized string similar to Invalid attempt to call NextResult when the reader is closed.. + + + + + Looks up a localized string similar to When calling stored procedures and 'Use Procedure Bodies' is false, all parameters must have their type explicitly set.. + + + + + Looks up a localized string similar to Nested transactions are not supported.. + + + + + Looks up a localized string similar to The host {0} does not support SSL connections.. + + + + + Looks up a localized string similar to Unix sockets are not supported on Windows.. + + + + + Looks up a localized string similar to Cannot retrieve Windows identity for current user. Connections that use IntegratedSecurity cannot be pooled. Use either 'ConnectionReset=true' or 'Pooling=false' in the connection string to fix.. + + + + + Looks up a localized string similar to The object is not open or has been disposed.. + + + + + Looks up a localized string similar to Offset cannot be negative. + + + + + Looks up a localized string similar to Offset must be a valid position in buffer. + + + + + Looks up a localized string similar to Authentication with old password no longer supported, use 4.1 style passwords.. + + + + + Looks up a localized string similar to Parameter '{0}' has already been defined.. + + + + + Looks up a localized string similar to Parameter cannot have a negative value. + + + + + Looks up a localized string similar to Parameter cannot be null. + + + + + Looks up a localized string similar to Parameter index was not found in Parameter Collection.. + + + + + Looks up a localized string similar to Parameter is invalid.. + + + + + Looks up a localized string similar to Parameter '{0}' must be defined.. + + + + + Looks up a localized string similar to Parameter '{0}' was not found during prepare.. + + + + + Looks up a localized string similar to Password must be valid and contain length characters. + + + + + Looks up a localized string similar to This category includes a series of counters for MySQL.. + + + + + Looks up a localized string similar to .NET Data Provider for MySQL. + + + + + Looks up a localized string similar to The number of times a procedures metadata had to be queried from the server.. + + + + + Looks up a localized string similar to Hard Procedure Queries. + + + + + Looks up a localized string similar to The number of times a procedures metadata was retrieved from the client-side cache.. + + + + + Looks up a localized string similar to Soft Procedure Queries. + + + + + Looks up a localized string similar to same name are not supported.. + + + + + Looks up a localized string similar to Packets larger than max_allowed_packet are not allowed.. + + + + + Looks up a localized string similar to Reading from the stream has failed.. + + + + + Looks up a localized string similar to Invalid attempt to read a prior column using SequentialAccess. + + + + + Looks up a localized string similar to Replicated connections allow only readonly statements.. + + + + + Looks up a localized string similar to Attempt to connect to '{0}' server failed.. + + + + + Looks up a localized string similar to No available server found.. + + + + + Looks up a localized string similar to Replication group '{0}' not found.. + + + + + Looks up a localized string similar to Replicated server not found: '{0}'. + + + + + Looks up a localized string similar to Routine '{0}' cannot be found. Either check the spelling or make sure you have sufficient rights to execute the routine.. + + + + + Looks up a localized string similar to Attempt to call stored function '{0}' without specifying a return parameter. + + + + + Looks up a localized string similar to Connector/Net no longer supports server versions prior to 5.0. + + + + + Looks up a localized string similar to Snapshot isolation level is not supported.. + + + + + Looks up a localized string similar to Socket streams do not support seeking. + + + + + Looks up a localized string similar to Retrieving procedure metadata for {0} from procedure cache.. + + + + + Looks up a localized string similar to Stored procedures are not supported on this version of MySQL. + + + + + Looks up a localized string similar to The stream has already been closed. + + + + + Looks up a localized string similar to The stream does not support reading. + + + + + Looks up a localized string similar to The stream does not support writing. + + + + + Looks up a localized string similar to Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.. + + + + + Looks up a localized string similar to error connecting: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.. + + + + + Looks up a localized string similar to {0}: Connection Closed. + + + + + Looks up a localized string similar to Unable to trace. There are more than Int32.MaxValue connections in use.. + + + + + Looks up a localized string similar to {0}: Error encountered during row fetch. Number = {1}, Message={2}. + + + + + Looks up a localized string similar to {0}: Connection Opened: connection string = '{1}'. + + + + + Looks up a localized string similar to {0}: Error encountered attempting to open result: Number={1}, Message={2}. + + + + + Looks up a localized string similar to {0}: Query Closed. + + + + + Looks up a localized string similar to {0}: Query Normalized: {2}. + + + + + Looks up a localized string similar to {0}: Query Opened: {2}. + + + + + Looks up a localized string similar to {0}: Resultset Opened: field(s) = {1}, affected rows = {2}, inserted id = {3}. + + + + + Looks up a localized string similar to {0}: Resultset Closed. Total rows={1}, skipped rows={2}, size (bytes)={3}. + + + + + Looks up a localized string similar to {0}: Set Database: {1}. + + + + + Looks up a localized string similar to {0}: Statement closed: statement id = {1}. + + + + + Looks up a localized string similar to {0}: Statement executed: statement id = {1}. + + + + + Looks up a localized string similar to {0}: Statement prepared: sql='{1}', statement id={2}. + + + + + Looks up a localized string similar to {0}: Usage Advisor Warning: Query is using a bad index. + + + + + Looks up a localized string similar to {0}: Usage Advisor Warning: The field '{2}' was converted to the following types: {3}. + + + + + Looks up a localized string similar to {0}: Usage Advisor Warning: Query does not use an index. + + + + + Looks up a localized string similar to {0}: Usage Advisor Warning: The following columns were not accessed: {2}. + + + + + Looks up a localized string similar to {0}: Usage Advisor Warning: Skipped {2} rows. Consider a more focused query.. + + + + + Looks up a localized string similar to {0}: MySql Warning: Level={1}, Code={2}, Message={3}. + + + + + Looks up a localized string similar to Type '{0}' is not derived from BaseCommandInterceptor. + + + + + Looks up a localized string similar to Type '{0}' is not derived from BaseExceptionInterceptor. + + + + + Looks up a localized string similar to Unable to connect to any of the specified MySQL hosts.. + + + + + Looks up a localized string similar to Unable to create plugin for authentication method '{0}'. Please see inner exception for details.. + + + + + Looks up a localized string similar to Unable to derive stored routine parameters. The 'Parameters' information schema table is not available and access to the stored procedure body has been disabled.. + + + + + Looks up a localized string similar to Unable to enable query analysis. Be sure the MySql.Data.EMTrace assembly is properly located and registered.. + + + + + Looks up a localized string similar to An error occured attempting to enumerate the user-defined functions. Do you have SELECT privileges on the mysql.func table?. + + + + + Looks up a localized string similar to Unable to execute stored procedure '{0}'.. + + + + + Looks up a localized string similar to There was an error parsing the foreign key definition.. + + + + + Looks up a localized string similar to Unable to retrieve stored procedure metadata for routine '{0}'. Either grant SELECT privilege to mysql.proc for this user or use "check parameters=false" with your connection string.. + + + + + Looks up a localized string similar to Unable to start a second async operation while one is running.. + + + + + Looks up a localized string similar to Unix sockets are not supported on Windows. + + + + + Looks up a localized string similar to Unknown authentication method '{0}' was requested.. + + + + + Looks up a localized string similar to Unknown connection protocol. + + + + + Looks up a localized string similar to Value '{0}' is not of the correct type.. + + + + + Looks up a localized string similar to The requested column value could not be treated as or conveted to a Guid.. + + + + + Looks up a localized string similar to Windows authentication connections are not supported on {0}. + + + + + Looks up a localized string similar to Writing to the stream failed.. + + + + + Looks up a localized string similar to Parameter '{0}' is not found but a parameter with the name '{1}' is found. Parameter names must include the leading parameter marker.. + + + + + This class is modeled after .NET Stopwatch. It provides better + performance (no system calls).It is however less precise than + .NET Stopwatch, measuring in milliseconds. It is adequate to use + when high-precision is not required (e.g for measuring IO timeouts), + but not for other tasks. + + + + + Wrapper around NetworkStream. + + MyNetworkStream is equivalent to NetworkStream, except + 1. It throws TimeoutException if read or write timeout occurs, instead + of IOException, to match behavior of other streams (named pipe and + shared memory). This property comes handy in TimedStream. + + 2. It implements workarounds for WSAEWOULDBLOCK errors, that can start + occuring after stream has times out. For a discussion about the CLR bug, + refer to http://tinyurl.com/lhgpyf. This error should never occur, as + we're not using asynchronous operations, but apparerntly it does occur + directly after timeout has expired. + The workaround is hinted in the URL above and implemented like this: + For each IO operation, if it throws WSAEWOULDBLOCK, we explicitely set + the socket to Blocking and retry the operation once again. + + + + + Set keepalive + timeout on socket. + + socket + keepalive timeout, in seconds + + + + Summary description for API. + + + + + By creating a private ctor, we keep the compiler from creating a default ctor + + + + + Mark - or + signs that are unary ops as no output + + + + + + Helper class to encapsulate shared memory functionality + Also cares of proper cleanup of file mapping object and cew + + + + + Summary description for SharedMemoryStream. + + + + + Summary description for StreamCreator. + + + + + Summary description for Version. + + + + + + + + + + Constructs a new MySqlDateTime object by setting the individual time properties to + the given values. + + The year to use. + The month to use. + The day to use. + The hour to use. + The minute to use. + The second to use. + The microsecond to use. + + + + Constructs a new MySqlDateTime object by using values from the given object. + + The object to copy. + + + + Constructs a new MySqlDateTime object by copying the current value of the given object. + + The MySqlDateTime object to copy. + + + + Enables the contruction of a MySqlDateTime object by parsing a string. + + + + + Indicates if this object contains a value that can be represented as a DateTime + + + + Returns the year portion of this datetime + + + Returns the month portion of this datetime + + + Returns the day portion of this datetime + + + Returns the hour portion of this datetime + + + Returns the minute portion of this datetime + + + Returns the second portion of this datetime + + + + Returns the milliseconds portion of this datetime + expressed as a value between 0 and 999 + + + + + Returns the microseconds portion of this datetime (6 digit precision) + + + + + Returns true if this datetime object has a null value + + + + + Retrieves the value of this as a DateTime object. + + + + Returns this value as a DateTime + + + Returns a MySQL specific string representation of this value + + + + + + + + + Summary description for MySqlUInt64. + + + + + Summary description for MySqlConversionException. + + + + Ctor + + + Returns the Well-Known Text representation of this value + POINT({0} {1})", longitude, latitude + http://dev.mysql.com/doc/refman/4.1/en/gis-wkt-format.html + + + + Get value from WKT format + SRID=0;POINT (x y) or POINT (x y) + + WKT string format + + + + Try to get value from WKT format + SRID=0;POINT (x y) or POINT (x y) + + WKT string format + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + This method returns the literal value received + + The literal to return + The received value + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + Reads a number of characters from the current source Stream and writes the data to the target array at the specified index. + The source Stream to read from. + Contains the array of characteres read from the source Stream. + The starting index of the target array. + The maximum number of characters to read from the source Stream. + The number of characters read. The number will be less than or equal to count depending on the data available in the source Stream. Returns -1 if the end of the stream is reached. + + + Reads a number of characters from the current source TextReader and writes the data to the target array at the specified index. + The source TextReader to read from + Contains the array of characteres read from the source TextReader. + The starting index of the target array. + The maximum number of characters to read from the source TextReader. + The number of characters read. The number will be less than or equal to count depending on the data available in the source TextReader. Returns -1 if the end of the stream is reached. + + + + Converts a string to an array of bytes + + The string to be converted + The new array of bytes + + + + Converts an array of bytes to an array of chars + + The array of bytes to convert + The new array of chars + + + + Writes an object to the specified Stream + + The target Stream + The object to be sent + + + + Writes an object to the specified BinaryWriter + + The target BinaryWriter + The object to be sent + + + + Deserializes an object, or an entire graph of connected objects, and returns the object intance + + Reader instance used to read the object + The object instance + + + + Writes the exception stack trace to the received stream + + Exception to obtain information from + Output sream used to write to + + + Returns the total number of bytes input so far. + + + Returns the total number of bytes output so far. + + + Returns the total number of bytes input so far. + + + Returns the total number of bytes output so far. + +
+
diff --git a/ChessManagement/obj/Debug/ChessManagement.csproj.FileListAbsolute.txt b/ChessManagement/obj/Debug/ChessManagement.csproj.FileListAbsolute.txt index 1168fb6..ce41ba0 100644 --- a/ChessManagement/obj/Debug/ChessManagement.csproj.FileListAbsolute.txt +++ b/ChessManagement/obj/Debug/ChessManagement.csproj.FileListAbsolute.txt @@ -77,3 +77,84 @@ C:\Users\Owner\Google Drive\Visual Studio Projects\ChessManagement\ChessManageme C:\Users\Owner\Google Drive\Visual Studio Projects\ChessManagement\ChessManagement\obj\Debug\ChessManagement.csprojResolveAssemblyReference.cache C:\Users\Owner\Google Drive\Visual Studio Projects\ChessManagement\ChessManagement\obj\Debug\ChessManagement.dll C:\Users\Owner\Google Drive\Visual Studio Projects\ChessManagement\ChessManagement\obj\Debug\ChessManagement.pdb +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\obj\Debug\ChessManagement.csprojResolveAssemblyReference.cache +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\obj\Debug\ChessManagement.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\obj\Debug\ChessManagement.pdb +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\ApplicationInsights.config +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\csc.exe +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\Microsoft.CodeAnalysis.CSharp.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\Microsoft.CodeAnalysis.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\Microsoft.CodeAnalysis.VisualBasic.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\Microsoft.CSharp.Core.targets +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\Microsoft.VisualBasic.Core.targets +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\System.Collections.Immutable.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\System.Reflection.Metadata.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\vbc.exe +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\VBCSCompiler.exe +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\roslyn\VBCSCompiler.exe.config +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\ChessManagement.dll.config +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\ChessManagement.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\ChessManagement.pdb +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Antlr3.Runtime.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\AspNet.ScriptManager.bootstrap.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\AspNet.ScriptManager.jQuery.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\EntityFramework.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\EntityFramework.SqlServer.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.Agent.Intercept.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.DependencyCollector.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.PerfCounterCollector.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.ServerTelemetryChannel.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.Web.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.WindowsServer.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.ApplicationInsights.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.FriendlyUrls.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.Identity.Core.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.Identity.EntityFramework.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.Identity.Owin.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.Web.Optimization.WebForms.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Host.SystemWeb.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Cookies.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Facebook.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Google.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.MicrosoftAccount.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.OAuth.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Twitter.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.ScriptManager.MSAjax.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.ScriptManager.WebForms.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Web.Infrastructure.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\MySql.Data.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Newtonsoft.Json.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Owin.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\System.Web.Optimization.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\System.Web.Providers.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\WebGrease.dll +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.DependencyCollector.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.ServerTelemetryChannel.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.Web.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AI.WindowsServer.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.ApplicationInsights.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\MySql.Data.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\System.Web.Optimization.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Antlr3.Runtime.pdb +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Newtonsoft.Json.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.FriendlyUrls.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\EntityFramework.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\EntityFramework.SqlServer.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.Identity.Core.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.Identity.Owin.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.AspNet.Identity.EntityFramework.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\System.Web.Providers.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Host.SystemWeb.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Facebook.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Cookies.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Google.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.Twitter.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.MicrosoftAccount.xml +C:\Users\Owner\GitKraken Repos\CS360Assignment1\ChessManagement\bin\Microsoft.Owin.Security.OAuth.xml diff --git a/ChessManagement/obj/Debug/ChessManagement.csprojResolveAssemblyReference.cache b/ChessManagement/obj/Debug/ChessManagement.csprojResolveAssemblyReference.cache index 91a0a2e..ba637e9 100644 Binary files a/ChessManagement/obj/Debug/ChessManagement.csprojResolveAssemblyReference.cache and b/ChessManagement/obj/Debug/ChessManagement.csprojResolveAssemblyReference.cache differ diff --git a/ChessManagement/obj/Debug/ChessManagement.dll b/ChessManagement/obj/Debug/ChessManagement.dll index bb48bf3..efe3472 100644 Binary files a/ChessManagement/obj/Debug/ChessManagement.dll and b/ChessManagement/obj/Debug/ChessManagement.dll differ diff --git a/ChessManagement/obj/Debug/ChessManagement.pdb b/ChessManagement/obj/Debug/ChessManagement.pdb index 02077b1..82bbf5e 100644 Binary files a/ChessManagement/obj/Debug/ChessManagement.pdb and b/ChessManagement/obj/Debug/ChessManagement.pdb differ diff --git a/ChessManagement/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ChessManagement/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index b3a3a97..db2c23a 100644 Binary files a/ChessManagement/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/ChessManagement/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ