What's New

MySQL Connector/Net
What's New

Connector/Net 6.0
  • Entity framework support
  • Significant performance improvements
  • Significantly improved SQL tokenizing
  • Completely rewritten Visual Studio integration

Connector/Net 5.2
  • Ability to clear a single connection pool or all connection pools.
  • DDEX provider now works under Visual Studio 2008
  • Batched commands are now supported with MySqlDataAdapter
  • Added MySqlScript class for executing SQL scripts
  • Added MySqlBulkLoader class for easily loading large amounts of data
  • Changed to recommending @ as parameter marker
  • BINARY(16) columns are now treated as Guid objects
  • Added profile provider and improved provider schema
  • Implemented interactive session connection string option
  • Parameters schema collection now uses INFORMATION_SCHEMA when connected to a 6.0 server
  • Added 'Functions Return String' connection string option

Connector/Net 5.1
  • ASP.Net membership and role providers are now included.
  • Compact Framework 2.0 now supported.
  • Integration into Visual Studio 2005
  • Added connection string option to not automatically enlist in a current transaction

© 2004-2008 MySQL AB. All rights reserved.


Compatibility

Compatibility
MySQL compatibility

Connector/Net fully supports all GA versions of MySQL from 3.23 to 5.0. Connector/Net also supports the latest pre-release versions of MySQL 5.1 and 6.0.

Framework compatibility

Connector/Net is tested and works with .NET Frameworks 1.1 and 2.0 and .NET Compact Framework 2.0. It is also compatible with Mono.

Developer Tools

Connector/Net currently provides for tight integration with Visual Studio 2005 Standard and higher. This includes DDEX integration.


Prerequisites

Requirements

Installation

The only requirement for installation is .NET 2.0. The installation will register the MySql.Data assembly into the Global Assembly Cache.

General Operation

Connector/Net requires the following MySQL rights:

  • SELECT right for the INFORMATION_SCHEMA database.
  • EXECUTE right for the SHOW CREATE TABLE statement.
  • SELECT right for the MYSQL.FUNC table (required for operations with User Defined Functions (UDF)).
  • EXECUTE right for the SHOW ENGINE STATUS statement (required for retrieving extended error information).
  • Appropriate rights for performed operations (e.g. the SELECT right is required to browse data from a table, etc.).

ASP.Net Deployment

Connector/Net will only function correctly under ASP.Net hosts that use a trust model that allows socket access. This includes Full trust, High trust, or a customized Medium trust scenario that has has SocketPermission added to it. For more information, please see Medium Trust.


Installation

Installation

Connector/Net is delivered in a package which can be used to install, uninstall, or reinstall the product on all Windows operating systems (note that the operating system must at the same time meet system requirements for Visual Studio 2005). If your version of Windows is older than Windows XP, be sure to upgrade the Windows Installer system to the latest version (see http://support.microsoft.com/default.aspx?scid=kb;EN-US;292539 for detail).

To install Connector/Net, right-click on the MSI file, and select Install. The installation process is as follows:

  1. Standard Welcome dialog opens. Click Next to continue installation.
  2. License agreement (GNU GPL) window opens. Accept the agreement, and click Next to continue.
  3. Destination folder choice dialog opens. Here you can point out the folder, where the connector will be installed. After choosing the destination folder, click Next to continue.
  4. Ready to install confirmation window opens. Click Install to start the installation process.
  5. The installation window opens, and the information about performed installation actions is displayed. At the end of this step, the Visual Studio command table is rebuilt. Note: This step may take several minutes.
  6. The Installation complete notification appears. Click Finish to complete the installation process.

To uninstall the product, you can use either Add/Remove Program page, or the same MSI-package. Choose the Remove option, and the Provider will be automatically uninstalled.


Support

Support

Here at MySQL, we make every effort to test and put out quality products. However, it is inevitable that users will find problems. When that happens you have several choices.

Mailing Lists

MySQL has several mailing lists available covering a variety of topics. There are lists focused on cluster issues, gui tools, Java, .NET, Win32 issues, and others. And if you can't find a list that matches your needs, we have a general list. These lists are monitored by MySQL support personnel and developers and your question will often get a response very quickly.

The mailing lists can be found at http://lists.mysql.com/

Forums

For those of you that prefer a more web-centric experience, you can use our online web forums. These forums cover an even more diverse array of topics and are also constantly monitored by MySQL support personnel and developrs. Our forums even include RSS feed and ATOM feeds!

You can find the forums at http://forums.mysql.com.

Paid support

And for our customers who require that extra level of support we offer paid support packages. You can find out more about those at http://www.mysql.com/support/


Editing Tables

Editing Tables

Connector/Net contains a table editor, which enables the visual creation and modification of tables.

The Table Editor can be accessed through a mouse action on table-type node of Server Explorer. To create a new table, right-click on the Tables node (under the connection node) and choose the Create Table command from the context menu. To modify an existing table, double-click on the node of the table you wish to modify, or right-click on this node and choose the Alter Table command from the context menu. Either of the commands opens the Table Editor.

The table editor is implemented in the manner of the well-known Query Browser Table Editor, but with minor differences.

Table Editor consists of the following parts:

  • Columns Editor - a data grid on top of the Table Editor. Use the Columns grid for column creation, modification, and deletion.
  • Indexes tab - a tab on bottom of the Table Editor. Use the Indexes tab for indexes management.
  • Foreign Keys tab - a tab on bottom of the Table Editor. Use the Foreign Keys tab for foreign keys management.
  • Column Details tab - a tab on bottom of the Table Editor. Use the Column Details tab to set advanced column options.
  • Properties window - a standard Visual Studio Properties window, where the properties of the edited table are displayed. Use the Properties window to set the table properties.

Each of these areas is discussed in children topics.

To save changes you have made in the Table Editor, use either Save or Save All button of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.


Column Editor

Column Editor

You can use the Column Editor to set or change the name, data type, default value, and other properties of a table column. To set the focus to a needed cell of a grid, use the mouse click. Also you can move through the grid using Tab and Shift+Tab keys.

To set or change the name, data type, default value and comment of a column, activate the appropriate cell and type the desired value.

To set or unset flag-type column properties (being a primary key, NOT NULL, auto incremented, flags), check or uncheck the corresponding check boxes. Note that the set of column flags depends on its data type.

To reorder columns, index columns or foreign key columns in the Column Editor, select the whole column you wish to reorder by clicking on the selector column on the left of the column grid. Then move the column by using Ctrl+Up (to move the column up) or Ctrl+Down (to move the column down) keys.

To delete a column, select it by clicking on the selector column on the left of the column grid, then press the Delete button on a keyboard.


Editing Indexes

Editing Indexes

Indexes management is performed via the Indexes tab.

To add an index, press the "+" button and set its properties in the Index Settings group box on the right. You can set the index name, index kind, index type, and a set of index columns.

To remove an index, select it in the list box on the left, and press the "-" button.

To change index settings, select the needed index in the list box on the left. The detailed information about the index is displayed in the Index Settings group box. Change the desired values.

The possibility to convert a table column to the index column by Drag&Drop is not currently supported. However, you can add new index columns to a table, and set the table columns by using the embedded combo box editor in the Indexes tab.


Editing Foreign Keys

Editing Foreign Keys

Foreign Keys management is performed via the Foreign Keys tab.

To add a foreign key, press the "+" button and set its properties in the Foreign Keys Settings group box on the right. You can set the foreign key name, referenced table name, foreign key columns, and actions upon update and delete.

To remove a foreign key, select it in the list box on the left, and press the "-" button.

To change foreign key settings, select the required foreign key in the list box on the left. The detailed information about the foreign key is displayed in the Foreign Keys Settings group box. Change the desired values.

When a foreign key is changed, the provider actually generates two queries: the first query drops the changed key(s), and the second one recreates one(s) with new values. The reason for such a behavior is to avoid the bugs bug #8377 and 8919.

Note: If changed values are for some reason inconsistent and cause the second query to fail, all affected foreign keys will be just dropped. If this is the case, the MySQL DDEX Provider will mark them as new in the Table Editor, and you will have the possibility to recreate them later. But if you close the Table Editor without save, these foreign keys will be lost.


Column Details

Column Details

The Column Details tab can be used to set column options. In addition to the main columns properties presented in the Column Editor, in the Column Details tab you can set two advanced options: the character set, and the collation sequence.


Table Properties

Table Properties

The provider Table Editor has no separate tabs for table options and advanced options. All table options can be browsed and changed using the Properties window of Visual Studio 2005.

The following table properties can be set:

Auto Increment
Average Row Length
Character Set
Checksum for Rows
Collation
Comment
Connection
Data Directory
Delay Key Updates
Engine
Index Directory
Insert Method
Maximum Rows
Minimum Rows
Name
Pack Keys
Password
Row Format
Union

Some of these properties may have arbitrary text values, others accept values from a predefined set. In the latter case set the desired value using an embedded combo box.

The properties Schema and Server are read only.


Making a connection

Making a connection

Once the connector is installed, you can use it to create, modify, and delete connections to MySQL databases. To create a connection with a MySQL database, perform the following steps:

  • Start Visual Studio 2005, and open the Server Explorer window (View -> Server Explorer option in the main Visual Studio 2005 menu, or Ctrl+W, L hot keys).
  • Right-click on the Data Connections node, and choose the Add Connection button.
  • Add Connection dialog opens. Press the Change button to choose MySQL Database as a data source.
  • Change Data Source dialog opens. Choose MySQL Database in the list of data sources (or the option, if MySQL Database is absent), and then choose .NET Framework Data Provider for MySQL in the combo box of data providers.
  • Input the connection settings: the server host name (for example, localhost if the MySQL server is installed on the local machine), the user name, the password, and the default schema name. Note that you must specify the default schema name to open the connection.
  • You can also set the port to connect with the MySQL server by pressing the Advanced button. To test connection with the MySQL server, ser the server host name, the user name, and the password, and press the Test Connection button. If the test succeeds, the success confirmation dialog opens.
  • After you set all settings and test the connection, press OK. The newly created connection is displayed in Server Explorer. Now you can work with the MySQL server through standard Server Explorer GUI.

After the connection is successfully established, all settings are saved for future use. When you start Visual Studio for the next time, just open the connection node in Server Explorer to establish a connection to the MySQL server again.

To modify and delete a connection, use the Server Explorer context menu for the corresponding node. You can modify any of the settings just by overwriting the existing values with new ones. Note that the connection may be modified or deleted only if no active editor for its objects is opened: otherwise you may loose your data.


Editing Table Data

Editing Table Data

To create a new view, right-click on the Views node under the connection node in Server Explorer. From the node's context menu, choose the Create View command. This command opens the SQL Editor.

To modify an existing view, double-click on the node of the view you wish to modify, or right-click on this node and choose the Alter View command from the context menu. Either of the commands opens the SQL Editor.

To create or modify the view definition using SQL Editor, type the appropriate SQL statement in the SQL Editor. Note: You should enter only the defining statement itself, without the CREATE VIEW AS preface.

All other view properties can be set in the Properties window. These properties are:

Algorithm
Check Option
Definer
Name
Security Type

Some of these properties can have arbitrary text values, others accept values from a predefined set. In the latter case set the desired value using the embedded combo box.

The properties Is Updatable, Schema, and Server are read only.

To save changes you have made, use either Save or Save All buttons of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.


Editing Views

Editing Views

To create a new view, right click the Views node under the connection node in Server Explorer. From the node's context menu, choose the Create View command. This command opens the SQL Editor.

To modify an existing view, double click on a node of the view you wish to modify, or right click on this node and choose the Alter View command from a context menu. Either of the commands opens the SQL Editor.

To create or alter the view definition using SQL Editor, type the appropriate SQL statement in the SQL Editor. Note: you should enter only the defining statement itself, without the CREATE VIEW AS preface.

All other view properties can be set in the Properties window. These properties are:

Algorithm
Check Option
Definer
Name
Security Type

Some of these properties can have arbitrary text values, others accept values from a predefined set. In the latter case you set the desired value with an embedded combobox.

The properties Is Updatable, Schema and Server are readonly.

To save changes you have made, use either Save or Save All buttons of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.


Editing Stored Procedures and Functions

Editing Stored Procedures and Functions

To create a new stored procedure, right-click on the Stored Procedures node under the connection node in Server Explorer. From the node's context menu, choose the Create Routine command. This command opens the SQL Editor.

To create a new stored function, right-click on the Functions node under the connection node in Server Explorer. From the node's context menu, choose the Create Routine command.

To modify an existing stored routine (procedure or function), double-click on the node of the routine you wish to modify, or right-click on this node and choose the Alter Routine command from the context menu. Either of the commands opens the SQL Editor.

To create or alter the routine definition using SQL Editor, type this definition in the SQL Editor using standard SQL. All other routine properties can be set in the Properties window. These properties are:

Comment
Data Access
Definer
Is Deterministic
Security Type

Some of these properties can have arbitrary text values, others accept values from a predefined set. In the latter case set the desired value using the embedded combo box.

You can also set all the options directly in the SQL Editor, using the standard CREATE PROCEDURE or CREATE FUNCTION statement. However, it is recommended to use the Properties window instead.

Note: You should never add the CREATE preface to the routine definition.

The properties Name, Schema, and Server in the Properties window are read only. Set or change the procedure name in the SQL editor.

To save changes you have made, use either Save or Save All buttons of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.


Editing Triggers

Editing Triggers

To create a new trigger, right-click on the node of the table, for which you wish to add a trigger. From the node's context menu, choose the Create Trigger command. This command opens the SQL Editor.

To modify an existing trigger, double-click on the node of the trigger you wish to modify, or right-click on this node and choose the Alter Trigger command from the context menu. Either of the commands opens the SQL Editor.

To create or alter the trigger definition using SQL Editor, type the trigger statement in the SQL Editor using standard SQL.

Note: You should enter only the trigger statement, i.e. the part of the CREATE TRIGGER query that is placed after the FOR EACH ROW clause.

All other trigger properties are set in the Properties window. These properties are:

Definer
Event Manipulation
Name
Timing

Some of these properties can have arbitrary text values, others accept values from a predefined set. In the latter case set the desired value using the embedded combo box.

The properties Event Table, Schema, and Server in the Properties window are read only.

To save changes you have made, use either Save or Save All buttons of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.


Editing User Defined Functions (UDF)

Editing User Defined Functions (UDF)

To create a new User Defined Function (hereafter - UDF), right-click on the UDFs node under the connection node in Server Explorer. From the node's context menu, choose the Create UDF command. This command opens the UDF Editor.

To modify an existing UDF, double-click on the node of the UDF you wish to modify, or right-click on this node and choose the Alter UDF command from the context menu. Either of the commands opens the UDF Editor.

The UDF editor allows you to set the following properties:

Name
So-name (DLL name)
Return type
Is Aggregate

There are text fields for both names, a combo box for the return type, and a check box to indicate if the UDF is aggregate. All these options are also accessible via the Properties window.

The property Server in the Properties window is read only.

To save changes you have made, use either Save or Save All buttons of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.


Cloning Database Objects

Cloning Database Objects

Tables, views, stored procedures, and functions can be cloned using the appropriate Clone command from the context menu: Clone Table, Clone View, Clone Routine. The clone commands open the corresponding editor for a new object: the Table Editor for cloning a table, and the SQL Editor for cloning a view or a routine.

The editor is filled with values of the original object. You can modify these values in a usual manner.

To save the cloned object, use either Save or Save All buttons of the Visual Studio main toolbar, or just press Ctrl+S. Before changes are saved, you will be asked to confirm the execution of the corresponding SQL query in a confirmation dialog.


Dropping Database Objects

Dropping Database Objects

Tables, views, stored routines, triggers, and UDFs can be dropped with the appropriate Drop command selected from its context menu: Drop Table, Drop View, Drop Routine, Drop Trigger, Drop UDF.

You will be asked to confirm the execution of the corresponding drop query in a confirmation dialog.

Dropping of multiple objects is not supported.


ASP.NET Provider Model

ASP.NET Provider Model Support

MySQL Connector/Net provides support for the ASP.NET 2.0 provider model. This model allows application developers to focus on the business logic of there application instead of having to recreate such boilerplate items as membership and roles support. Currently, only membership and role providers are supplied although session state and profile providers will be provided in upcoming releases.

Installing The Providers

The installation of Connector/Net 5.1 or later will install the providers and register them in your machines .NET configuration file. The providers are implemented in the file mysql.web.dll and this file can be found in your Connector/Net installation folder. There is no need to run any type of SQL script to setup the database as the providers create and maintain the proper schema automatically.

Using The Providers

The easiest way to start using the providers is to use the ASP.NET configuration tool that is available on the Solution Explorer toolbar when you have a website project loaded.

In the web pages that open you will be able to select the MySQL membership and roles provider by indicating that you want to pick a custom provider for each area.

When the provider is installed, it creates a dummy connection string named LocalMySqlServer. This has to be done so that the provider will work in the ASP.NET configuration tool. However, you will want to override this connection string in your web.config file. You do this by first removing the dummy connection string and then adding in the proper one. Here is an example:

<connectionStrings>
<remove name="LocalMySqlServer"/>
<add name="LocalMySqlServer" connectionString="server=xxx;uid=xxx;pwd=xxx"/>
</connectionStrings>

Distribution

To use the providers on a production server you will need to distribute the MySql.Data and the MySql.Web assemblies and either register them in the remote systems Global Assembly Cache or keep them in your applications bin folder.


Binary/Non-Binary Issues

Dealing with Binary/Non-Binary issues

There are certain situations where MySQL will return incorrect metadata about one or more columns. More specifically, the server will sometimes report that a column is binary when it is not and vice versa. In these situations, it becomes practically impossible for the connector to be able to correctly identify the correct metadat.

Some examples of situations that may return incorrect metadata are:

  • Execution of SHOW PROCESSLIST. Some of the columns will be returned as binary even though they only hold string data.
  • When a temp table is used to process a resultset, some columns may be returned with incorrect binary flags.
  • Some server functions such DATE_FORMAT will incorrectly return the column as binary.

With the availability of BINARY and VARBINARY data types it is important that we respect the metadata returned by the sever. However, we are aware that some existing applications may break with this change so we are creating a connection string option to enable or disable it. By default, Connector/Net 5.1 will respect the binary flags returned by the server. This will mean that you may need to make small changes to your application to accomodate this change.

In the event that the changes required to your application would be too large, you can add 'respect binary flags=false' to your connection string. This will cause the connector to use the prior behavior. In a nutshell, that behavior was that any column that is marked as string, regardless of binary flags, will be returned as string. Only columns that are specifically marked as a BLOB will be returned as BLOB.


Character Sets

Character Sets
Treating Binary Blobs As UTF8

MySQL doesn't currently support 4 byte UTF8 sequences. This makes it difficult to represent some multi-byte languages such as Japanese. To try and alleviate this, Connector/Net now supports a mode where binary blobs can be treated as strings.

To do this, you set the 'Treat Blobs As UTF8' connection string keyword to yes. This is all that needs to be done to enable conversion of all binary blobs to UTF8 strings. If you wish to convert only some of your blob columns, then you can make use of the 'BlobAsUTF8IncludePattern' and 'BlobAsUTF8ExcludePattern' keywords. These should be set to the regular expression pattern that matches the column names you wish to include or exlude respectively.

One thing to note is that the regular expression patterns can both match a single column. When this happens, the include pattern is applied before the exclude pattern. The result, in this case, would be that the column would be excluded. You should also be aware that this mode does not apply to columns of type BINARY or VARBINARY and also do not apply to non-binary BLOB columns.

Currently this mode only applies to reading strings out of MySQL. To insert 4-byte UTF8 strings into blob columns you will need to use the .NET Encoding.GetBytes function to convert your string to a series of bytes. You can then set this byte array as a parameter for a BLOB column.


Working with medium trust

Working with medium trust

.NET applications operate under a given trust level. Normal desktop applications operate under full trust while web applications that are hosted in shared environments are normally run under the medium trust level. Some hosting providers host shared applications in their own app pools and allow the application to run under full trust, but this seems to be the exception rather than the rule.

Connector/Net versions prior to 5.0.8 and 5.1.3 were not compatible with medium trust hosting. Starting with these versions, Connector/Net can be used under medium trust hosting that has been modified to allow the use of sockets for communication. By default, medium trust does not include SocketPermission. Connector/Net uses sockets to talk with the MySQL server so it is required that a new trust level be created that is an exact clone of medium trust but that has SocketPermission added.


Reference

[image]

MySQL Connector/Net
Reference
Send Feedback

Namespaces

Namespace | Description
MySql.Data.MySqlClient |
MySql.Data.MySqlClient.Properties |
MySql.Data.Types |
MySql.Web.Common |
MySql.Web.Profile |
MySql.Web.Properties |
MySql.Web.Security |

Send comments on this topic to support@mysql.com


MySql.Data.MySqlClient Namespace

[image]

MySQL Connector/Net
MySql.Data.MySqlClient Namespace
Send Feedback

Classes

Class | Description
MySqlBulkLoader |
MySqlClientFactory | DBProviderFactory implementation for MysqlClient.
MySqlCommand | Represents a SQL statement to execute against a MySQL database. This class cannot be inherited.
MySqlCommandBuilder | Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated MySQL database. This class cannot be inherited.
MySqlConnection | Represents an open connection to a MySQL Server database. This class cannot be inherited.
MySqlConnectionStringBuilder |
MySqlDataAdapter | 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.
MySqlDataReader | Provides a means of reading a forward-only stream of rows from a MySQL database. This class cannot be inherited.
MySqlError | Collection of error codes that can be returned by the server
MySqlException | The exception that is thrown when MySQL returns an error. This class cannot be inherited.
MySqlHelper | Helper class that makes it easier to work with the provider.
MySqlInfoMessageEventArgs | Provides data for the InfoMessage event. This class cannot be inherited.
MySqlParameter | Represents a parameter to a MySqlCommand, and optionally, its mapping to DataSet columns. This class cannot be inherited.
MySqlParameterCollection | Represents a collection of parameters relevant to a MySqlCommand as well as their respective mappings to columns in a DataSet. This class cannot be inherited.
MySqlRowUpdatedEventArgs | Provides data for the RowUpdated event. This class cannot be inherited.
MySqlRowUpdatingEventArgs | Provides data for the RowUpdating event. This class cannot be inherited.
MySqlScript | Provides a class capable of executing a SQL script containing multiple SQL statements including CREATE PROCEDURE statements that require changing the delimiter
MySqlScriptErrorEventArgs |
MySqlScriptEventArgs |
MySqlTransaction | Represents a SQL transaction to be made in a MySQL database. This class cannot be inherited.

Delegates

Delegate | Description
MySqlInfoMessageEventHandler | Represents the method that will handle the InfoMessage event of a MySqlConnection.
MySqlRowUpdatedEventHandler | Represents the method that will handle the RowUpdated event of a MySqlDataAdapter.
MySqlRowUpdatingEventHandler | Represents the method that will handle the RowUpdating event of a MySqlDataAdapter.
MySqlScriptErrorEventHandler |
MySqlStatementExecutedEventHandler |

Enumerations

Enumeration | Description
MySqlBulkLoaderConflictOption |
MySqlBulkLoaderPriority |
MySqlConnectionProtocol | Allows the user to specify the type of connection that should be used.
MySqlDbType | Specifies MySQL specific data type of a field, property, for use in a MySqlParameter.
MySqlDriverType | Specifies the connection types supported
MySqlErrorCode | Provides a reference to error codes returned by MySQL.


MySqlBulkLoader Class

[image]

MySQL Connector/Net
MySqlBulkLoader Class
Members See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public class MySqlBulkLoader
Visual Basic (Declaration)
Public Class MySqlBulkLoader
Visual C++
public ref class MySqlBulkLoader

Inheritance Hierarchy

System..::.Object
MySql.Data.MySqlClient..::.MySqlBulkLoader

See Also

MySqlBulkLoader Members
MySql.Data.MySqlClient Namespace


MySqlBulkLoader Members

[image] [image]

MySQL Connector/Net
MySqlBulkLoader Members
MySqlBulkLoader Class Constructors Methods Properties See Also Send Feedback

The MySqlBulkLoader type exposes the following members.

Constructors

Name | Description
MySqlBulkLoader |

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
Load | Execute the load operation
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
CharacterSet | Gets or sets the character set.
Columns | Gets the columns.
ConflictOption | Gets or sets the conflict option.
Connection | Gets or sets the connection.
EscapeCharacter | Gets or sets the escape character.
Expressions | Gets the expressions.
FieldQuotationCharacter | Gets or sets the field quotation character.
FieldQuotationOptional | Gets or sets a value indicating whether [field quotation optional].
FieldTerminator | Gets or sets the field terminator.
FileName | Gets or sets the name of the file.
LinePrefix | Gets or sets the line prefix.
LineTerminator | Gets or sets the line terminator.
Local | Gets or sets a value indicating whether the filename that is to be loaded is local to the client or not
NumberOfLinesToSkip | Gets or sets the number of lines to skip.
Priority | Gets or sets the priority.
TableName | Gets or sets the name of the table.
Timeout | Gets or sets the timeout.

See Also

MySqlBulkLoader Class


MySqlBulkLoader Constructor

[image]

MySQL Connector/Net
MySqlBulkLoader Constructor
MySqlBulkLoader Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlBulkLoader(
    MySqlConnection connection
)
Visual Basic (Declaration)
Public Sub New ( _
    connection As MySqlConnection _
)
Visual C++
public:
MySqlBulkLoader(
    MySqlConnection^ connection
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection

See Also

MySqlBulkLoader Class


MySqlBulkLoader Methods

[image] [image]

MySQL Connector/Net
MySqlBulkLoader Methods
MySqlBulkLoader Class See Also Send Feedback

The MySqlBulkLoader type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
Load | Execute the load operation
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlBulkLoader Class


Load Method

[image]

MySQL Connector/Net
MySqlBulkLoader..::.Load Method
MySqlBulkLoader Class See Also Send Feedback
Execute the load operation

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Load()
Visual Basic (Declaration)
Public Function Load As Integer
Visual C++
public:
int Load()

Return Value

The number of rows inserted.

See Also

MySqlBulkLoader Class


MySqlBulkLoader Properties

[image] [image]

MySQL Connector/Net
MySqlBulkLoader Properties
MySqlBulkLoader Class See Also Send Feedback

The MySqlBulkLoader type exposes the following members.

Properties

Name | Description
CharacterSet | Gets or sets the character set.
Columns | Gets the columns.
ConflictOption | Gets or sets the conflict option.
Connection | Gets or sets the connection.
EscapeCharacter | Gets or sets the escape character.
Expressions | Gets the expressions.
FieldQuotationCharacter | Gets or sets the field quotation character.
FieldQuotationOptional | Gets or sets a value indicating whether [field quotation optional].
FieldTerminator | Gets or sets the field terminator.
FileName | Gets or sets the name of the file.
LinePrefix | Gets or sets the line prefix.
LineTerminator | Gets or sets the line terminator.
Local | Gets or sets a value indicating whether the filename that is to be loaded is local to the client or not
NumberOfLinesToSkip | Gets or sets the number of lines to skip.
Priority | Gets or sets the priority.
TableName | Gets or sets the name of the table.
Timeout | Gets or sets the timeout.

See Also

MySqlBulkLoader Class


CharacterSet Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.CharacterSet Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the character set.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string CharacterSet { get; set; }
Visual Basic (Declaration)
Public Property CharacterSet As String
Visual C++
public:
property String^ CharacterSet {
    String^ get ();
    void set (String^ value);
}

Field Value

The character set.

See Also

MySqlBulkLoader Class


Columns Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.Columns Property
MySqlBulkLoader Class See Also Send Feedback
Gets the columns.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public StringCollection Columns { get; }
Visual Basic (Declaration)
Public ReadOnly Property Columns As StringCollection
Visual C++
public:
property StringCollection^ Columns {
    StringCollection^ get ();
}

Field Value

The columns.

See Also

MySqlBulkLoader Class


ConflictOption Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.ConflictOption Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the conflict option.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlBulkLoaderConflictOption ConflictOption { get; set; }
Visual Basic (Declaration)
Public Property ConflictOption As MySqlBulkLoaderConflictOption
Visual C++
public:
property MySqlBulkLoaderConflictOption ConflictOption {
    MySqlBulkLoaderConflictOption get ();
    void set (MySqlBulkLoaderConflictOption value);
}

Field Value

The conflict option.

See Also

MySqlBulkLoader Class


Connection Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.Connection Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the connection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnection Connection { get; set; }
Visual Basic (Declaration)
Public Property Connection As MySqlConnection
Visual C++
public:
property MySqlConnection^ Connection {
    MySqlConnection^ get ();
    void set (MySqlConnection^ value);
}

Field Value

The connection.

See Also

MySqlBulkLoader Class


EscapeCharacter Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.EscapeCharacter Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the escape character.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public char EscapeCharacter { get; set; }
Visual Basic (Declaration)
Public Property EscapeCharacter As Char
Visual C++
public:
property wchar_t EscapeCharacter {
    wchar_t get ();
    void set (wchar_t value);
}

Field Value

The escape character.

See Also

MySqlBulkLoader Class


Expressions Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.Expressions Property
MySqlBulkLoader Class See Also Send Feedback
Gets the expressions.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public StringCollection Expressions { get; }
Visual Basic (Declaration)
Public ReadOnly Property Expressions As StringCollection
Visual C++
public:
property StringCollection^ Expressions {
    StringCollection^ get ();
}

Field Value

The expressions.

See Also

MySqlBulkLoader Class


FieldQuotationCharacter Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.FieldQuotationCharacter Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the field quotation character.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public char FieldQuotationCharacter { get; set; }
Visual Basic (Declaration)
Public Property FieldQuotationCharacter As Char
Visual C++
public:
property wchar_t FieldQuotationCharacter {
    wchar_t get ();
    void set (wchar_t value);
}

Field Value

The field quotation character.

See Also

MySqlBulkLoader Class


FieldQuotationOptional Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.FieldQuotationOptional Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets a value indicating whether [field quotation optional].

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool FieldQuotationOptional { get; set; }
Visual Basic (Declaration)
Public Property FieldQuotationOptional As Boolean
Visual C++
public:
property bool FieldQuotationOptional {
    bool get ();
    void set (bool value);
}

Field Value

true if [field quotation optional]; otherwise, false.

See Also

MySqlBulkLoader Class


FieldTerminator Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.FieldTerminator Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the field terminator.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string FieldTerminator { get; set; }
Visual Basic (Declaration)
Public Property FieldTerminator As String
Visual C++
public:
property String^ FieldTerminator {
    String^ get ();
    void set (String^ value);
}

Field Value

The field terminator.

See Also

MySqlBulkLoader Class


FileName Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.FileName Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the name of the file.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string FileName { get; set; }
Visual Basic (Declaration)
Public Property FileName As String
Visual C++
public:
property String^ FileName {
    String^ get ();
    void set (String^ value);
}

Field Value

The name of the file.

See Also

MySqlBulkLoader Class


LinePrefix Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.LinePrefix Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the line prefix.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string LinePrefix { get; set; }
Visual Basic (Declaration)
Public Property LinePrefix As String
Visual C++
public:
property String^ LinePrefix {
    String^ get ();
    void set (String^ value);
}

Field Value

The line prefix.

See Also

MySqlBulkLoader Class


LineTerminator Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.LineTerminator Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the line terminator.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string LineTerminator { get; set; }
Visual Basic (Declaration)
Public Property LineTerminator As String
Visual C++
public:
property String^ LineTerminator {
    String^ get ();
    void set (String^ value);
}

Field Value

The line terminator.

See Also

MySqlBulkLoader Class


Local Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.Local Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets a value indicating whether the filename that is to be loaded is local to the client or not

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool Local { get; set; }
Visual Basic (Declaration)
Public Property Local As Boolean
Visual C++
public:
property bool Local {
    bool get ();
    void set (bool value);
}

Field Value

true if local; otherwise, false.

See Also

MySqlBulkLoader Class


NumberOfLinesToSkip Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.NumberOfLinesToSkip Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the number of lines to skip.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int NumberOfLinesToSkip { get; set; }
Visual Basic (Declaration)
Public Property NumberOfLinesToSkip As Integer
Visual C++
public:
property int NumberOfLinesToSkip {
    int get ();
    void set (int value);
}

Field Value

The number of lines to skip.

See Also

MySqlBulkLoader Class


Priority Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.Priority Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the priority.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlBulkLoaderPriority Priority { get; set; }
Visual Basic (Declaration)
Public Property Priority As MySqlBulkLoaderPriority
Visual C++
public:
property MySqlBulkLoaderPriority Priority {
    MySqlBulkLoaderPriority get ();
    void set (MySqlBulkLoaderPriority value);
}

Field Value

The priority.

See Also

MySqlBulkLoader Class


TableName Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.TableName Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the name of the table.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string TableName { get; set; }
Visual Basic (Declaration)
Public Property TableName As String
Visual C++
public:
property String^ TableName {
    String^ get ();
    void set (String^ value);
}

Field Value

The name of the table.

See Also

MySqlBulkLoader Class


Timeout Property

[image]

MySQL Connector/Net
MySqlBulkLoader..::.Timeout Property
MySqlBulkLoader Class See Also Send Feedback
Gets or sets the timeout.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Timeout { get; set; }
Visual Basic (Declaration)
Public Property Timeout As Integer
Visual C++
public:
property int Timeout {
    int get ();
    void set (int value);
}

Field Value

The timeout.

See Also

MySqlBulkLoader Class


MySqlBulkLoaderConflictOption Enumeration

[image]

MySQL Connector/Net
MySqlBulkLoaderConflictOption Enumeration
See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public enum MySqlBulkLoaderConflictOption
Visual Basic (Declaration)
Public Enumeration MySqlBulkLoaderConflictOption
Visual C++
public enum class MySqlBulkLoaderConflictOption

Members

Member name | Description
None | 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 | Replace column values when a key conflict occurs.
Ignore | Ignore any rows where the primary key conflicts.

See Also


MySqlBulkLoaderPriority Enumeration

[image]

MySQL Connector/Net
MySqlBulkLoaderPriority Enumeration
See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public enum MySqlBulkLoaderPriority
Visual Basic (Declaration)
Public Enumeration MySqlBulkLoaderPriority
Visual C++
public enum class MySqlBulkLoaderPriority

Members

Member name | Description
None | This is the default and indicates normal priority
Low | 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 | 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.

See Also


MySqlClientFactory Class

[image]

MySQL Connector/Net
MySqlClientFactory Class
Members See Also Send Feedback
DBProviderFactory implementation for MysqlClient.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlClientFactory : DbProviderFactory,
    IServiceProvider
Visual Basic (Declaration)
Public NotInheritable Class MySqlClientFactory _
    Inherits DbProviderFactory _
    Implements IServiceProvider
Visual C++
public ref class MySqlClientFactory sealed : public DbProviderFactory,
    IServiceProvider

Inheritance Hierarchy

System..::.Object
System.Data.Common..::.DbProviderFactory
MySql.Data.MySqlClient..::.MySqlClientFactory

See Also

MySqlClientFactory Members


MySqlClientFactory Members

[image] [image]

MySQL Connector/Net
MySqlClientFactory Members
MySqlClientFactory Class Constructors Methods Fields Properties See Also Send Feedback

The MySqlClientFactory type exposes the following members.

Constructors

Name | Description
MySqlClientFactory |

Methods

Name | Description
CreateCommand | Returns a strongly typed DbCommand instance. (Overrides DbProviderFactory..::.CreateCommand()()().)
CreateCommandBuilder | Returns a strongly typed DbCommandBuilder instance. (Overrides DbProviderFactory..::.CreateCommandBuilder()()().)
CreateConnection | Returns a strongly typed DbConnection instance. (Overrides DbProviderFactory..::.CreateConnection()()().)
CreateConnectionStringBuilder | Returns a strongly typed DbConnectionStringBuilder instance. (Overrides DbProviderFactory..::.CreateConnectionStringBuilder()()().)
CreateDataAdapter | Returns a strongly typed DbDataAdapter instance. (Overrides DbProviderFactory..::.CreateDataAdapter()()().)
CreateDataSourceEnumerator | Returns a new instance of the provider's class that implements the DbDataSourceEnumerator class. (Inherited from DbProviderFactory.)
CreateParameter | Returns a strongly typed DbParameter instance. (Overrides DbProviderFactory..::.CreateParameter()()().)
CreatePermission | Returns a new instance of the provider's class that implements the provider's version of the CodeAccessPermission class. (Inherited from DbProviderFactory.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Fields

Name | Description
Instance | Gets an instance of the MySqlClientFactory. This can be used to retrieve strongly typed data objects.

Properties

Name | Description
CanCreateDataSourceEnumerator | Returns true if a MySqlDataSourceEnumerator can be created; otherwise false. (Overrides DbProviderFactory..::.CanCreateDataSourceEnumerator.)

See Also

MySqlClientFactory Class


MySqlClientFactory Constructor

[image]

MySQL Connector/Net
MySqlClientFactory Constructor
MySqlClientFactory Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlClientFactory()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlClientFactory()

See Also

MySqlClientFactory Class


MySqlClientFactory Fields

[image] [image]

MySQL Connector/Net
MySqlClientFactory Fields
MySqlClientFactory Class See Also Send Feedback

The MySqlClientFactory type exposes the following members.

Fields

Name | Description
Instance | Gets an instance of the MySqlClientFactory. This can be used to retrieve strongly typed data objects.

See Also

MySqlClientFactory Class


Instance Field

[image]

MySQL Connector/Net
MySqlClientFactory..::.Instance Field
MySqlClientFactory Class See Also Send Feedback
Gets an instance of the MySqlClientFactory. This can be used to retrieve strongly typed data objects.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static MySqlClientFactory Instance
Visual Basic (Declaration)
Public Shared Instance As MySqlClientFactory
Visual C++
public:
static MySqlClientFactory^ Instance

See Also

MySqlClientFactory Class


MySqlClientFactory Methods

[image] [image]

MySQL Connector/Net
MySqlClientFactory Methods
MySqlClientFactory Class See Also Send Feedback

The MySqlClientFactory type exposes the following members.

Methods

Name | Description
CreateCommand | Returns a strongly typed DbCommand instance. (Overrides DbProviderFactory..::.CreateCommand()()().)
CreateCommandBuilder | Returns a strongly typed DbCommandBuilder instance. (Overrides DbProviderFactory..::.CreateCommandBuilder()()().)
CreateConnection | Returns a strongly typed DbConnection instance. (Overrides DbProviderFactory..::.CreateConnection()()().)
CreateConnectionStringBuilder | Returns a strongly typed DbConnectionStringBuilder instance. (Overrides DbProviderFactory..::.CreateConnectionStringBuilder()()().)
CreateDataAdapter | Returns a strongly typed DbDataAdapter instance. (Overrides DbProviderFactory..::.CreateDataAdapter()()().)
CreateDataSourceEnumerator | Returns a new instance of the provider's class that implements the DbDataSourceEnumerator class. (Inherited from DbProviderFactory.)
CreateParameter | Returns a strongly typed DbParameter instance. (Overrides DbProviderFactory..::.CreateParameter()()().)
CreatePermission | Returns a new instance of the provider's class that implements the provider's version of the CodeAccessPermission class. (Inherited from DbProviderFactory.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlClientFactory Class


CreateCommand Method

[image]

MySQL Connector/Net
MySqlClientFactory..::.CreateCommand Method
MySqlClientFactory Class See Also Send Feedback
Returns a strongly typed DbCommand instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DbCommand CreateCommand()
Visual Basic (Declaration)
Public Overrides Function CreateCommand As DbCommand
Visual C++
public:
virtual DbCommand^ CreateCommand() override

Return Value

A new strongly typed instance of DbCommand.

See Also

MySqlClientFactory Class


CreateCommandBuilder Method

[image]

MySQL Connector/Net
MySqlClientFactory..::.CreateCommandBuilder Method
MySqlClientFactory Class See Also Send Feedback
Returns a strongly typed DbCommandBuilder instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DbCommandBuilder CreateCommandBuilder()
Visual Basic (Declaration)
Public Overrides Function CreateCommandBuilder As DbCommandBuilder
Visual C++
public:
virtual DbCommandBuilder^ CreateCommandBuilder() override

Return Value

A new strongly typed instance of DbCommandBuilder.

See Also

MySqlClientFactory Class


CreateConnection Method

[image]

MySQL Connector/Net
MySqlClientFactory..::.CreateConnection Method
MySqlClientFactory Class See Also Send Feedback
Returns a strongly typed DbConnection instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DbConnection CreateConnection()
Visual Basic (Declaration)
Public Overrides Function CreateConnection As DbConnection
Visual C++
public:
virtual DbConnection^ CreateConnection() override

Return Value

A new strongly typed instance of DbConnection.

See Also

MySqlClientFactory Class


CreateConnectionStringBuilder Method

[image]

MySQL Connector/Net
MySqlClientFactory..::.CreateConnectionStringBuilder Method
MySqlClientFactory Class See Also Send Feedback
Returns a strongly typed DbConnectionStringBuilder instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DbConnectionStringBuilder CreateConnectionStringBuilder()
Visual Basic (Declaration)
Public Overrides Function CreateConnectionStringBuilder As DbConnectionStringBuilder
Visual C++
public:
virtual DbConnectionStringBuilder^ CreateConnectionStringBuilder() override

Return Value

A new strongly typed instance of DbConnectionStringBuilder.

See Also

MySqlClientFactory Class


CreateDataAdapter Method

[image]

MySQL Connector/Net
MySqlClientFactory..::.CreateDataAdapter Method
MySqlClientFactory Class See Also Send Feedback
Returns a strongly typed DbDataAdapter instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DbDataAdapter CreateDataAdapter()
Visual Basic (Declaration)
Public Overrides Function CreateDataAdapter As DbDataAdapter
Visual C++
public:
virtual DbDataAdapter^ CreateDataAdapter() override

Return Value

A new strongly typed instance of DbDataAdapter.

See Also

MySqlClientFactory Class


CreateParameter Method

[image]

MySQL Connector/Net
MySqlClientFactory..::.CreateParameter Method
MySqlClientFactory Class See Also Send Feedback
Returns a strongly typed DbParameter instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DbParameter CreateParameter()
Visual Basic (Declaration)
Public Overrides Function CreateParameter As DbParameter
Visual C++
public:
virtual DbParameter^ CreateParameter() override

Return Value

A new strongly typed instance of DbParameter.

See Also

MySqlClientFactory Class


MySqlClientFactory Properties

[image] [image]

MySQL Connector/Net
MySqlClientFactory Properties
MySqlClientFactory Class See Also Send Feedback

The MySqlClientFactory type exposes the following members.

Properties

Name | Description
CanCreateDataSourceEnumerator | Returns true if a MySqlDataSourceEnumerator can be created; otherwise false. (Overrides DbProviderFactory..::.CanCreateDataSourceEnumerator.)

See Also

MySqlClientFactory Class


CanCreateDataSourceEnumerator Property

[image]

MySQL Connector/Net
MySqlClientFactory..::.CanCreateDataSourceEnumerator Property
MySqlClientFactory Class See Also Send Feedback
Returns true if a MySqlDataSourceEnumerator can be created; otherwise false.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool CanCreateDataSourceEnumerator { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property CanCreateDataSourceEnumerator As Boolean
Visual C++
public:
virtual property bool CanCreateDataSourceEnumerator {
    bool get () override;
}

See Also

MySqlClientFactory Class


MySqlCommand Class

[image]

MySQL Connector/Net
MySqlCommand Class
Members Example See Also Send Feedback
Represents a SQL statement to execute against a MySQL database. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlCommand : DbCommand,
    ICloneable
Visual Basic (Declaration)
Public NotInheritable Class MySqlCommand _
    Inherits DbCommand _
    Implements ICloneable
Visual C++
public ref class MySqlCommand sealed : public DbCommand,
    ICloneable

Remarks

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.
Note: 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.

Examples

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.
CopyVB.NET
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
CopyC#
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();
}

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.ComponentModel..::.Component
System.Data.Common..::.DbCommand
MySql.Data.MySqlClient..::.MySqlCommand

See Also

MySqlCommand Members


MySqlCommand Members

[image] [image]

MySQL Connector/Net
MySqlCommand Members
MySqlCommand Class Constructors Methods Properties Events See Also Send Feedback

The MySqlCommand type exposes the following members.

Constructors

Name | Description
MySqlCommand | Overloaded. Initializes a new instance of the MySqlCommand class.

Methods

Name | Description
BeginExecuteNonQuery | Overloaded.
BeginExecuteReader | Overloaded.
Cancel | Attempts to cancel the execution of a MySqlCommand. (Overrides DbCommand..::.Cancel()()().)
CreateDbParameter | Creates a new instance of a DbParameter object. (Inherited from DbCommand.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
CreateParameter | Creates a new instance of a MySqlParameter object.
Dispose | Overloaded.
EndExecuteNonQuery | Finishes asynchronous execution of a SQL statement.
EndExecuteReader | Finishes asynchronous execution of a SQL statement, returning the requested MySqlDataReader.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
ExecuteDbDataReader | Executes the command text against the connection. (Inherited from DbCommand.)
ExecuteNonQuery | Executes a SQL statement against the connection and returns the number of rows affected. (Overrides DbCommand..::.ExecuteNonQuery()()().)
ExecuteReader | Overloaded.
ExecuteScalar | 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. (Overrides DbCommand..::.ExecuteScalar()()().)
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
Prepare | Creates a prepared version of the command on an instance of MySQL Server. (Overrides DbCommand..::.Prepare()()().)
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

Properties

Name | Description
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
CommandText | Gets or sets the SQL statement to execute at the data source. (Overrides DbCommand..::.CommandText.)
CommandTimeout | Gets or sets the wait time before terminating the attempt to execute a command and generating an error. (Overrides DbCommand..::.CommandTimeout.)
CommandType | Gets or sets a value indicating how the CommandText property is to be interpreted. (Overrides DbCommand..::.CommandType.)
Connection | Gets or sets the MySqlConnection used by this instance of the MySqlCommand.
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
DbConnection | Gets or sets the DbConnection used by this DbCommand. (Inherited from DbCommand.)
DbParameterCollection | Gets the collection of DbParameter objects. (Inherited from DbCommand.)
DbTransaction | Gets or sets the DbTransaction within which this DbCommand object executes. (Inherited from DbCommand.)
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
DesignTimeVisible | Gets or sets a value indicating whether the command object should be visible in a Windows Form Designer control. (Overrides DbCommand..::.DesignTimeVisible.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
IsPrepared |
LastInsertedId |
Parameters | Get the MySqlParameterCollection
Site | Gets or sets the ISite of the Component. (Inherited from Component.)
Transaction | Gets or sets the MySqlTransaction within which the MySqlCommand executes.
UpdatedRowSource | Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter. (Overrides DbCommand..::.UpdatedRowSource.)

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)

See Also

MySqlCommand Class


MySqlCommand Constructor

[image] [image]

MySQL Connector/Net
MySqlCommand Constructor
MySqlCommand Class See Also Send Feedback
Initializes a new instance of the MySqlCommand class.

Overload List

Name | Description
MySqlCommand()()() | Initializes a new instance of the MySqlCommand class.
MySqlCommand(String) | Initializes a new instance of the MySqlCommand class with the text of the query.
MySqlCommand(String, MySqlConnection) | Initializes a new instance of the MySqlCommand class with the text of the query and a MySqlConnection.
MySqlCommand(String, MySqlConnection, MySqlTransaction) | Initializes a new instance of the MySqlCommand class with the text of the query, a MySqlConnection, and the MySqlTransaction.

Examples

The following example creates a MySqlCommand and sets some of its properties.

Note: 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.
CopyVB.NET
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
CopyC#
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;
}
CopyC++
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;
};

See Also

MySqlCommand Class
MySqlCommand Members


MySqlCommand Constructor

[image]

MySQL Connector/Net
MySqlCommand Constructor
MySqlCommand Class Example See Also Send Feedback
Initializes a new instance of the MySqlCommand class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlCommand()

Remarks

The base constructor initializes all fields to their default values. The following table shows initial property values for an instance of MySqlCommand.
Properties | Initial Value
CommandText | empty string ("")
CommandTimeout | 0
CommandType | CommandType.Text
Connection | Null

You can change the value for any of these properties through a separate call to the property.

Examples

The following example creates a MySqlCommand and sets some of its properties.
CopyVB.NET
Public Sub CreateMySqlCommand()
Dim myCommand As New MySqlCommand()
myCommand.CommandType = CommandType.Text
End Sub
CopyC#
public void CreateMySqlCommand()
{
MySqlCommand myCommand = new MySqlCommand();
myCommand.CommandType = CommandType.Text;
}

See Also

MySqlCommand Class
MySqlCommand Overload


MySqlCommand Constructor (String)

[image]

MySQL Connector/Net
MySqlCommand Constructor (String)
MySqlCommand Class Example See Also Send Feedback
Initializes a new instance of the MySqlCommand class with the text of the query.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand(
    string cmdText
)
Visual Basic (Declaration)
Public Sub New ( _
    cmdText As String _
)
Visual C++
public:
MySqlCommand(
    String^ cmdText
)

Parameters

cmdText
Type: System..::.String
The text of the query.

Remarks

When an instance of MySqlCommand is created, the following read/write properties are set to initial values.
Properties | Initial Value
CommandText | cmdText
CommandTimeout | 0
CommandType | CommandType.Text
Connection | Null

You can change the value for any of these properties through a separate call to the property.

Examples

The following example creates a MySqlCommand and sets some of its properties.
CopyVB.NET
Public Sub CreateMySqlCommand()
Dim sql as String = "SELECT * FROM mytable"
Dim myCommand As New MySqlCommand(sql)
myCommand.CommandType = CommandType.Text
End Sub
CopyC#
public void CreateMySqlCommand()
{
string sql = "SELECT * FROM mytable";
MySqlCommand myCommand = new MySqlCommand(sql);
myCommand.CommandType = CommandType.Text;
}

See Also

MySqlCommand Class
MySqlCommand Overload


MySqlCommand Constructor (String, MySqlConnection)

[image]

MySQL Connector/Net
MySqlCommand Constructor (String, MySqlConnection)
MySqlCommand Class Example See Also Send Feedback
Initializes a new instance of the MySqlCommand class with the text of the query and a MySqlConnection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand(
    string cmdText,
    MySqlConnection connection
)
Visual Basic (Declaration)
Public Sub New ( _
    cmdText As String, _
    connection As MySqlConnection _
)
Visual C++
public:
MySqlCommand(
    String^ cmdText,
    MySqlConnection^ connection
)

Parameters

cmdText
Type: System..::.String
The text of the query.
connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
A MySqlConnection that represents the connection to an instance of SQL Server.

Remarks

When an instance of MySqlCommand is created, the following read/write properties are set to initial values.
Properties | Initial Value
CommandText | cmdText
CommandTimeout | 0
CommandType | CommandType.Text
Connection | connection

You can change the value for any of these properties through a separate call to the property.

Examples

The following example creates a MySqlCommand and sets some of its properties.
CopyVB.NET
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
CopyC#
public void CreateMySqlCommand()
{
MySqlConnection conn = new MySqlConnection("server=myserver")
string sql = "SELECT * FROM mytable";
MySqlCommand myCommand = new MySqlCommand(sql, conn);
myCommand.CommandType = CommandType.Text;
}

See Also

MySqlCommand Class
MySqlCommand Overload


MySqlCommand Constructor (String, MySqlConnection, MySqlTransaction)

[image]

MySQL Connector/Net
MySqlCommand Constructor (String, MySqlConnection, MySqlTransaction)
MySqlCommand Class Example See Also Send Feedback
Initializes a new instance of the MySqlCommand class with the text of the query, a MySqlConnection, and the MySqlTransaction.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand(
    string cmdText,
    MySqlConnection connection,
    MySqlTransaction transaction
)
Visual Basic (Declaration)
Public Sub New ( _
    cmdText As String, _
    connection As MySqlConnection, _
    transaction As MySqlTransaction _
)
Visual C++
public:
MySqlCommand(
    String^ cmdText,
    MySqlConnection^ connection,
    MySqlTransaction^ transaction
)

Parameters

cmdText
Type: System..::.String
The text of the query.
connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
A MySqlConnection that represents the connection to an instance of SQL Server.
transaction
Type: MySql.Data.MySqlClient..::.MySqlTransaction
The MySqlTransaction in which the MySqlCommand executes.

Remarks

When an instance of MySqlCommand is created, the following read/write properties are set to initial values.
Properties | Initial Value
CommandText | cmdText
CommandTimeout | 0
CommandType | CommandType.Text
Connection | connection

You can change the value for any of these properties through a separate call to the property.

Examples

The following example creates a MySqlCommand and sets some of its properties.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlCommand Class
MySqlCommand Overload


MySqlCommand Methods

[image] [image]

MySQL Connector/Net
MySqlCommand Methods
MySqlCommand Class See Also Send Feedback

The MySqlCommand type exposes the following members.

Methods

Name | Description
BeginExecuteNonQuery | Overloaded.
BeginExecuteReader | Overloaded.
Cancel | Attempts to cancel the execution of a MySqlCommand. (Overrides DbCommand..::.Cancel()()().)
CreateDbParameter | Creates a new instance of a DbParameter object. (Inherited from DbCommand.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
CreateParameter | Creates a new instance of a MySqlParameter object.
Dispose | Overloaded.
EndExecuteNonQuery | Finishes asynchronous execution of a SQL statement.
EndExecuteReader | Finishes asynchronous execution of a SQL statement, returning the requested MySqlDataReader.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
ExecuteDbDataReader | Executes the command text against the connection. (Inherited from DbCommand.)
ExecuteNonQuery | Executes a SQL statement against the connection and returns the number of rows affected. (Overrides DbCommand..::.ExecuteNonQuery()()().)
ExecuteReader | Overloaded.
ExecuteScalar | 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. (Overrides DbCommand..::.ExecuteScalar()()().)
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
Prepare | Creates a prepared version of the command on an instance of MySQL Server. (Overrides DbCommand..::.Prepare()()().)
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

See Also

MySqlCommand Class


BeginExecuteNonQuery Method

[image] [image]

MySQL Connector/Net
MySqlCommand..::.BeginExecuteNonQuery Method
MySqlCommand Class See Also Send Feedback

Overload List

Name | Description
BeginExecuteNonQuery()()() | Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.
BeginExecuteNonQuery(AsyncCallback, Object) | Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.

See Also

MySqlCommand Class
MySqlCommand Members


BeginExecuteNonQuery Method

[image]

MySQL Connector/Net
MySqlCommand..::.BeginExecuteNonQuery Method
MySqlCommand Class See Also Send Feedback
Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public IAsyncResult BeginExecuteNonQuery()
Visual Basic (Declaration)
Public Function BeginExecuteNonQuery As IAsyncResult
Visual C++
public:
IAsyncResult^ BeginExecuteNonQuery()

Return Value

An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndExecuteNonQuery(IAsyncResult), which returns the number of affected rows.

See Also

MySqlCommand Class
BeginExecuteNonQuery Overload


BeginExecuteNonQuery Method (AsyncCallback, Object)

[image]

MySQL Connector/Net
MySqlCommand..::.BeginExecuteNonQuery Method (AsyncCallback, Object)
MySqlCommand Class See Also Send Feedback
Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public IAsyncResult BeginExecuteNonQuery(
    AsyncCallback callback,
    Object stateObject
)
Visual Basic (Declaration)
Public Function BeginExecuteNonQuery ( _
    callback As AsyncCallback, _
    stateObject As Object _
) As IAsyncResult
Visual C++
public:
IAsyncResult^ BeginExecuteNonQuery(
    AsyncCallback^ callback,
    Object^ stateObject
)

Parameters

callback
Type: System..::.AsyncCallback
An AsyncCallback 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.
stateObject
Type: System..::.Object
A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the AsyncState property.

Return Value

An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndExecuteNonQuery(IAsyncResult), which returns the number of affected rows.

See Also

MySqlCommand Class
BeginExecuteNonQuery Overload


BeginExecuteReader Method

[image] [image]

MySQL Connector/Net
MySqlCommand..::.BeginExecuteReader Method
MySqlCommand Class See Also Send Feedback

Overload List

Name | Description
BeginExecuteReader()()() | Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand, and retrieves one or more result sets from the server.
BeginExecuteReader(CommandBehavior) | Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand using one of the CommandBehavior values.

See Also

MySqlCommand Class
MySqlCommand Members


BeginExecuteReader Method

[image]

MySQL Connector/Net
MySqlCommand..::.BeginExecuteReader Method
MySqlCommand Class See Also Send Feedback
Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand, and retrieves one or more result sets from the server.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public IAsyncResult BeginExecuteReader()
Visual Basic (Declaration)
Public Function BeginExecuteReader As IAsyncResult
Visual C++
public:
IAsyncResult^ BeginExecuteReader()

Return Value

An IAsyncResult that can be used to poll, wait for results, or both; this value is also needed when invoking EndExecuteReader, which returns a MySqlDataReader instance that can be used to retrieve the returned rows.

See Also

MySqlCommand Class
BeginExecuteReader Overload


BeginExecuteReader Method (CommandBehavior)

[image]

MySQL Connector/Net
MySqlCommand..::.BeginExecuteReader Method (CommandBehavior)
MySqlCommand Class See Also Send Feedback
Initiates the asynchronous execution of the SQL statement or stored procedure that is described by this MySqlCommand using one of the CommandBehavior values.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public IAsyncResult BeginExecuteReader(
    CommandBehavior behavior
)
Visual Basic (Declaration)
Public Function BeginExecuteReader ( _
    behavior As CommandBehavior _
) As IAsyncResult
Visual C++
public:
IAsyncResult^ BeginExecuteReader(
    CommandBehavior behavior
)

Parameters

behavior
Type: System.Data..::.CommandBehavior
One of the CommandBehavior values, indicating options for statement execution and data retrieval.

Return Value

An IAsyncResult that can be used to poll, wait for results, or both; this value is also needed when invoking EndExecuteReader, which returns a MySqlDataReader instance that can be used to retrieve the returned rows.

See Also

MySqlCommand Class
BeginExecuteReader Overload


Cancel Method

[image]

MySQL Connector/Net
MySqlCommand..::.Cancel Method
MySqlCommand Class See Also Send Feedback
Attempts to cancel the execution of a MySqlCommand.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Cancel()
Visual Basic (Declaration)
Public Overrides Sub Cancel
Visual C++
public:
virtual void Cancel() override

Implements

IDbCommand..::.Cancel()()()

Remarks

Cancelling a currently active query only works with MySQL versions 5.0.0 and higher.

See Also

MySqlCommand Class


CreateParameter Method

[image]

MySQL Connector/Net
MySqlCommand..::.CreateParameter Method
MySqlCommand Class See Also Send Feedback
Creates a new instance of a MySqlParameter object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter CreateParameter()
Visual Basic (Declaration)
Public Function CreateParameter As MySqlParameter
Visual C++
public:
MySqlParameter^ CreateParameter()

Return Value

A MySqlParameter object.

Remarks

This method is a strongly-typed version of CreateParameter()()().

See Also

MySqlCommand Class


Dispose Method

[image] [image]

MySQL Connector/Net
MySqlCommand..::.Dispose Method
MySqlCommand Class See Also Send Feedback

Overload List

Name | Description
Dispose()()() | Releases all resources used by the Component. (Inherited from Component.)
Dispose(Boolean) | Releases the unmanaged resources used by the Component and optionally releases the managed resources. (Inherited from Component.)

See Also

MySqlCommand Class
MySqlCommand Members


EndExecuteNonQuery Method

[image]

MySQL Connector/Net
MySqlCommand..::.EndExecuteNonQuery Method
MySqlCommand Class See Also Send Feedback
Finishes asynchronous execution of a SQL statement.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int EndExecuteNonQuery(
    IAsyncResult asyncResult
)
Visual Basic (Declaration)
Public Function EndExecuteNonQuery ( _
    asyncResult As IAsyncResult _
) As Integer
Visual C++
public:
int EndExecuteNonQuery(
    IAsyncResult^ asyncResult
)

Parameters

asyncResult
Type: System..::.IAsyncResult
The IAsyncResult returned by the call to BeginExecuteNonQuery()()().

Return Value

See Also

MySqlCommand Class


EndExecuteReader Method

[image]

MySQL Connector/Net
MySqlCommand..::.EndExecuteReader Method
MySqlCommand Class See Also Send Feedback
Finishes asynchronous execution of a SQL statement, returning the requested MySqlDataReader.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataReader EndExecuteReader(
    IAsyncResult result
)
Visual Basic (Declaration)
Public Function EndExecuteReader ( _
    result As IAsyncResult _
) As MySqlDataReader
Visual C++
public:
MySqlDataReader^ EndExecuteReader(
    IAsyncResult^ result
)

Parameters

result
Type: System..::.IAsyncResult
The IAsyncResult returned by the call to BeginExecuteReader()()().

Return Value

A MySqlDataReader object that can be used to retrieve the requested rows.

See Also

MySqlCommand Class


ExecuteNonQuery Method

[image]

MySQL Connector/Net
MySqlCommand..::.ExecuteNonQuery Method
MySqlCommand Class Example See Also Send Feedback
Executes a SQL statement against the connection and returns the number of rows affected.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int ExecuteNonQuery()
Visual Basic (Declaration)
Public Overrides Function ExecuteNonQuery As Integer
Visual C++
public:
virtual int ExecuteNonQuery() override

Return Value

Number of rows affected

Implements

IDbCommand..::.ExecuteNonQuery()()()

Remarks

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.

Examples

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.
CopyVB.NET
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
CopyC#
public void CreateMySqlCommand(string myExecuteQuery, MySqlConnection myConnection)
{
MySqlCommand myCommand = new MySqlCommand(myExecuteQuery, myConnection);
myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
}

See Also

MySqlCommand Class


ExecuteReader Method

[image] [image]

MySQL Connector/Net
MySqlCommand..::.ExecuteReader Method
MySqlCommand Class See Also Send Feedback

Overload List

Name | Description
ExecuteReader()()() | Sends the CommandText to the Connection and builds a MySqlDataReader.
ExecuteReader(CommandBehavior) | Sends the CommandText to the Connection, and builds a MySqlDataReader using one of the CommandBehavior values.

See Also

MySqlCommand Class
MySqlCommand Members


ExecuteReader Method

[image]

MySQL Connector/Net
MySqlCommand..::.ExecuteReader Method
MySqlCommand Class Example See Also Send Feedback
Sends the CommandText to the Connection and builds a MySqlDataReader.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataReader ExecuteReader()
Visual Basic (Declaration)
Public Function ExecuteReader As MySqlDataReader
Visual C++
public:
MySqlDataReader^ ExecuteReader()

Return Value

A MySqlDataReader object.

Remarks

When the CommandType property is set to StoredProcedure, the CommandText property should be set to the name of the stored procedure. The command executes this stored procedure when you call ExecuteReader.

While the MySqlDataReader is in use, the associated MySqlConnection 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 Close()()() method of the MySqlDataReader is called.

Examples

The following example creates a MySqlCommand, then executes it by passing a string that is a SQL SELECT statement, and a string to use to connect to the data source.
CopyVB.NET
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
CopyC#
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();
}
}

See Also

MySqlCommand Class
ExecuteReader Overload


ExecuteReader Method (CommandBehavior)

[image]

MySQL Connector/Net
MySqlCommand..::.ExecuteReader Method (CommandBehavior)
MySqlCommand Class See Also Send Feedback
Sends the CommandText to the Connection, and builds a MySqlDataReader using one of the CommandBehavior values.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataReader ExecuteReader(
    CommandBehavior behavior
)
Visual Basic (Declaration)
Public Function ExecuteReader ( _
    behavior As CommandBehavior _
) As MySqlDataReader
Visual C++
public:
MySqlDataReader^ ExecuteReader(
    CommandBehavior behavior
)

Parameters

behavior
Type: System.Data..::.CommandBehavior
One of the CommandBehavior values.

Return Value

A MySqlDataReader object.

Remarks

When the CommandType property is set to StoredProcedure, the CommandText property should be set to the name of the stored procedure. The command executes this stored procedure when you call ExecuteReader.

The MySqlDataReader supports a special mode that enables large binary values to be read efficiently. For more information, see the SequentialAccess setting for CommandBehavior.

While the MySqlDataReader is in use, the associated MySqlConnection 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 Close()()() method of the MySqlDataReader is called. If the MySqlDataReader is created with CommandBehavior set to CloseConnection, closing the MySqlDataReader closes the connection automatically.

Note: 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 Read()()() 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.

See Also

MySqlCommand Class
ExecuteReader Overload


ExecuteScalar Method

[image]

MySQL Connector/Net
MySqlCommand..::.ExecuteScalar Method
MySqlCommand Class Example See Also Send Feedback
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.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Object ExecuteScalar()
Visual Basic (Declaration)
Public Overrides Function ExecuteScalar As Object
Visual C++
public:
virtual Object^ ExecuteScalar() override

Return Value

The first column of the first row in the result set, or a null reference if the result set is empty

Implements

IDbCommand..::.ExecuteScalar()()()

Remarks

Use the ExecuteScalar method to retrieve a single value (for example, an aggregate value) from a database. This requires less code than using the ExecuteReader()()() method, and then performing the operations necessary to generate the single value using the data returned by a MySqlDataReader

Examples

The following example creates a MySqlCommand 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.
CopyVB.NET
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
CopyC#
public void CreateMySqlCommand(string myScalarQuery, MySqlConnection myConnection)
{
MySqlCommand myCommand = new MySqlCommand(myScalarQuery, myConnection);
myCommand.Connection.Open();
myCommand.ExecuteScalar();
myConnection.Close();
}
CopyC++
public:
void CreateMySqlCommand(String* myScalarQuery, MySqlConnection* myConnection)
{
MySqlCommand* myCommand = new MySqlCommand(myScalarQuery, myConnection);
myCommand->Connection->Open();
myCommand->ExecuteScalar();
myConnection->Close();
}

See Also

MySqlCommand Class


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlCommand..::.MemberwiseClone Method
MySqlCommand Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlCommand Class
MySqlCommand Members


Prepare Method

[image]

MySQL Connector/Net
MySqlCommand..::.Prepare Method
MySqlCommand Class Example See Also Send Feedback
Creates a prepared version of the command on an instance of MySQL Server.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Prepare()
Visual Basic (Declaration)
Public Overrides Sub Prepare
Visual C++
public:
virtual void Prepare() override

Implements

IDbCommand..::.Prepare()()()

Remarks

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.

Examples

The following example demonstrates the use of the Prepare method.
CopyVB.NET
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
CopyC#
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();
}

See Also

MySqlCommand Class


MySqlCommand Properties

[image] [image]

MySQL Connector/Net
MySqlCommand Properties
MySqlCommand Class See Also Send Feedback

The MySqlCommand type exposes the following members.

Properties

Name | Description
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
CommandText | Gets or sets the SQL statement to execute at the data source. (Overrides DbCommand..::.CommandText.)
CommandTimeout | Gets or sets the wait time before terminating the attempt to execute a command and generating an error. (Overrides DbCommand..::.CommandTimeout.)
CommandType | Gets or sets a value indicating how the CommandText property is to be interpreted. (Overrides DbCommand..::.CommandType.)
Connection | Gets or sets the MySqlConnection used by this instance of the MySqlCommand.
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
DbConnection | Gets or sets the DbConnection used by this DbCommand. (Inherited from DbCommand.)
DbParameterCollection | Gets the collection of DbParameter objects. (Inherited from DbCommand.)
DbTransaction | Gets or sets the DbTransaction within which this DbCommand object executes. (Inherited from DbCommand.)
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
DesignTimeVisible | Gets or sets a value indicating whether the command object should be visible in a Windows Form Designer control. (Overrides DbCommand..::.DesignTimeVisible.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
IsPrepared |
LastInsertedId |
Parameters | Get the MySqlParameterCollection
Site | Gets or sets the ISite of the Component. (Inherited from Component.)
Transaction | Gets or sets the MySqlTransaction within which the MySqlCommand executes.
UpdatedRowSource | Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter. (Overrides DbCommand..::.UpdatedRowSource.)

See Also

MySqlCommand Class


CommandText Property

[image]

MySQL Connector/Net
MySqlCommand..::.CommandText Property
MySqlCommand Class Example See Also Send Feedback
Gets or sets the SQL statement to execute at the data source.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string CommandText { get; set; }
Visual Basic (Declaration)
Public Overrides Property CommandText As String
Visual C++
public:
virtual property String^ CommandText {
    String^ get () override;
    void set (String^ value) override;
}

Field Value

The SQL statement or stored procedure to execute. The default is an empty string.

Implements

IDbCommand..::.CommandText

Remarks

When the CommandType 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.

Examples

The following example creates a MySqlCommand and sets some of its properties.
CopyVB.NET
Public Sub CreateMySqlCommand()
Dim myCommand As New MySqlCommand()
myCommand.CommandText = "SELECT * FROM Mytable ORDER BY id"
myCommand.CommandType = CommandType.Text
End Sub
CopyC#
public void CreateMySqlCommand()
{
MySqlCommand myCommand = new MySqlCommand();
myCommand.CommandText = "SELECT * FROM mytable ORDER BY id";
myCommand.CommandType = CommandType.Text;
}

See Also

MySqlCommand Class


CommandTimeout Property

[image]

MySQL Connector/Net
MySqlCommand..::.CommandTimeout Property
MySqlCommand Class See Also Send Feedback
Gets or sets the wait time before terminating the attempt to execute a command and generating an error.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int CommandTimeout { get; set; }
Visual Basic (Declaration)
Public Overrides Property CommandTimeout As Integer
Visual C++
public:
virtual property int CommandTimeout {
    int get () override;
    void set (int value) override;
}

Field Value

The time (in seconds) to wait for the command to execute. The default is 30 seconds.

Implements

IDbCommand..::.CommandTimeout

Remarks

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.

See Also

MySqlCommand Class


CommandType Property

[image]

MySQL Connector/Net
MySqlCommand..::.CommandType Property
MySqlCommand Class Example See Also Send Feedback
Gets or sets a value indicating how the CommandText property is to be interpreted.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override CommandType CommandType { get; set; }
Visual Basic (Declaration)
Public Overrides Property CommandType As CommandType
Visual C++
public:
virtual property CommandType CommandType {
    CommandType get () override;
    void set (CommandType value) override;
}

Field Value

One of the CommandType values. The default is Text.

Implements

IDbCommand..::.CommandType

Remarks

When you set the CommandType property to StoredProcedure, you should set the CommandText property to the name of the stored procedure. The command executes this stored procedure when you call one of the Execute methods.

Examples

The following example creates a MySqlCommand and sets some of its properties.
CopyVB.NET
Public Sub CreateMySqlCommand()
Dim myCommand As New MySqlCommand()
myCommand.CommandType = CommandType.Text
End Sub
CopyC#
public void CreateMySqlCommand()
{
MySqlCommand myCommand = new MySqlCommand();
myCommand.CommandType = CommandType.Text;
}

See Also

MySqlCommand Class


Connection Property

[image]

MySQL Connector/Net
MySqlCommand..::.Connection Property
MySqlCommand Class Example See Also Send Feedback
Gets or sets the MySqlConnection used by this instance of the MySqlCommand.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnection Connection { get; set; }
Visual Basic (Declaration)
Public Property Connection As MySqlConnection
Visual C++
public:
property MySqlConnection^ Connection {
    MySqlConnection^ get ();
    void set (MySqlConnection^ value);
}

Field Value

The connection to a data source. The default value is a null reference (Nothing in Visual Basic).

Remarks

If you set Connection while a transaction is in progress and the Transaction property is not null, an InvalidOperationException is generated. If the Transaction property is not null and the transaction has already been committed or rolled back, Transaction is set to null.

Examples

The following example creates a MySqlCommand and sets some of its properties.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlCommand Class


DesignTimeVisible Property

[image]

MySQL Connector/Net
MySqlCommand..::.DesignTimeVisible Property
MySqlCommand Class See Also Send Feedback
Gets or sets a value indicating whether the command object should be visible in a Windows Form Designer control.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool DesignTimeVisible { get; set; }
Visual Basic (Declaration)
Public Overrides Property DesignTimeVisible As Boolean
Visual C++
public:
virtual property bool DesignTimeVisible {
    bool get () override;
    void set (bool value) override;
}

See Also

MySqlCommand Class


IsPrepared Property

[image]

MySQL Connector/Net
MySqlCommand..::.IsPrepared Property
MySqlCommand Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool IsPrepared { get; }
Visual Basic (Declaration)
Public ReadOnly Property IsPrepared As Boolean
Visual C++
public:
property bool IsPrepared {
    bool get ();
}

See Also

MySqlCommand Class


LastInsertedId Property

[image]

MySQL Connector/Net
MySqlCommand..::.LastInsertedId Property
MySqlCommand Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public long LastInsertedId { get; }
Visual Basic (Declaration)
Public ReadOnly Property LastInsertedId As Long
Visual C++
public:
property long long LastInsertedId {
    long long get ();
}

See Also

MySqlCommand Class


Parameters Property

[image]

MySQL Connector/Net
MySqlCommand..::.Parameters Property
MySqlCommand Class Example See Also Send Feedback
Get the MySqlParameterCollection

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameterCollection Parameters { get; }
Visual Basic (Declaration)
Public ReadOnly Property Parameters As MySqlParameterCollection
Visual C++
public:
property MySqlParameterCollection^ Parameters {
    MySqlParameterCollection^ get ();
}

Field Value

The parameters of the SQL statement or stored procedure. The default is an empty collection.

Remarks

Connector/Net does not support unnamed parameters. Every parameter added to the collection must have an associated name.

Examples

The following example creates a MySqlCommand and displays its parameters. To accomplish this, the method is passed a MySqlConnection, a query string that is a SQL SELECT statement, and an array of MySqlParameter objects.
CopyVB.NET
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
CopyC#
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);
}

See Also

MySqlCommand Class


Transaction Property

[image]

MySQL Connector/Net
MySqlCommand..::.Transaction Property
MySqlCommand Class See Also Send Feedback
Gets or sets the MySqlTransaction within which the MySqlCommand executes.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlTransaction Transaction { get; set; }
Visual Basic (Declaration)
Public Property Transaction As MySqlTransaction
Visual C++
public:
property MySqlTransaction^ Transaction {
    MySqlTransaction^ get ();
    void set (MySqlTransaction^ value);
}

Field Value

The MySqlTransaction. The default value is a null reference (Nothing in Visual Basic).

Remarks

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 MySqlTransaction object that is not connected to the same MySqlConnection as the MySqlCommand object, an exception will be thrown the next time you attempt to execute a statement.

See Also

MySqlCommand Class


UpdatedRowSource Property

[image]

MySQL Connector/Net
MySqlCommand..::.UpdatedRowSource Property
MySqlCommand Class See Also Send Feedback
Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override UpdateRowSource UpdatedRowSource { get; set; }
Visual Basic (Declaration)
Public Overrides Property UpdatedRowSource As UpdateRowSource
Visual C++
public:
virtual property UpdateRowSource UpdatedRowSource {
    UpdateRowSource get () override;
    void set (UpdateRowSource value) override;
}

Implements

IDbCommand..::.UpdatedRowSource

See Also

MySqlCommand Class


MySqlCommand Events

[image] [image]

MySQL Connector/Net
MySqlCommand Events
MySqlCommand Class See Also Send Feedback

The MySqlCommand type exposes the following members.

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)

See Also

MySqlCommand Class


MySqlCommandBuilder Class

[image]

MySQL Connector/Net
MySqlCommandBuilder Class
Members Example See Also Send Feedback
Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated MySQL database. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlCommandBuilder : DbCommandBuilder
Visual Basic (Declaration)
Public NotInheritable Class MySqlCommandBuilder _
    Inherits DbCommandBuilder
Visual C++
public ref class MySqlCommandBuilder sealed : public DbCommandBuilder

Remarks

The MySqlDataAdapter 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 DataAdapter 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 RefreshSchema()()() 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.

Note: 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.

Examples

The following example uses the MySqlCommand, along MySqlDataAdapter and MySqlConnection, to select rows from a data source. The example is passed an initialized DataSet, 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.
CopyVB.NET
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
CopyC#
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;
}

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.ComponentModel..::.Component
System.Data.Common..::.DbCommandBuilder
MySql.Data.MySqlClient..::.MySqlCommandBuilder

See Also

MySqlCommandBuilder Members


MySqlCommandBuilder Members

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder Members
MySqlCommandBuilder Class Constructors Methods Properties Events See Also Send Feedback

The MySqlCommandBuilder type exposes the following members.

Constructors

Name | Description
MySqlCommandBuilder | Overloaded.

Methods

Name | Description
ApplyParameterInfo | Allows the provider implementation of the DbCommandBuilder class to handle additional parameter properties. (Inherited from DbCommandBuilder.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
DeriveParameters | 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.
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetDeleteCommand | Overloaded.
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetInsertCommand | Overloaded.
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetParameterName | Overloaded.
GetParameterPlaceholder | Returns the placeholder for the parameter in the associated SQL statement. (Inherited from DbCommandBuilder.)
GetSchemaTable | Returns the schema table for the DbCommandBuilder. (Inherited from DbCommandBuilder.)
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUpdateCommand | Overloaded.
InitializeCommand | Resets the CommandTimeout, Transaction, CommandType, and UpdateRowSource properties on the DbCommand. (Inherited from DbCommandBuilder.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
QuoteIdentifier | (Overrides DbCommandBuilder..::.QuoteIdentifier(String).)
RefreshSchema | Refreshes the database schema information used to generate INSERT, UPDATE, or DELETE statements. (Overrides DbCommandBuilder..::.RefreshSchema()()().)
RowUpdatingHandler | Adds an event handler for the RowUpdating event. (Inherited from DbCommandBuilder.)
SetRowUpdatingHandler | Registers the DbCommandBuilder to handle the RowUpdating event for a DbDataAdapter. (Inherited from DbCommandBuilder.)
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
UnquoteIdentifier | (Overrides DbCommandBuilder..::.UnquoteIdentifier(String).)

Properties

Name | Description
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
CatalogLocation | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class. (Inherited from DbCommandBuilder.)
CatalogSeparator | Sets or gets a string used as the catalog separator for an instance of the DbCommandBuilder class. (Inherited from DbCommandBuilder.)
ConflictOption | Specifies which ConflictOption is to be used by the DbCommandBuilder. (Inherited from DbCommandBuilder.)
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
DataAdapter | Gets or sets a MySqlDataAdapter object for which SQL statements are automatically generated.
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
QuotePrefix | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. (Inherited from DbCommandBuilder.)
QuoteSuffix | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. (Inherited from DbCommandBuilder.)
ReturnGeneratedIdentifiers | Indicates whether the command builder should generate a SELECT statement to populate any autogenerated fields. We provide this property rather than rely on the MySqlCommand.UpdatedRowSource property since a user should still be able to write a custom insert command and not have our work interfere.
SchemaSeparator | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers. (Inherited from DbCommandBuilder.)
SetAllValues | Specifies whether all column values in an update statement are included or only changed ones. (Inherited from DbCommandBuilder.)
Site | Gets or sets the ISite of the Component. (Inherited from Component.)

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)

See Also

MySqlCommandBuilder Class


MySqlCommandBuilder Constructor

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder Constructor
MySqlCommandBuilder Class See Also Send Feedback

Overload List

Name | Description
MySqlCommandBuilder()()() | Initializes a new instance of the MySqlCommandBuilder class.
MySqlCommandBuilder(MySqlDataAdapter) | Initializes a new instance of the MySqlCommandBuilder class with the associated MySqlDataAdapter object.

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Members


MySqlCommandBuilder Constructor

[image]

MySQL Connector/Net
MySqlCommandBuilder Constructor
MySqlCommandBuilder Class See Also Send Feedback
Initializes a new instance of the MySqlCommandBuilder class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommandBuilder()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlCommandBuilder()

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Overload


MySqlCommandBuilder Constructor (MySqlDataAdapter)

[image]

MySQL Connector/Net
MySqlCommandBuilder Constructor (MySqlDataAdapter)
MySqlCommandBuilder Class See Also Send Feedback
Initializes a new instance of the MySqlCommandBuilder class with the associated MySqlDataAdapter object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommandBuilder(
    MySqlDataAdapter adapter
)
Visual Basic (Declaration)
Public Sub New ( _
    adapter As MySqlDataAdapter _
)
Visual C++
public:
MySqlCommandBuilder(
    MySqlDataAdapter^ adapter
)

Parameters

adapter
Type: MySql.Data.MySqlClient..::.MySqlDataAdapter
The MySqlDataAdapter to use.

Remarks

The MySqlCommandBuilder registers itself as a listener for RowUpdating events that are generated by the MySqlDataAdapter specified in this property.

When you create a new instance MySqlCommandBuilder, any existing MySqlCommandBuilder associated with this MySqlDataAdapter is released.

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Overload


MySqlCommandBuilder Methods

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder Methods
MySqlCommandBuilder Class See Also Send Feedback

The MySqlCommandBuilder type exposes the following members.

Methods

Name | Description
ApplyParameterInfo | Allows the provider implementation of the DbCommandBuilder class to handle additional parameter properties. (Inherited from DbCommandBuilder.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
DeriveParameters | 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.
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetDeleteCommand | Overloaded.
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetInsertCommand | Overloaded.
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetParameterName | Overloaded.
GetParameterPlaceholder | Returns the placeholder for the parameter in the associated SQL statement. (Inherited from DbCommandBuilder.)
GetSchemaTable | Returns the schema table for the DbCommandBuilder. (Inherited from DbCommandBuilder.)
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUpdateCommand | Overloaded.
InitializeCommand | Resets the CommandTimeout, Transaction, CommandType, and UpdateRowSource properties on the DbCommand. (Inherited from DbCommandBuilder.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
QuoteIdentifier | (Overrides DbCommandBuilder..::.QuoteIdentifier(String).)
RefreshSchema | Refreshes the database schema information used to generate INSERT, UPDATE, or DELETE statements. (Overrides DbCommandBuilder..::.RefreshSchema()()().)
RowUpdatingHandler | Adds an event handler for the RowUpdating event. (Inherited from DbCommandBuilder.)
SetRowUpdatingHandler | Registers the DbCommandBuilder to handle the RowUpdating event for a DbDataAdapter. (Inherited from DbCommandBuilder.)
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
UnquoteIdentifier | (Overrides DbCommandBuilder..::.UnquoteIdentifier(String).)

See Also

MySqlCommandBuilder Class


DeriveParameters Method

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.DeriveParameters Method
MySqlCommandBuilder Class See Also Send Feedback
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.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static void DeriveParameters(
    MySqlCommand command
)
Visual Basic (Declaration)
Public Shared Sub DeriveParameters ( _
    command As MySqlCommand _
)
Visual C++
public:
static void DeriveParameters(
    MySqlCommand^ command
)

Parameters

command
Type: MySql.Data.MySqlClient..::.MySqlCommand
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.

Exceptions

Exception | Condition
System..::.InvalidOperationException | The command text is not a valid stored procedure name.

See Also

MySqlCommandBuilder Class


Dispose Method

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder..::.Dispose Method
MySqlCommandBuilder Class See Also Send Feedback

Overload List

Name | Description
Dispose()()() | Releases all resources used by the Component. (Inherited from Component.)
Dispose(Boolean) | Releases the unmanaged resources used by the DbCommandBuilder and optionally releases the managed resources. (Inherited from DbCommandBuilder.)

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Members


GetDeleteCommand Method

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder..::.GetDeleteCommand Method
MySqlCommandBuilder Class See Also Send Feedback

Overload List

Name | Description
GetDeleteCommand()()() | Gets the delete command.
GetDeleteCommand(Boolean) | Gets the automatically generated DbCommand object required to perform deletions at the data source, optionally using columns for parameter names. (Inherited from DbCommandBuilder.)

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Members


GetDeleteCommand Method

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.GetDeleteCommand Method
MySqlCommandBuilder Class See Also Send Feedback
Gets the delete command.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand GetDeleteCommand()
Visual Basic (Declaration)
Public Function GetDeleteCommand As MySqlCommand
Visual C++
public:
MySqlCommand^ GetDeleteCommand()

Return Value

See Also

MySqlCommandBuilder Class
GetDeleteCommand Overload


GetInsertCommand Method

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder..::.GetInsertCommand Method
MySqlCommandBuilder Class See Also Send Feedback

Overload List

Name | Description
GetInsertCommand()()() | Gets the insert command.
GetInsertCommand(Boolean) | Gets the automatically generated DbCommand object required to perform insertions at the data source, optionally using columns for parameter names. (Inherited from DbCommandBuilder.)

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Members


GetInsertCommand Method

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.GetInsertCommand Method
MySqlCommandBuilder Class See Also Send Feedback
Gets the insert command.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand GetInsertCommand()
Visual Basic (Declaration)
Public Function GetInsertCommand As MySqlCommand
Visual C++
public:
MySqlCommand^ GetInsertCommand()

Return Value

See Also

MySqlCommandBuilder Class
GetInsertCommand Overload


GetParameterName Method

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder..::.GetParameterName Method
MySqlCommandBuilder Class See Also Send Feedback

Overload List

Name | Description
GetParameterName(Int32) | Returns the name of the specified parameter in the format of @p#. Use when building a custom command builder. (Inherited from DbCommandBuilder.)
GetParameterName(String) | Returns the full parameter name, given the partial parameter name. (Inherited from DbCommandBuilder.)

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Members


GetUpdateCommand Method

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder..::.GetUpdateCommand Method
MySqlCommandBuilder Class See Also Send Feedback

Overload List

Name | Description
GetUpdateCommand()()() | Gets the update command.
GetUpdateCommand(Boolean) | Gets the automatically generated DbCommand object required to perform updates at the data source, optionally using columns for parameter names. (Inherited from DbCommandBuilder.)

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Members


GetUpdateCommand Method

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.GetUpdateCommand Method
MySqlCommandBuilder Class See Also Send Feedback
Gets the update command.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand GetUpdateCommand()
Visual Basic (Declaration)
Public Function GetUpdateCommand As MySqlCommand
Visual C++
public:
MySqlCommand^ GetUpdateCommand()

Return Value

See Also

MySqlCommandBuilder Class
GetUpdateCommand Overload


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder..::.MemberwiseClone Method
MySqlCommandBuilder Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlCommandBuilder Class
MySqlCommandBuilder Members


QuoteIdentifier Method

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.QuoteIdentifier Method
MySqlCommandBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string QuoteIdentifier(
    string unquotedIdentifier
)
Visual Basic (Declaration)
Public Overrides Function QuoteIdentifier ( _
    unquotedIdentifier As String _
) As String
Visual C++
public:
virtual String^ QuoteIdentifier(
    String^ unquotedIdentifier
) override

Parameters

unquotedIdentifier
Type: System..::.String

See Also

MySqlCommandBuilder Class


RefreshSchema Method

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.RefreshSchema Method
MySqlCommandBuilder Class See Also Send Feedback
Refreshes the database schema information used to generate INSERT, UPDATE, or DELETE statements.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void RefreshSchema()
Visual Basic (Declaration)
Public Overrides Sub RefreshSchema
Visual C++
public:
virtual void RefreshSchema() override

Remarks

An application should call RefreshSchema whenever the SELECT statement associated with the MySqlCommandBuilder changes.

An application should call RefreshSchema whenever the SelectCommand value of the MySqlDataAdapter changes.

See Also

MySqlCommandBuilder Class


UnquoteIdentifier Method

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.UnquoteIdentifier Method
MySqlCommandBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string UnquoteIdentifier(
    string quotedIdentifier
)
Visual Basic (Declaration)
Public Overrides Function UnquoteIdentifier ( _
    quotedIdentifier As String _
) As String
Visual C++
public:
virtual String^ UnquoteIdentifier(
    String^ quotedIdentifier
) override

Parameters

quotedIdentifier
Type: System..::.String

See Also

MySqlCommandBuilder Class


MySqlCommandBuilder Properties

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder Properties
MySqlCommandBuilder Class See Also Send Feedback

The MySqlCommandBuilder type exposes the following members.

Properties

Name | Description
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
CatalogLocation | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class. (Inherited from DbCommandBuilder.)
CatalogSeparator | Sets or gets a string used as the catalog separator for an instance of the DbCommandBuilder class. (Inherited from DbCommandBuilder.)
ConflictOption | Specifies which ConflictOption is to be used by the DbCommandBuilder. (Inherited from DbCommandBuilder.)
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
DataAdapter | Gets or sets a MySqlDataAdapter object for which SQL statements are automatically generated.
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
QuotePrefix | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. (Inherited from DbCommandBuilder.)
QuoteSuffix | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens. (Inherited from DbCommandBuilder.)
ReturnGeneratedIdentifiers | Indicates whether the command builder should generate a SELECT statement to populate any autogenerated fields. We provide this property rather than rely on the MySqlCommand.UpdatedRowSource property since a user should still be able to write a custom insert command and not have our work interfere.
SchemaSeparator | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers. (Inherited from DbCommandBuilder.)
SetAllValues | Specifies whether all column values in an update statement are included or only changed ones. (Inherited from DbCommandBuilder.)
Site | Gets or sets the ISite of the Component. (Inherited from Component.)

See Also

MySqlCommandBuilder Class


DataAdapter Property

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.DataAdapter Property
MySqlCommandBuilder Class See Also Send Feedback
Gets or sets a MySqlDataAdapter object for which SQL statements are automatically generated.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataAdapter DataAdapter { get; set; }
Visual Basic (Declaration)
Public Property DataAdapter As MySqlDataAdapter
Visual C++
public:
property MySqlDataAdapter^ DataAdapter {
    MySqlDataAdapter^ get ();
    void set (MySqlDataAdapter^ value);
}

Field Value

A MySqlDataAdapter object.

Remarks

The MySqlCommandBuilder registers itself as a listener for RowUpdating events that are generated by the MySqlDataAdapter specified in this property.

When you create a new instance MySqlCommandBuilder, any existing MySqlCommandBuilder associated with this MySqlDataAdapter is released.

See Also

MySqlCommandBuilder Class


ReturnGeneratedIdentifiers Property

[image]

MySQL Connector/Net
MySqlCommandBuilder..::.ReturnGeneratedIdentifiers Property
MySqlCommandBuilder Class See Also Send Feedback
Indicates whether the command builder should generate a SELECT statement to populate any autogenerated fields. We provide this property rather than rely on the MySqlCommand.UpdatedRowSource property since a user should still be able to write a custom insert command and not have our work interfere.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool ReturnGeneratedIdentifiers { get; set; }
Visual Basic (Declaration)
Public Property ReturnGeneratedIdentifiers As Boolean
Visual C++
public:
property bool ReturnGeneratedIdentifiers {
    bool get ();
    void set (bool value);
}

See Also

MySqlCommandBuilder Class


MySqlCommandBuilder Events

[image] [image]

MySQL Connector/Net
MySqlCommandBuilder Events
MySqlCommandBuilder Class See Also Send Feedback

The MySqlCommandBuilder type exposes the following members.

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)

See Also

MySqlCommandBuilder Class


MySqlConnection Class

[image]

MySQL Connector/Net
MySqlConnection Class
Members Example See Also Send Feedback
Represents an open connection to a MySQL Server database. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlConnection : DbConnection,
    ICloneable
Visual Basic (Declaration)
Public NotInheritable Class MySqlConnection _
    Inherits DbConnection _
    Implements ICloneable
Visual C++
public ref class MySqlConnection sealed : public DbConnection,
    ICloneable

Remarks

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 Close()()() or Dispose(Boolean).

Examples

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.
CopyVB.NET
<c>
          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
        </c>
CopyC#
<c>
          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();
          }
        </c>

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.ComponentModel..::.Component
System.Data.Common..::.DbConnection
MySql.Data.MySqlClient..::.MySqlConnection

See Also

MySqlConnection Members


MySqlConnection Members

[image] [image]

MySQL Connector/Net
MySqlConnection Members
MySqlConnection Class Constructors Methods Properties Events See Also Send Feedback

The MySqlConnection type exposes the following members.

Constructors

Name | Description
MySqlConnection | Overloaded. Initializes a new instance of the MySqlConnection class.

Methods

Name | Description
BeginDbTransaction | Starts a database transaction. (Inherited from DbConnection.)
BeginTransaction | Overloaded.
ChangeDatabase | Changes the current database for an open MySqlConnection. (Overrides DbConnection..::.ChangeDatabase(String).)
ClearAllPools | Clears all connection pools.
ClearPool | Empties the connection pool associated with the specified connection.
Close | Closes the connection to the database. This is the preferred method of closing any open connection. (Overrides DbConnection..::.Close()()().)
CreateCommand | Creates and returns a MySqlCommand object associated with the MySqlConnection.
CreateDbCommand | Creates and returns a DbCommand object associated with the current connection. (Inherited from DbConnection.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Dispose | Overloaded.
EnlistTransaction | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetSchema | Overloaded.
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
OnStateChange | Raises the StateChange event. (Inherited from DbConnection.)
Open | Opens a database connection with the property settings specified by the ConnectionString. (Overrides DbConnection..::.Open()()().)
Ping | Ping
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

Properties

Name | Description
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
ConnectionString | Gets or sets the string used to connect to a MySQL Server database. (Overrides DbConnection..::.ConnectionString.)
ConnectionTimeout | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. (Overrides DbConnection..::.ConnectionTimeout.)
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
Database | Gets the name of the current database or the database to be used after a connection is opened. (Overrides DbConnection..::.Database.)
DataSource | Gets the name of the MySQL server to which to connect. (Overrides DbConnection..::.DataSource.)
DbProviderFactory | Gets the DbProviderFactory for this DbConnection. (Inherited from DbConnection.)
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
ServerThread | Returns the id of the server thread this connection is executing on
ServerVersion | Gets a string containing the version of the MySQL server to which the client is connected. (Overrides DbConnection..::.ServerVersion.)
Site | Gets or sets the ISite of the Component. (Inherited from Component.)
State | Gets the current state of the connection. (Overrides DbConnection..::.State.)
UseCompression | Indicates if this connection should use compression when communicating with the server.

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)
InfoMessage | Occurs when MySQL returns warnings as a result of executing a command or query.
StateChange | Occurs when the state of the event changes. (Inherited from DbConnection.)

See Also

MySqlConnection Class


MySqlConnection Constructor

[image] [image]

MySQL Connector/Net
MySqlConnection Constructor
MySqlConnection Class See Also Send Feedback
Initializes a new instance of the MySqlConnection class.

Overload List

Name | Description
MySqlConnection()()() | Initializes a new instance of the MySqlConnection class.
MySqlConnection(String) | Initializes a new instance of the MySqlConnection class when given a string containing the connection string.

See Also

MySqlConnection Class
MySqlConnection Members


MySqlConnection Constructor

[image]

MySQL Connector/Net
MySqlConnection Constructor
MySqlConnection Class See Also Send Feedback
Initializes a new instance of the MySqlConnection class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnection()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlConnection()

Remarks

When a new instance of MySqlConnection is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the ConnectionString property.

Properties | Initial Value
ConnectionString | empty string ("")
ConnectionTimeout | 15
Database | empty string ("")
DataSource | empty string ("")
ServerVersion | empty string ("")

You can change the value for these properties only by using the ConnectionString property.

Examples

See Also

MySqlConnection Class
MySqlConnection Overload


MySqlConnection Constructor (String)

[image]

MySQL Connector/Net
MySqlConnection Constructor (String)
MySqlConnection Class See Also Send Feedback
Initializes a new instance of the MySqlConnection class when given a string containing the connection string.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnection(
    string connectionString
)
Visual Basic (Declaration)
Public Sub New ( _
    connectionString As String _
)
Visual C++
public:
MySqlConnection(
    String^ connectionString
)

Parameters

connectionString
Type: System..::.String
The connection properties used to open the MySQL database.

Remarks

When a new instance of MySqlConnection is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the ConnectionString property.

Properties | Initial Value
ConnectionString | empty string ("")
ConnectionTimeout | 15
Database | empty string ("")
DataSource | empty string ("")
ServerVersion | empty string ("")

You can change the value for these properties only by using the ConnectionString property.

Examples

See Also

MySqlConnection Class
MySqlConnection Overload


MySqlConnection Methods

[image] [image]

MySQL Connector/Net
MySqlConnection Methods
MySqlConnection Class See Also Send Feedback

The MySqlConnection type exposes the following members.

Methods

Name | Description
BeginDbTransaction | Starts a database transaction. (Inherited from DbConnection.)
BeginTransaction | Overloaded.
ChangeDatabase | Changes the current database for an open MySqlConnection. (Overrides DbConnection..::.ChangeDatabase(String).)
ClearAllPools | Clears all connection pools.
ClearPool | Empties the connection pool associated with the specified connection.
Close | Closes the connection to the database. This is the preferred method of closing any open connection. (Overrides DbConnection..::.Close()()().)
CreateCommand | Creates and returns a MySqlCommand object associated with the MySqlConnection.
CreateDbCommand | Creates and returns a DbCommand object associated with the current connection. (Inherited from DbConnection.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Dispose | Overloaded.
EnlistTransaction | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetSchema | Overloaded.
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
OnStateChange | Raises the StateChange event. (Inherited from DbConnection.)
Open | Opens a database connection with the property settings specified by the ConnectionString. (Overrides DbConnection..::.Open()()().)
Ping | Ping
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)

See Also

MySqlConnection Class


BeginTransaction Method

[image] [image]

MySQL Connector/Net
MySqlConnection..::.BeginTransaction Method
MySqlConnection Class See Also Send Feedback

Overload List

Name | Description
BeginTransaction()()() | Begins a database transaction.
BeginTransaction(IsolationLevel) | Begins a database transaction with the specified isolation level.

See Also

MySqlConnection Class
MySqlConnection Members


BeginTransaction Method

[image]

MySQL Connector/Net
MySqlConnection..::.BeginTransaction Method
MySqlConnection Class Example See Also Send Feedback
Begins a database transaction.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlTransaction BeginTransaction()
Visual Basic (Declaration)
Public Function BeginTransaction As MySqlTransaction
Visual C++
public:
MySqlTransaction^ BeginTransaction()

Return Value

An object representing the new transaction.

Remarks

This command is equivalent to the MySQL BEGIN TRANSACTION command.

You must explicitly commit or roll back the transaction using the Commit()()() or Rollback()()() method.

Note: If you do not specify an isolation level, the default isolation level is used. To specify an isolation level with the BeginTransaction()()() 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.

Examples

The following example creates a MySqlConnection and a MySqlTransaction. It also demonstrates how to use the BeginTransaction, a Commit()()(), and Rollback()()() methods.
CopyVB.NET
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
CopyC#
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();
}
}

Exceptions

Exception | Condition
System..::.InvalidOperationException | Parallel transactions are not supported.

See Also

MySqlConnection Class
BeginTransaction Overload


BeginTransaction Method (IsolationLevel)

[image]

MySQL Connector/Net
MySqlConnection..::.BeginTransaction Method (IsolationLevel)
MySqlConnection Class Example See Also Send Feedback
Begins a database transaction with the specified isolation level.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlTransaction BeginTransaction(
    IsolationLevel iso
)
Visual Basic (Declaration)
Public Function BeginTransaction ( _
    iso As IsolationLevel _
) As MySqlTransaction
Visual C++
public:
MySqlTransaction^ BeginTransaction(
    IsolationLevel iso
)

Parameters

iso
Type: System.Data..::.IsolationLevel
The isolation level under which the transaction should run.

Return Value

An object representing the new transaction.

Remarks

This command is equivalent to the MySQL BEGIN TRANSACTION command.

You must explicitly commit or roll back the transaction using the Commit()()() or Rollback()()() method.

Note: If you do not specify an isolation level, the default isolation level is used. To specify an isolation level with the BeginTransaction()()() 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.

Examples

The following example creates a MySqlConnection and a MySqlTransaction. It also demonstrates how to use the BeginTransaction, a Commit()()(), and Rollback()()() methods.
CopyVB.NET
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
CopyC#
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();
}
}

Exceptions

Exception | Condition
System..::.InvalidOperationException | Parallel exceptions are not supported.

See Also

MySqlConnection Class
BeginTransaction Overload


ChangeDatabase Method

[image]

MySQL Connector/Net
MySqlConnection..::.ChangeDatabase Method
MySqlConnection Class Example See Also Send Feedback
Changes the current database for an open MySqlConnection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void ChangeDatabase(
    string databaseName
)
Visual Basic (Declaration)
Public Overrides Sub ChangeDatabase ( _
    databaseName As String _
)
Visual C++
public:
virtual void ChangeDatabase(
    String^ databaseName
) override

Parameters

databaseName
Type: System..::.String
The name of the database to use.

Implements

IDbConnection..::.ChangeDatabase(String)

Remarks

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.

Examples

The following example creates a MySqlConnection and displays some of its read-only properties.
CopyVB.NET
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
CopyC#
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();
}

Exceptions

Exception | Condition
System..::.ArgumentException | The database name is not valid.
System..::.InvalidOperationException | The connection is not open.
MySql.Data.MySqlClient..::.MySqlException | Cannot change the database.

See Also

MySqlConnection Class


ClearAllPools Method

[image]

MySQL Connector/Net
MySqlConnection..::.ClearAllPools Method
MySqlConnection Class See Also Send Feedback
Clears all connection pools.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static void ClearAllPools()
Visual Basic (Declaration)
Public Shared Sub ClearAllPools
Visual C++
public:
static void ClearAllPools()

Remarks

ClearAllPools essentially performs a ClearPool(MySqlConnection) on all current connection pools.

See Also

MySqlConnection Class


ClearPool Method

[image]

MySQL Connector/Net
MySqlConnection..::.ClearPool Method
MySqlConnection Class See Also Send Feedback
Empties the connection pool associated with the specified connection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static void ClearPool(
    MySqlConnection connection
)
Visual Basic (Declaration)
Public Shared Sub ClearPool ( _
    connection As MySqlConnection _
)
Visual C++
public:
static void ClearPool(
    MySqlConnection^ connection
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
The MySqlConnection associated with the pool to be cleared.

Remarks

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.

See Also

MySqlConnection Class


Close Method

[image]

MySQL Connector/Net
MySqlConnection..::.Close Method
MySqlConnection Class Example See Also Send Feedback
Closes the connection to the database. This is the preferred method of closing any open connection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Close()
Visual Basic (Declaration)
Public Overrides Sub Close
Visual C++
public:
virtual void Close() override

Implements

IDbConnection..::.Close()()()

Remarks

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.

Examples

The following example creates a MySqlConnection, opens it, displays some of its properties, then closes the connection.
CopyVB.NET
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
CopyC#
public void CreateMySqlConnection(string myConnString)
{
MySqlConnection myConnection = new MySqlConnection(myConnString);
myConnection.Open();
MessageBox.Show("ServerVersion: " + myConnection.ServerVersion +
"\nState: " + myConnection.State.ToString());
myConnection.Close();
}

See Also

MySqlConnection Class


CreateCommand Method

[image]

MySQL Connector/Net
MySqlConnection..::.CreateCommand Method
MySqlConnection Class See Also Send Feedback
Creates and returns a MySqlCommand object associated with the MySqlConnection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand CreateCommand()
Visual Basic (Declaration)
Public Function CreateCommand As MySqlCommand
Visual C++
public:
MySqlCommand^ CreateCommand()

Return Value

A MySqlCommand object.

See Also

MySqlConnection Class


Dispose Method

[image] [image]

MySQL Connector/Net
MySqlConnection..::.Dispose Method
MySqlConnection Class See Also Send Feedback

Overload List

Name | Description
Dispose()()() | Releases all resources used by the Component. (Inherited from Component.)
Dispose(Boolean) | Releases the unmanaged resources used by the Component and optionally releases the managed resources. (Inherited from Component.)

See Also

MySqlConnection Class
MySqlConnection Members


EnlistTransaction Method

[image] [image]

MySQL Connector/Net
MySqlConnection..::.EnlistTransaction Method
MySqlConnection Class See Also Send Feedback

Overload List

Name | Description
EnlistTransaction(Transaction) | Enlists in the specified transaction. (Inherited from DbConnection.)
EnlistTransaction(Transaction) | Enlists in the specified transaction.

See Also

MySqlConnection Class
MySqlConnection Members


EnlistTransaction Method (Transaction)

[image]

MySQL Connector/Net
MySqlConnection..::.EnlistTransaction Method (Transaction)
MySqlConnection Class See Also Send Feedback
Enlists in the specified transaction.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public virtual void EnlistTransaction(
    Transaction transaction
)
Visual Basic (Declaration)
Public Overridable Sub EnlistTransaction ( _
    transaction As Transaction _
)
Visual C++
public:
virtual void EnlistTransaction(
    Transaction^ transaction
)

Parameters

transaction
Type: System.Transactions..::.Transaction
A reference to an existing Transaction in which to enlist.

See Also

MySqlConnection Class
EnlistTransaction Overload


GetSchema Method

[image] [image]

MySQL Connector/Net
MySqlConnection..::.GetSchema Method
MySqlConnection Class See Also Send Feedback

Overload List

Name | Description
GetSchema()()() | Returns schema information for the data source of this DbConnection. (Overrides DbConnection..::.GetSchema()()().)
GetSchema(String) | Returns schema information for the data source of this DbConnection using the specified string for the schema name. (Overrides DbConnection..::.GetSchema(String).)
GetSchema(String, array<String>[]()[]) | Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values. (Overrides DbConnection..::.GetSchema(String, array<String>[]()[]).)

See Also

MySqlConnection Class
MySqlConnection Members


GetSchema Method

[image]

MySQL Connector/Net
MySqlConnection..::.GetSchema Method
MySqlConnection Class See Also Send Feedback
Returns schema information for the data source of this DbConnection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DataTable GetSchema()
Visual Basic (Declaration)
Public Overrides Function GetSchema As DataTable
Visual C++
public:
virtual DataTable^ GetSchema() override

Return Value

A DataTable that contains schema information.

See Also

MySqlConnection Class
GetSchema Overload


GetSchema Method (String)

[image]

MySQL Connector/Net
MySqlConnection..::.GetSchema Method (String)
MySqlConnection Class See Also Send Feedback
Returns schema information for the data source of this DbConnection using the specified string for the schema name.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DataTable GetSchema(
    string collectionName
)
Visual Basic (Declaration)
Public Overrides Function GetSchema ( _
    collectionName As String _
) As DataTable
Visual C++
public:
virtual DataTable^ GetSchema(
    String^ collectionName
) override

Parameters

collectionName
Type: System..::.String
Specifies the name of the schema to return.

Return Value

A DataTable that contains schema information.

See Also

MySqlConnection Class
GetSchema Overload


GetSchema Method (String, String[])

[image]

MySQL Connector/Net
MySqlConnection..::.GetSchema Method (String, array<String>[]()[])
MySqlConnection Class See Also Send Feedback
Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DataTable GetSchema(
    string collectionName,
    string[] restrictionValues
)
Visual Basic (Declaration)
Public Overrides Function GetSchema ( _
    collectionName As String, _
    restrictionValues As String() _
) As DataTable
Visual C++
public:
virtual DataTable^ GetSchema(
    String^ collectionName,
    array<String^>^ restrictionValues
) override

Parameters

collectionName
Type: System..::.String
Specifies the name of the schema to return.
restrictionValues
Type: array< System..::.String >[]()[]
Specifies a set of restriction values for the requested schema.

Return Value

A DataTable that contains schema information.

See Also

MySqlConnection Class
GetSchema Overload


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlConnection..::.MemberwiseClone Method
MySqlConnection Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlConnection Class
MySqlConnection Members


Open Method

[image]

MySQL Connector/Net
MySqlConnection..::.Open Method
MySqlConnection Class Example See Also Send Feedback
Opens a database connection with the property settings specified by the ConnectionString.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Open()
Visual Basic (Declaration)
Public Overrides Sub Open
Visual C++
public:
virtual void Open() override

Implements

IDbConnection..::.Open()()()

Remarks

The MySqlConnection draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to an instance of MySQL.

Examples

The following example creates a MySqlConnection, opens it, displays some of its properties, then closes the connection.
CopyVB.NET
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
CopyC#
public void CreateMySqlConnection(string myConnString)
{
MySqlConnection myConnection = new MySqlConnection(myConnString);
myConnection.Open();
MessageBox.Show("ServerVersion: " + myConnection.ServerVersion +
"\nState: " + myConnection.State.ToString());
myConnection.Close();
}

Exceptions

Exception | Condition
System..::.InvalidOperationException | Cannot open a connection without specifying a data source or server.
MySql.Data.MySqlClient..::.MySqlException | A connection-level error occurred while opening the connection.

See Also

MySqlConnection Class


Ping Method

[image]

MySQL Connector/Net
MySqlConnection..::.Ping Method
MySqlConnection Class See Also Send Feedback
Ping

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool Ping()
Visual Basic (Declaration)
Public Function Ping As Boolean
Visual C++
public:
bool Ping()

Return Value

See Also

MySqlConnection Class


MySqlConnection Properties

[image] [image]

MySQL Connector/Net
MySqlConnection Properties
MySqlConnection Class See Also Send Feedback

The MySqlConnection type exposes the following members.

Properties

Name | Description
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
ConnectionString | Gets or sets the string used to connect to a MySQL Server database. (Overrides DbConnection..::.ConnectionString.)
ConnectionTimeout | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. (Overrides DbConnection..::.ConnectionTimeout.)
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
Database | Gets the name of the current database or the database to be used after a connection is opened. (Overrides DbConnection..::.Database.)
DataSource | Gets the name of the MySQL server to which to connect. (Overrides DbConnection..::.DataSource.)
DbProviderFactory | Gets the DbProviderFactory for this DbConnection. (Inherited from DbConnection.)
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
ServerThread | Returns the id of the server thread this connection is executing on
ServerVersion | Gets a string containing the version of the MySQL server to which the client is connected. (Overrides DbConnection..::.ServerVersion.)
Site | Gets or sets the ISite of the Component. (Inherited from Component.)
State | Gets the current state of the connection. (Overrides DbConnection..::.State.)
UseCompression | Indicates if this connection should use compression when communicating with the server.

See Also

MySqlConnection Class


ConnectionString Property

[image]

MySQL Connector/Net
MySqlConnection..::.ConnectionString Property
MySqlConnection Class Example See Also Send Feedback
Gets or sets the string used to connect to a MySQL Server database.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string ConnectionString { get; set; }
Visual Basic (Declaration)
Public Overrides Property ConnectionString As String
Visual C++
public:
virtual property String^ ConnectionString {
    String^ get () override;
    void set (String^ value) override;
}

Implements

IDbConnection..::.ConnectionString

Remarks

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. MySqlConnection 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 Database 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 ArgumentException, 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.

Name | Default | Description
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.

Port | 3306 | The port MySQL is using to listen for connections. This value is ignored if the connection protocol is anything but socket.
Protocol socket 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.
Logging | false | When true, various pieces of information is output to any configured TraceListeners.
Allow Batch true 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 ';'.
Encrypt | false | 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 		mysql The name of the database to use intially
Password

-or-

pwd 		The password for the MySQL account being used.
Persist Security Info | false | 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 Name | MYSQL | The name of the shared memory object to use for communication if the connection protocol is set to memory.
Allow Zero Datetime | false | 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 Datetime | false | 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 Bodies | true | 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 Enlist | true | Indicates whether the connection should automatically enlist in the current transaction, if there is one.
Respect Binary Flags | true | 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.
BlobAsUTF8IncludePattern | null | Pattern that should be used to indicate which blob columns should be treated as UTF-8.
BlobAsUTF8ExcludePattern | null | Pattern that should be used to indicate which blob columns should not be treated as UTF-8.
Default Command Timeout | 30 | The default timeout that new MySqlCommand objects will use unless changed.
Allow User Variables | false | Should the provider expect user variables in the SQL.
Interactive -or- Interactive Session | false | Should this session be considered interactive?
Functions Return String | false | Set this option to true to force the return value of SQL functions to be string.
Use Affected Rows | false | 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.

Name | Default | Description
Connection Lifetime | 0 | 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 Size | 100 | The maximum number of connections allowed in the pool.
Min Pool Size | 0 | The minimum number of connections allowed in the pool.
Pooling | true | 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 Reset | false | 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.

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).

Examples

The following example creates a MySqlConnection and sets some of its properties
CopyVB.NET
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
CopyC#
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();
}

Examples

The following example creates a MySqlConnection 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.
CopyVB.NET
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
CopyC#
public void CreateConnection()
{
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass";
myConnection.Open();
}

See Also

MySqlConnection Class


ConnectionTimeout Property

[image]

MySQL Connector/Net
MySqlConnection..::.ConnectionTimeout Property
MySqlConnection Class Example See Also Send Feedback
Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int ConnectionTimeout { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property ConnectionTimeout As Integer
Visual C++
public:
virtual property int ConnectionTimeout {
    int get () override;
}

Implements

IDbConnection..::.ConnectionTimeout

Remarks

A value of 0 indicates no limit, and should be avoided in a ConnectionString because an attempt to connect will wait indefinitely.

Examples

The following example creates a MySqlConnection and sets some of its properties in the connection string.
CopyVB.NET
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
CopyC#
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();
}

Exceptions

Exception | Condition
System..::.ArgumentException | The value set is less than 0.

See Also

MySqlConnection Class


Database Property

[image]

MySQL Connector/Net
MySqlConnection..::.Database Property
MySqlConnection Class Example See Also Send Feedback
Gets the name of the current database or the database to be used after a connection is opened.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string Database { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property Database As String
Visual C++
public:
virtual property String^ Database {
    String^ get () override;
}

Return Value

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.

Implements

IDbConnection..::.Database

Remarks

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 ChangeDatabase(String) method, this property is updated to reflect the new database.

Examples

The following example creates a MySqlConnection and displays some of its read-only properties.
CopyVB.NET
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
CopyC#
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();
}

See Also

MySqlConnection Class


DataSource Property

[image]

MySQL Connector/Net
MySqlConnection..::.DataSource Property
MySqlConnection Class See Also Send Feedback
Gets the name of the MySQL server to which to connect.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string DataSource { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property DataSource As String
Visual C++
public:
virtual property String^ DataSource {
    String^ get () override;
}

See Also

MySqlConnection Class


ServerThread Property

[image]

MySQL Connector/Net
MySqlConnection..::.ServerThread Property
MySqlConnection Class See Also Send Feedback
Returns the id of the server thread this connection is executing on

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int ServerThread { get; }
Visual Basic (Declaration)
Public ReadOnly Property ServerThread As Integer
Visual C++
public:
property int ServerThread {
    int get ();
}

See Also

MySqlConnection Class


ServerVersion Property

[image]

MySQL Connector/Net
MySqlConnection..::.ServerVersion Property
MySqlConnection Class Example See Also Send Feedback
Gets a string containing the version of the MySQL server to which the client is connected.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string ServerVersion { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property ServerVersion As String
Visual C++
public:
virtual property String^ ServerVersion {
    String^ get () override;
}

Return Value

The version of the instance of MySQL.

Examples

The following example creates a MySqlConnection, opens it, displays some of its properties, then closes the connection.
CopyVB.NET
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
CopyC#
public void CreateMySqlConnection(string myConnString)
{
MySqlConnection myConnection = new MySqlConnection(myConnString);
myConnection.Open();
MessageBox.Show("ServerVersion: " + myConnection.ServerVersion +
"\nState: " + myConnection.State.ToString());
myConnection.Close();
}

Exceptions

Exception | Condition
System..::.InvalidOperationException | The connection is closed.

See Also

MySqlConnection Class


State Property

[image]

MySQL Connector/Net
MySqlConnection..::.State Property
MySqlConnection Class Example See Also Send Feedback
Gets the current state of the connection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override ConnectionState State { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property State As ConnectionState
Visual C++
public:
virtual property ConnectionState State {
    ConnectionState get () override;
}

Return Value

A bitwise combination of the ConnectionState values. The default is Closed.

Implements

IDbConnection..::.State

Remarks

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.

Examples

The following example creates a MySqlConnection, opens it, displays some of its properties, then closes the connection.
CopyVB.NET
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
CopyC#
public void CreateMySqlConnection(string myConnString)
{
MySqlConnection myConnection = new MySqlConnection(myConnString);
myConnection.Open();
MessageBox.Show("ServerVersion: " + myConnection.ServerVersion +
"\nState: " + myConnection.State.ToString());
myConnection.Close();
}

See Also

MySqlConnection Class


UseCompression Property

[image]

MySQL Connector/Net
MySqlConnection..::.UseCompression Property
MySqlConnection Class See Also Send Feedback
Indicates if this connection should use compression when communicating with the server.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool UseCompression { get; }
Visual Basic (Declaration)
Public ReadOnly Property UseCompression As Boolean
Visual C++
public:
property bool UseCompression {
    bool get ();
}

See Also

MySqlConnection Class


MySqlConnection Events

[image] [image]

MySQL Connector/Net
MySqlConnection Events
MySqlConnection Class See Also Send Feedback

The MySqlConnection type exposes the following members.

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)
InfoMessage | Occurs when MySQL returns warnings as a result of executing a command or query.
StateChange | Occurs when the state of the event changes. (Inherited from DbConnection.)

See Also

MySqlConnection Class


InfoMessage Event

[image]

MySQL Connector/Net
MySqlConnection..::.InfoMessage Event
MySqlConnection Class See Also Send Feedback
Occurs when MySQL returns warnings as a result of executing a command or query.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public event MySqlInfoMessageEventHandler InfoMessage
Visual Basic (Declaration)
Public Event InfoMessage As MySqlInfoMessageEventHandler
Visual C++
public:
 event MySqlInfoMessageEventHandler^ InfoMessage {
    void add (MySqlInfoMessageEventHandler^ value);
    void remove (MySqlInfoMessageEventHandler^ value);
}

Remarks

See Also

MySqlConnection Class


MySqlConnectionProtocol Enumeration

[image]

MySQL Connector/Net
MySqlConnectionProtocol Enumeration
See Also Send Feedback
Allows the user to specify the type of connection that should be used.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public enum MySqlConnectionProtocol
Visual Basic (Declaration)
Public Enumeration MySqlConnectionProtocol
Visual C++
public enum class MySqlConnectionProtocol

Members

Member name | Description
Sockets | TCP/IP style connection. Works everywhere.
NamedPipe | Named pipe connection. Works only on Windows systems.
UnixSocket | Unix domain socket connection. Works only with Unix systems.
SharedMemory | Shared memory connection. Currently works only with Windows systems.

See Also


MySqlConnectionStringBuilder Class

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder Class
Members See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlConnectionStringBuilder : DbConnectionStringBuilder
Visual Basic (Declaration)
Public NotInheritable Class MySqlConnectionStringBuilder _
    Inherits DbConnectionStringBuilder
Visual C++
public ref class MySqlConnectionStringBuilder sealed : public DbConnectionStringBuilder

Inheritance Hierarchy

System..::.Object
System.Data.Common..::.DbConnectionStringBuilder
MySql.Data.MySqlClient..::.MySqlConnectionStringBuilder

See Also

MySqlConnectionStringBuilder Members


MySqlConnectionStringBuilder Members

[image] [image]

MySQL Connector/Net
MySqlConnectionStringBuilder Members
MySqlConnectionStringBuilder Class Constructors Methods Properties See Also Send Feedback

The MySqlConnectionStringBuilder type exposes the following members.

Constructors

Name | Description
MySqlConnectionStringBuilder | Overloaded.

Methods

Name | Description
Add | Adds an entry with the specified key and value into the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
Clear | Clears the contents of the MySqlConnectionStringBuilder instance. (Overrides DbConnectionStringBuilder..::.Clear()()().)
ClearPropertyDescriptors | Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
ContainsKey | Determines whether the DbConnectionStringBuilder contains a specific key. (Inherited from DbConnectionStringBuilder.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
EquivalentTo | Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object. (Inherited from DbConnectionStringBuilder.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetProperties | Fills a supplied Hashtable with information about all the properties of this DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Remove | Removes the entry with the specified key from the DbConnectionStringBuilder instance. (Overrides DbConnectionStringBuilder..::.Remove(String).)
ShouldSerialize | Indicates whether the specified key exists in this DbConnectionStringBuilder instance. (Inherited from DbConnectionStringBuilder.)
ToString | Returns the connection string associated with this DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
TryGetValue | Retrieves a value corresponding to the supplied key from this DbConnectionStringBuilder. (Overrides DbConnectionStringBuilder..::.TryGetValue(String, Object%).)

Properties

Name | Description
AllowBatch | Gets or sets a boolean value that indicates whether this connection will allow commands to send multiple SQL statements in one execution.
AllowUserVariables |
AllowZeroDateTime | Gets or sets a boolean value that indicates if zero date time values are supported.
AutoEnlist |
BlobAsUTF8ExcludePattern | Gets or sets the pattern that matches the columns that should not be treated as UTF8
BlobAsUTF8IncludePattern | Gets or sets the pattern that matches the columns that should be treated as UTF8
BrowsableConnectionString | Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers. (Inherited from DbConnectionStringBuilder.)
CharacterSet | Gets or sets the character set that should be used for sending queries to the server.
ConnectionLifeTime | Gets or sets the lifetime of a pooled connection.
ConnectionProtocol | Gets or sets the protocol that should be used for communicating with MySQL.
ConnectionReset | Gets or sets a boolean value indicating if the connection should be reset when retrieved from the pool.
ConnectionString | Gets or sets the connection string associated with the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
ConnectionTimeout | Gets or sets the connection timeout.
ConvertZeroDateTime | Gets or sets a boolean value indicating if zero datetime values should be converted to DateTime.MinValue.
Count | Gets the current number of keys that are contained within the ConnectionString property. (Inherited from DbConnectionStringBuilder.)
Database | Gets or sets the name of the database the connection should initially connect to.
DefaultCommandTimeout | Gets or sets the default command timeout.
DriverType | Gets or sets the driver type that should be used for this connection.
FunctionsReturnString |
IgnorePrepare | Gets or sets a boolean value indicating if calls to Prepare() should be ignored.
InteractiveSession |
IsFixedSize | Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size. (Inherited from DbConnectionStringBuilder.)
IsReadOnly | Gets a value that indicates whether the DbConnectionStringBuilder is read-only. (Inherited from DbConnectionStringBuilder.)
Item | Gets or sets the value associated with the specified key. In C#, this property is the indexer. (Overrides DbConnectionStringBuilder..::.Item[([(String])]).)
Keys | Gets an ICollection that contains the keys in the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
Logging | Gets or sets a boolean value that indicates whether logging is enabled.
MaximumPoolSize | Gets or sets the maximum connection pool setting.
MinimumPoolSize | Gets the minimum connection pool size.
Password | Gets or sets the password that should be used to connect with.
PersistSecurityInfo | Gets or sets a boolean value that indicates if the password should be persisted in the connection string.
PipeName | Gets or sets the name of the named pipe that should be used for communicating with MySQL.
Pooling | Gets or sets a boolean value indicating if connection pooling is enabled.
Port | Gets or sets the port number that is used when the socket protocol is being used.
ProcedureCacheSize | Gets or sets the size of the stored procedure cache.
RespectBinaryFlags |
Server | Gets or sets the name of the server.
SharedMemoryName | Gets or sets the base name of the shared memory objects used to communicate with MySQL when the shared memory protocol is being used.
TreatBlobsAsUTF8 | Indicates whether the driver should treat binary blobs as UTF8
TreatTinyAsBoolean |
UseAffectedRows |
UseCompression | Gets or sets a boolean value that indicates whether this connection should use compression.
UseOldSyntax | Obsolete. Gets or sets a boolean value that indicates whether this connection uses the old style (@) parameter markers or the new (?) style.
UsePerformanceMonitor | Gets or sets a boolean value indicating if the permon hooks should be enabled.
UseProcedureBodies |
UserID | Gets or sets the user id that should be used to connect with.
UseUsageAdvisor | Gets or sets a boolean value indicating if the Usage Advisor should be enabled.
Values | Gets an ICollection that contains the values in the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)

See Also

MySqlConnectionStringBuilder Class


MySqlConnectionStringBuilder Constructor

[image] [image]

MySQL Connector/Net
MySqlConnectionStringBuilder Constructor
MySqlConnectionStringBuilder Class See Also Send Feedback

Overload List

Name | Description
MySqlConnectionStringBuilder()()() | Initializes a new instance of the MySqlConnectionStringBuilder class.
MySqlConnectionStringBuilder(String) | Initializes a new instance of the MySqlConnectionStringBuilder class. The provided connection string provides the data for the instance's internal connection information.

See Also

MySqlConnectionStringBuilder Class
MySqlConnectionStringBuilder Members


MySqlConnectionStringBuilder Constructor

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder Constructor
MySqlConnectionStringBuilder Class See Also Send Feedback
Initializes a new instance of the MySqlConnectionStringBuilder class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnectionStringBuilder()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlConnectionStringBuilder()

See Also

MySqlConnectionStringBuilder Class
MySqlConnectionStringBuilder Overload


MySqlConnectionStringBuilder Constructor (String)

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder Constructor (String)
MySqlConnectionStringBuilder Class See Also Send Feedback
Initializes a new instance of the MySqlConnectionStringBuilder class. The provided connection string provides the data for the instance's internal connection information.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnectionStringBuilder(
    string connectionString
)
Visual Basic (Declaration)
Public Sub New ( _
    connectionString As String _
)
Visual C++
public:
MySqlConnectionStringBuilder(
    String^ connectionString
)

Parameters

connectionString
Type: System..::.String
The basis for the object's internal connection information. Parsed into name/value pairs. Invalid key names raise KeyNotFoundException.

See Also

MySqlConnectionStringBuilder Class
MySqlConnectionStringBuilder Overload


MySqlConnectionStringBuilder Methods

[image] [image]

MySQL Connector/Net
MySqlConnectionStringBuilder Methods
MySqlConnectionStringBuilder Class See Also Send Feedback

The MySqlConnectionStringBuilder type exposes the following members.

Methods

Name | Description
Add | Adds an entry with the specified key and value into the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
Clear | Clears the contents of the MySqlConnectionStringBuilder instance. (Overrides DbConnectionStringBuilder..::.Clear()()().)
ClearPropertyDescriptors | Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
ContainsKey | Determines whether the DbConnectionStringBuilder contains a specific key. (Inherited from DbConnectionStringBuilder.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
EquivalentTo | Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object. (Inherited from DbConnectionStringBuilder.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetProperties | Fills a supplied Hashtable with information about all the properties of this DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
Remove | Removes the entry with the specified key from the DbConnectionStringBuilder instance. (Overrides DbConnectionStringBuilder..::.Remove(String).)
ShouldSerialize | Indicates whether the specified key exists in this DbConnectionStringBuilder instance. (Inherited from DbConnectionStringBuilder.)
ToString | Returns the connection string associated with this DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
TryGetValue | Retrieves a value corresponding to the supplied key from this DbConnectionStringBuilder. (Overrides DbConnectionStringBuilder..::.TryGetValue(String, Object%).)

See Also

MySqlConnectionStringBuilder Class


Clear Method

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Clear Method
MySqlConnectionStringBuilder Class See Also Send Feedback
Clears the contents of the MySqlConnectionStringBuilder instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Clear()
Visual Basic (Declaration)
Public Overrides Sub Clear
Visual C++
public:
virtual void Clear() override

Implements

IDictionary..::.Clear()()()

See Also

MySqlConnectionStringBuilder Class


Remove Method

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Remove Method
MySqlConnectionStringBuilder Class See Also Send Feedback
Removes the entry with the specified key from the DbConnectionStringBuilder instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool Remove(
    string keyword
)
Visual Basic (Declaration)
Public Overrides Function Remove ( _
    keyword As String _
) As Boolean
Visual C++
public:
virtual bool Remove(
    String^ keyword
) override

Parameters

keyword
Type: System..::.String
The key of the key/value pair to be removed from the connection string in this DbConnectionStringBuilder.

Return Value

true if the key existed within the connection string and was removed; false if the key did not exist.

Exceptions

Exception | Condition
System..::.NotSupportedException | The DbConnectionStringBuilder is read-only, or the DbConnectionStringBuilder has a fixed size.
System..::.ArgumentNullException | keyword is null (Nothing in Visual Basic)

See Also

MySqlConnectionStringBuilder Class


TryGetValue Method

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.TryGetValue Method
MySqlConnectionStringBuilder Class See Also Send Feedback
Retrieves a value corresponding to the supplied key from this DbConnectionStringBuilder.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool TryGetValue(
    string keyword,
    out Object value
)
Visual Basic (Declaration)
Public Overrides Function TryGetValue ( _
    keyword As String, _
    <OutAttribute> ByRef value As Object _
) As Boolean
Visual C++
public:
virtual bool TryGetValue(
    String^ keyword,
    [OutAttribute] Object^% value
) override

Parameters

keyword
Type: System..::.String
The key of the item to retrieve.
value
Type: System..::.Object %
The value corresponding to the key.

Return Value

true if keyword was found within the connection string, false otherwise.

Exceptions

Exception | Condition
System..::.ArgumentNullException | keyword contains a null value (Nothing in Visual Basic).

See Also

MySqlConnectionStringBuilder Class


MySqlConnectionStringBuilder Properties

[image] [image]

MySQL Connector/Net
MySqlConnectionStringBuilder Properties
MySqlConnectionStringBuilder Class See Also Send Feedback

The MySqlConnectionStringBuilder type exposes the following members.

Properties

Name | Description
AllowBatch | Gets or sets a boolean value that indicates whether this connection will allow commands to send multiple SQL statements in one execution.
AllowUserVariables |
AllowZeroDateTime | Gets or sets a boolean value that indicates if zero date time values are supported.
AutoEnlist |
BlobAsUTF8ExcludePattern | Gets or sets the pattern that matches the columns that should not be treated as UTF8
BlobAsUTF8IncludePattern | Gets or sets the pattern that matches the columns that should be treated as UTF8
BrowsableConnectionString | Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers. (Inherited from DbConnectionStringBuilder.)
CharacterSet | Gets or sets the character set that should be used for sending queries to the server.
ConnectionLifeTime | Gets or sets the lifetime of a pooled connection.
ConnectionProtocol | Gets or sets the protocol that should be used for communicating with MySQL.
ConnectionReset | Gets or sets a boolean value indicating if the connection should be reset when retrieved from the pool.
ConnectionString | Gets or sets the connection string associated with the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
ConnectionTimeout | Gets or sets the connection timeout.
ConvertZeroDateTime | Gets or sets a boolean value indicating if zero datetime values should be converted to DateTime.MinValue.
Count | Gets the current number of keys that are contained within the ConnectionString property. (Inherited from DbConnectionStringBuilder.)
Database | Gets or sets the name of the database the connection should initially connect to.
DefaultCommandTimeout | Gets or sets the default command timeout.
DriverType | Gets or sets the driver type that should be used for this connection.
FunctionsReturnString |
IgnorePrepare | Gets or sets a boolean value indicating if calls to Prepare() should be ignored.
InteractiveSession |
IsFixedSize | Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size. (Inherited from DbConnectionStringBuilder.)
IsReadOnly | Gets a value that indicates whether the DbConnectionStringBuilder is read-only. (Inherited from DbConnectionStringBuilder.)
Item | Gets or sets the value associated with the specified key. In C#, this property is the indexer. (Overrides DbConnectionStringBuilder..::.Item[([(String])]).)
Keys | Gets an ICollection that contains the keys in the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)
Logging | Gets or sets a boolean value that indicates whether logging is enabled.
MaximumPoolSize | Gets or sets the maximum connection pool setting.
MinimumPoolSize | Gets the minimum connection pool size.
Password | Gets or sets the password that should be used to connect with.
PersistSecurityInfo | Gets or sets a boolean value that indicates if the password should be persisted in the connection string.
PipeName | Gets or sets the name of the named pipe that should be used for communicating with MySQL.
Pooling | Gets or sets a boolean value indicating if connection pooling is enabled.
Port | Gets or sets the port number that is used when the socket protocol is being used.
ProcedureCacheSize | Gets or sets the size of the stored procedure cache.
RespectBinaryFlags |
Server | Gets or sets the name of the server.
SharedMemoryName | Gets or sets the base name of the shared memory objects used to communicate with MySQL when the shared memory protocol is being used.
TreatBlobsAsUTF8 | Indicates whether the driver should treat binary blobs as UTF8
TreatTinyAsBoolean |
UseAffectedRows |
UseCompression | Gets or sets a boolean value that indicates whether this connection should use compression.
UseOldSyntax | Obsolete. Gets or sets a boolean value that indicates whether this connection uses the old style (@) parameter markers or the new (?) style.
UsePerformanceMonitor | Gets or sets a boolean value indicating if the permon hooks should be enabled.
UseProcedureBodies |
UserID | Gets or sets the user id that should be used to connect with.
UseUsageAdvisor | Gets or sets a boolean value indicating if the Usage Advisor should be enabled.
Values | Gets an ICollection that contains the values in the DbConnectionStringBuilder. (Inherited from DbConnectionStringBuilder.)

See Also

MySqlConnectionStringBuilder Class


AllowBatch Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.AllowBatch Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value that indicates whether this connection will allow commands to send multiple SQL statements in one execution.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool AllowBatch { get; set; }
Visual Basic (Declaration)
Public Property AllowBatch As Boolean
Visual C++
public:
property bool AllowBatch {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


AllowUserVariables Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.AllowUserVariables Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool AllowUserVariables { get; set; }
Visual Basic (Declaration)
Public Property AllowUserVariables As Boolean
Visual C++
public:
property bool AllowUserVariables {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


AllowZeroDateTime Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.AllowZeroDateTime Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value that indicates if zero date time values are supported.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool AllowZeroDateTime { get; set; }
Visual Basic (Declaration)
Public Property AllowZeroDateTime As Boolean
Visual C++
public:
property bool AllowZeroDateTime {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


AutoEnlist Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.AutoEnlist Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool AutoEnlist { get; set; }
Visual Basic (Declaration)
Public Property AutoEnlist As Boolean
Visual C++
public:
property bool AutoEnlist {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


BlobAsUTF8ExcludePattern Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.BlobAsUTF8ExcludePattern Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the pattern that matches the columns that should not be treated as UTF8

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string BlobAsUTF8ExcludePattern { get; set; }
Visual Basic (Declaration)
Public Property BlobAsUTF8ExcludePattern As String
Visual C++
public:
property String^ BlobAsUTF8ExcludePattern {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


BlobAsUTF8IncludePattern Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.BlobAsUTF8IncludePattern Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the pattern that matches the columns that should be treated as UTF8

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string BlobAsUTF8IncludePattern { get; set; }
Visual Basic (Declaration)
Public Property BlobAsUTF8IncludePattern As String
Visual C++
public:
property String^ BlobAsUTF8IncludePattern {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


CharacterSet Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.CharacterSet Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the character set that should be used for sending queries to the server.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string CharacterSet { get; set; }
Visual Basic (Declaration)
Public Property CharacterSet As String
Visual C++
public:
property String^ CharacterSet {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


ConnectionLifeTime Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.ConnectionLifeTime Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the lifetime of a pooled connection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint ConnectionLifeTime { get; set; }
Visual Basic (Declaration)
Public Property ConnectionLifeTime As UInteger
Visual C++
public:
property unsigned int ConnectionLifeTime {
    unsigned int get ();
    void set (unsigned int value);
}

See Also

MySqlConnectionStringBuilder Class


ConnectionProtocol Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.ConnectionProtocol Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the protocol that should be used for communicating with MySQL.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnectionProtocol ConnectionProtocol { get; set; }
Visual Basic (Declaration)
Public Property ConnectionProtocol As MySqlConnectionProtocol
Visual C++
public:
property MySqlConnectionProtocol ConnectionProtocol {
    MySqlConnectionProtocol get ();
    void set (MySqlConnectionProtocol value);
}

See Also

MySqlConnectionStringBuilder Class


ConnectionReset Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.ConnectionReset Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value indicating if the connection should be reset when retrieved from the pool.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool ConnectionReset { get; set; }
Visual Basic (Declaration)
Public Property ConnectionReset As Boolean
Visual C++
public:
property bool ConnectionReset {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


ConnectionTimeout Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.ConnectionTimeout Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the connection timeout.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint ConnectionTimeout { get; set; }
Visual Basic (Declaration)
Public Property ConnectionTimeout As UInteger
Visual C++
public:
property unsigned int ConnectionTimeout {
    unsigned int get ();
    void set (unsigned int value);
}

See Also

MySqlConnectionStringBuilder Class


ConvertZeroDateTime Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.ConvertZeroDateTime Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value indicating if zero datetime values should be converted to DateTime.MinValue.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool ConvertZeroDateTime { get; set; }
Visual Basic (Declaration)
Public Property ConvertZeroDateTime As Boolean
Visual C++
public:
property bool ConvertZeroDateTime {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


Database Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Database Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the name of the database the connection should initially connect to.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string Database { get; set; }
Visual Basic (Declaration)
Public Property Database As String
Visual C++
public:
property String^ Database {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


DefaultCommandTimeout Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.DefaultCommandTimeout Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the default command timeout.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint DefaultCommandTimeout { get; set; }
Visual Basic (Declaration)
Public Property DefaultCommandTimeout As UInteger
Visual C++
public:
property unsigned int DefaultCommandTimeout {
    unsigned int get ();
    void set (unsigned int value);
}

See Also

MySqlConnectionStringBuilder Class


DriverType Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.DriverType Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the driver type that should be used for this connection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDriverType DriverType { get; set; }
Visual Basic (Declaration)
Public Property DriverType As MySqlDriverType
Visual C++
public:
property MySqlDriverType DriverType {
    MySqlDriverType get ();
    void set (MySqlDriverType value);
}

Remarks

There is only one valid value for this setting currently.

See Also

MySqlConnectionStringBuilder Class


FunctionsReturnString Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.FunctionsReturnString Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool FunctionsReturnString { get; set; }
Visual Basic (Declaration)
Public Property FunctionsReturnString As Boolean
Visual C++
public:
property bool FunctionsReturnString {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


IgnorePrepare Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.IgnorePrepare Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value indicating if calls to Prepare() should be ignored.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool IgnorePrepare { get; set; }
Visual Basic (Declaration)
Public Property IgnorePrepare As Boolean
Visual C++
public:
property bool IgnorePrepare {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


InteractiveSession Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.InteractiveSession Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool InteractiveSession { get; set; }
Visual Basic (Declaration)
Public Property InteractiveSession As Boolean
Visual C++
public:
property bool InteractiveSession {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


Item Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Item Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the value associated with the specified key. In C#, this property is the indexer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Object this[
    string keyword
] { get; set; }
Visual Basic (Declaration)
Public Overrides Default Property Item ( _
    keyword As String _
) As Object
Visual C++
public:
virtual property Object^ default[String^ keyword] {
    Object^ get (String^ keyword) override;
    void set (String^ keyword, Object^ value) override;
}

Parameters

keyword
Type: System..::.String
The key of the item to get or set.

Return Value

The value associated with the specified key.

See Also

MySqlConnectionStringBuilder Class


Logging Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Logging Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value that indicates whether logging is enabled.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool Logging { get; set; }
Visual Basic (Declaration)
Public Property Logging As Boolean
Visual C++
public:
property bool Logging {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


MaximumPoolSize Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.MaximumPoolSize Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the maximum connection pool setting.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint MaximumPoolSize { get; set; }
Visual Basic (Declaration)
Public Property MaximumPoolSize As UInteger
Visual C++
public:
property unsigned int MaximumPoolSize {
    unsigned int get ();
    void set (unsigned int value);
}

See Also

MySqlConnectionStringBuilder Class


MinimumPoolSize Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.MinimumPoolSize Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets the minimum connection pool size.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint MinimumPoolSize { get; set; }
Visual Basic (Declaration)
Public Property MinimumPoolSize As UInteger
Visual C++
public:
property unsigned int MinimumPoolSize {
    unsigned int get ();
    void set (unsigned int value);
}

See Also

MySqlConnectionStringBuilder Class


Password Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Password Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the password that should be used to connect with.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string Password { get; set; }
Visual Basic (Declaration)
Public Property Password As String
Visual C++
public:
property String^ Password {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


PersistSecurityInfo Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.PersistSecurityInfo Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value that indicates if the password should be persisted in the connection string.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool PersistSecurityInfo { get; set; }
Visual Basic (Declaration)
Public Property PersistSecurityInfo As Boolean
Visual C++
public:
property bool PersistSecurityInfo {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


PipeName Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.PipeName Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the name of the named pipe that should be used for communicating with MySQL.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string PipeName { get; set; }
Visual Basic (Declaration)
Public Property PipeName As String
Visual C++
public:
property String^ PipeName {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


Pooling Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Pooling Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value indicating if connection pooling is enabled.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool Pooling { get; set; }
Visual Basic (Declaration)
Public Property Pooling As Boolean
Visual C++
public:
property bool Pooling {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


Port Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Port Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the port number that is used when the socket protocol is being used.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint Port { get; set; }
Visual Basic (Declaration)
Public Property Port As UInteger
Visual C++
public:
property unsigned int Port {
    unsigned int get ();
    void set (unsigned int value);
}

See Also

MySqlConnectionStringBuilder Class


ProcedureCacheSize Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.ProcedureCacheSize Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the size of the stored procedure cache.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint ProcedureCacheSize { get; set; }
Visual Basic (Declaration)
Public Property ProcedureCacheSize As UInteger
Visual C++
public:
property unsigned int ProcedureCacheSize {
    unsigned int get ();
    void set (unsigned int value);
}

See Also

MySqlConnectionStringBuilder Class


RespectBinaryFlags Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.RespectBinaryFlags Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool RespectBinaryFlags { get; set; }
Visual Basic (Declaration)
Public Property RespectBinaryFlags As Boolean
Visual C++
public:
property bool RespectBinaryFlags {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


Server Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.Server Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the name of the server.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string Server { get; set; }
Visual Basic (Declaration)
Public Property Server As String
Visual C++
public:
property String^ Server {
    String^ get ();
    void set (String^ value);
}

Field Value

The server.

See Also

MySqlConnectionStringBuilder Class


SharedMemoryName Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.SharedMemoryName Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the base name of the shared memory objects used to communicate with MySQL when the shared memory protocol is being used.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string SharedMemoryName { get; set; }
Visual Basic (Declaration)
Public Property SharedMemoryName As String
Visual C++
public:
property String^ SharedMemoryName {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


TreatBlobsAsUTF8 Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.TreatBlobsAsUTF8 Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Indicates whether the driver should treat binary blobs as UTF8

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool TreatBlobsAsUTF8 { get; set; }
Visual Basic (Declaration)
Public Property TreatBlobsAsUTF8 As Boolean
Visual C++
public:
property bool TreatBlobsAsUTF8 {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


TreatTinyAsBoolean Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.TreatTinyAsBoolean Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool TreatTinyAsBoolean { get; set; }
Visual Basic (Declaration)
Public Property TreatTinyAsBoolean As Boolean
Visual C++
public:
property bool TreatTinyAsBoolean {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


UseAffectedRows Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.UseAffectedRows Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool UseAffectedRows { get; set; }
Visual Basic (Declaration)
Public Property UseAffectedRows As Boolean
Visual C++
public:
property bool UseAffectedRows {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


UseCompression Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.UseCompression Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value that indicates whether this connection should use compression.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool UseCompression { get; set; }
Visual Basic (Declaration)
Public Property UseCompression As Boolean
Visual C++
public:
property bool UseCompression {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


UseOldSyntax Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.UseOldSyntax Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value that indicates whether this connection uses the old style (@) parameter markers or the new (?) style.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
[ObsoleteAttribute("Use Old Syntax is no longer needed.  See documentation")]
public bool UseOldSyntax { get; set; }
Visual Basic (Declaration)
<ObsoleteAttribute("Use Old Syntax is no longer needed.  See documentation")> _
Public Property UseOldSyntax As Boolean
Visual C++
[ObsoleteAttribute(L"Use Old Syntax is no longer needed.  See documentation")]
public:
property bool UseOldSyntax {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


UsePerformanceMonitor Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.UsePerformanceMonitor Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value indicating if the permon hooks should be enabled.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool UsePerformanceMonitor { get; set; }
Visual Basic (Declaration)
Public Property UsePerformanceMonitor As Boolean
Visual C++
public:
property bool UsePerformanceMonitor {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


UseProcedureBodies Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.UseProcedureBodies Property
MySqlConnectionStringBuilder Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool UseProcedureBodies { get; set; }
Visual Basic (Declaration)
Public Property UseProcedureBodies As Boolean
Visual C++
public:
property bool UseProcedureBodies {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


UserID Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.UserID Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets the user id that should be used to connect with.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string UserID { get; set; }
Visual Basic (Declaration)
Public Property UserID As String
Visual C++
public:
property String^ UserID {
    String^ get ();
    void set (String^ value);
}

See Also

MySqlConnectionStringBuilder Class


UseUsageAdvisor Property

[image]

MySQL Connector/Net
MySqlConnectionStringBuilder..::.UseUsageAdvisor Property
MySqlConnectionStringBuilder Class See Also Send Feedback
Gets or sets a boolean value indicating if the Usage Advisor should be enabled.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool UseUsageAdvisor { get; set; }
Visual Basic (Declaration)
Public Property UseUsageAdvisor As Boolean
Visual C++
public:
property bool UseUsageAdvisor {
    bool get ();
    void set (bool value);
}

See Also

MySqlConnectionStringBuilder Class


MySqlDataAdapter Class

[image]

MySQL Connector/Net
MySqlDataAdapter Class
Members Example See Also Send Feedback
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.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlDataAdapter : DbDataAdapter,
    IDbDataAdapter, IDataAdapter, ICloneable
Visual Basic (Declaration)
Public NotInheritable Class MySqlDataAdapter _
    Inherits DbDataAdapter _
    Implements IDbDataAdapter, IDataAdapter, ICloneable
Visual C++
public ref class MySqlDataAdapter sealed : public DbDataAdapter,
    IDbDataAdapter, IDataAdapter, ICloneable

Remarks

The MySQLDataAdapter, serves as a bridge between a DataSet and MySQL for retrieving and saving data. The MySQLDataAdapter provides this bridge by mapping Fill(DataSet), which changes the data in the DataSet to match the data in the data source, and Update(DataSet), 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 MissingSchemaAction property is set to AddWithKey. You may also have the MySQLDataAdapter create the schema of the DataSet, including primary key information, before filling it with data using FillSchema(DataTable, SchemaType).

MySQLDataAdapter is used in conjunction with MySqlConnection and MySqlCommand to increase performance when connecting to a MySQL database.

The MySQLDataAdapter also includes the SelectCommand, InsertCommand, DeleteCommand, UpdateCommand, and TableMappings 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.

Note: Please be aware that the DataColumn 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.

Examples

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.
CopyVB.NET
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
CopyC#
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;
}

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.ComponentModel..::.Component
System.Data.Common..::.DataAdapter
System.Data.Common..::.DbDataAdapter
MySql.Data.MySqlClient..::.MySqlDataAdapter

See Also

MySqlDataAdapter Members


MySqlDataAdapter Members

[image] [image]

MySQL Connector/Net
MySqlDataAdapter Members
MySqlDataAdapter Class Constructors Methods Properties Events See Also Send Feedback

The MySqlDataAdapter type exposes the following members.

Constructors

Name | Description
MySqlDataAdapter | Overloaded.

Methods

Name | Description
AddToBatch | Adds a IDbCommand to the current batch. (Inherited from DbDataAdapter.)
ClearBatch | Removes all IDbCommand objects from the batch. (Inherited from DbDataAdapter.)
CloneInternals | Obsolete. Creates a copy of this instance of DataAdapter. (Inherited from DataAdapter.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
CreateRowUpdatedEvent | Initializes a new instance of the RowUpdatedEventArgs class. (Inherited from DbDataAdapter.)
CreateRowUpdatingEvent | Initializes a new instance of the RowUpdatingEventArgs class. (Inherited from DbDataAdapter.)
CreateTableMappings | Creates a new DataTableMappingCollection. (Inherited from DataAdapter.)
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
ExecuteBatch | Executes the current batch. (Inherited from DbDataAdapter.)
Fill | Overloaded.
FillSchema | Overloaded.
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetBatchedParameter | Returns a IDataParameter from one of the commands in the current batch. (Inherited from DbDataAdapter.)
GetBatchedRecordsAffected | Returns information about an individual update attempt within a larger batched update. (Inherited from DbDataAdapter.)
GetFillParameters | Gets the parameters set by the user when executing an SQL SELECT statement. (Inherited from DbDataAdapter.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
HasTableMappings | Indicates whether a DataTableMappingCollection has been created. (Inherited from DataAdapter.)
InitializeBatching | Initializes batching for the DbDataAdapter. (Inherited from DbDataAdapter.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
OnFillError | Invoked when an error occurs during a Fill. (Inherited from DataAdapter.)
OnRowUpdated | Raises the RowUpdated event of a .NET Framework data provider. (Inherited from DbDataAdapter.)
OnRowUpdating | Raises the RowUpdating event of a .NET Framework data provider. (Inherited from DbDataAdapter.)
ResetFillLoadOption | Resets FillLoadOption to its default state and causes Fill(DataSet) to honor AcceptChangesDuringFill. (Inherited from DataAdapter.)
ShouldSerializeAcceptChangesDuringFill | Determines whether the AcceptChangesDuringFill property should be persisted. (Inherited from DataAdapter.)
ShouldSerializeFillLoadOption | Determines whether the FillLoadOption property should be persisted. (Inherited from DataAdapter.)
ShouldSerializeTableMappings | Determines whether one or more DataTableMapping objects exist and they should be persisted. (Inherited from DataAdapter.)
TerminateBatching | Ends batching for the DbDataAdapter. (Inherited from DbDataAdapter.)
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Update | Overloaded.

Properties

Name | Description
AcceptChangesDuringFill | Gets or sets a value indicating whether AcceptChanges()()() is called on a DataRow after it is added to the DataTable during any of the Fill operations. (Inherited from DataAdapter.)
AcceptChangesDuringUpdate | Gets or sets whether AcceptChanges()()() is called during a Update(DataSet). (Inherited from DataAdapter.)
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
ContinueUpdateOnError | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update. (Inherited from DataAdapter.)
DeleteCommand | Gets or sets a SQL statement or stored procedure used to delete records from the data set.
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
FillCommandBehavior | Gets or sets the behavior of the command used to fill the data adapter. (Inherited from DbDataAdapter.)
FillLoadOption | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader. (Inherited from DataAdapter.)
InsertCommand | Gets or sets a SQL statement or stored procedure used to insert records into the data set.
MissingMappingAction | Determines the action to take when incoming data does not have a matching table or column. (Inherited from DataAdapter.)
MissingSchemaAction | Determines the action to take when existing DataSet schema does not match incoming data. (Inherited from DataAdapter.)
ReturnProviderSpecificTypes | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values. (Inherited from DataAdapter.)
SelectCommand | Gets or sets a SQL statement or stored procedure used to select records in the data source.
Site | Gets or sets the ISite of the Component. (Inherited from Component.)
TableMappings | Gets a collection that provides the master mapping between a source table and a DataTable. (Inherited from DataAdapter.)
UpdateBatchSize | (Overrides DbDataAdapter..::.UpdateBatchSize.)
UpdateCommand | Gets or sets a SQL statement or stored procedure used to updated records in the data source.

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)
FillError | Returned when an error occurs during a fill operation. (Inherited from DataAdapter.)
RowUpdated | Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
RowUpdating | Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.

See Also

MySqlDataAdapter Class


MySqlDataAdapter Constructor

[image] [image]

MySQL Connector/Net
MySqlDataAdapter Constructor
MySqlDataAdapter Class See Also Send Feedback

Overload List

Name | Description
MySqlDataAdapter()()() | Initializes a new instance of the MySqlDataAdapter class.
MySqlDataAdapter(MySqlCommand) | Initializes a new instance of the MySqlDataAdapter class with the specified MySqlCommand as the SelectCommand property.
MySqlDataAdapter(String, MySqlConnection) | Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a MySqlConnection object.
MySqlDataAdapter(String, String) | Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a connection string.

See Also

MySqlDataAdapter Class
MySqlDataAdapter Members


MySqlDataAdapter Constructor

[image]

MySQL Connector/Net
MySqlDataAdapter Constructor
MySqlDataAdapter Class Example See Also Send Feedback
Initializes a new instance of the MySqlDataAdapter class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataAdapter()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlDataAdapter()

Remarks

When an instance of MySqlDataAdapter is created, the following read/write properties are set to the following initial values.

Properties | Initial Value
MissingMappingAction | MissingMappingAction.Passthrough
MissingSchemaAction | MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Examples

The following example creates a MySqlDataAdapter and sets some of its properties.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class
MySqlDataAdapter Overload


MySqlDataAdapter Constructor (MySqlCommand)

[image]

MySQL Connector/Net
MySqlDataAdapter Constructor (MySqlCommand)
MySqlDataAdapter Class Example See Also Send Feedback
Initializes a new instance of the MySqlDataAdapter class with the specified MySqlCommand as the SelectCommand property.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataAdapter(
    MySqlCommand selectCommand
)
Visual Basic (Declaration)
Public Sub New ( _
    selectCommand As MySqlCommand _
)
Visual C++
public:
MySqlDataAdapter(
    MySqlCommand^ selectCommand
)

Parameters

selectCommand
Type: MySql.Data.MySqlClient..::.MySqlCommand
MySqlCommand that is a SQL SELECT statement or stored procedure and is set as the SelectCommand property of the MySqlDataAdapter.

Remarks

When an instance of MySqlDataAdapter is created, the following read/write properties are set to the following initial values.

Properties | Initial Value
MissingMappingAction | MissingMappingAction.Passthrough
MissingSchemaAction | 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 MySqlCommand, the MySqlCommand is not cloned. The SelectCommand maintains a reference to the previously created MySqlCommand object.

Examples

The following example creates a MySqlDataAdapter and sets some of its properties.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class
MySqlDataAdapter Overload


MySqlDataAdapter Constructor (String, MySqlConnection)

[image]

MySQL Connector/Net
MySqlDataAdapter Constructor (String, MySqlConnection)
MySqlDataAdapter Class Example See Also Send Feedback
Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a MySqlConnection object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataAdapter(
    string selectCommandText,
    MySqlConnection connection
)
Visual Basic (Declaration)
Public Sub New ( _
    selectCommandText As String, _
    connection As MySqlConnection _
)
Visual C++
public:
MySqlDataAdapter(
    String^ selectCommandText,
    MySqlConnection^ connection
)

Parameters

selectCommandText
Type: System..::.String
A String that is a SQL SELECT statement or stored procedure to be used by the SelectCommand property of the MySqlDataAdapter.
connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
A MySqlConnection that represents the connection.

Remarks

This implementation of the MySqlDataAdapter opens and closes a MySqlConnection if it is not already open. This can be useful in a an application that must call the Fill(DataSet) method for two or more MySqlDataAdapter objects. If the MySqlConnection is already open, you must explicitly call Close()()() or Dispose(Boolean) to close it.

When an instance of MySqlDataAdapter is created, the following read/write properties are set to the following initial values.

Properties | Initial Value
MissingMappingAction | MissingMappingAction.Passthrough
MissingSchemaAction | MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Examples

The following example creates a MySqlDataAdapter and sets some of its properties.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class
MySqlDataAdapter Overload


MySqlDataAdapter Constructor (String, String)

[image]

MySQL Connector/Net
MySqlDataAdapter Constructor (String, String)
MySqlDataAdapter Class Example See Also Send Feedback
Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a connection string.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDataAdapter(
    string selectCommandText,
    string selectConnString
)
Visual Basic (Declaration)
Public Sub New ( _
    selectCommandText As String, _
    selectConnString As String _
)
Visual C++
public:
MySqlDataAdapter(
    String^ selectCommandText,
    String^ selectConnString
)

Parameters

selectCommandText
Type: System..::.String
A String that is a SQL SELECT statement or stored procedure to be used by the SelectCommand property of the MySqlDataAdapter.
selectConnString
Type: System..::.String
The connection string

Remarks

When an instance of MySqlDataAdapter is created, the following read/write properties are set to the following initial values.

Properties | Initial Value
MissingMappingAction | MissingMappingAction.Passthrough
MissingSchemaAction | MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Examples

The following example creates a MySqlDataAdapter and sets some of its properties.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class
MySqlDataAdapter Overload


MySqlDataAdapter Methods

[image] [image]

MySQL Connector/Net
MySqlDataAdapter Methods
MySqlDataAdapter Class See Also Send Feedback

The MySqlDataAdapter type exposes the following members.

Methods

Name | Description
AddToBatch | Adds a IDbCommand to the current batch. (Inherited from DbDataAdapter.)
ClearBatch | Removes all IDbCommand objects from the batch. (Inherited from DbDataAdapter.)
CloneInternals | Obsolete. Creates a copy of this instance of DataAdapter. (Inherited from DataAdapter.)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
CreateRowUpdatedEvent | Initializes a new instance of the RowUpdatedEventArgs class. (Inherited from DbDataAdapter.)
CreateRowUpdatingEvent | Initializes a new instance of the RowUpdatingEventArgs class. (Inherited from DbDataAdapter.)
CreateTableMappings | Creates a new DataTableMappingCollection. (Inherited from DataAdapter.)
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
ExecuteBatch | Executes the current batch. (Inherited from DbDataAdapter.)
Fill | Overloaded.
FillSchema | Overloaded.
Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
GetBatchedParameter | Returns a IDataParameter from one of the commands in the current batch. (Inherited from DbDataAdapter.)
GetBatchedRecordsAffected | Returns information about an individual update attempt within a larger batched update. (Inherited from DbDataAdapter.)
GetFillParameters | Gets the parameters set by the user when executing an SQL SELECT statement. (Inherited from DbDataAdapter.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
HasTableMappings | Indicates whether a DataTableMappingCollection has been created. (Inherited from DataAdapter.)
InitializeBatching | Initializes batching for the DbDataAdapter. (Inherited from DbDataAdapter.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
OnFillError | Invoked when an error occurs during a Fill. (Inherited from DataAdapter.)
OnRowUpdated | Raises the RowUpdated event of a .NET Framework data provider. (Inherited from DbDataAdapter.)
OnRowUpdating | Raises the RowUpdating event of a .NET Framework data provider. (Inherited from DbDataAdapter.)
ResetFillLoadOption | Resets FillLoadOption to its default state and causes Fill(DataSet) to honor AcceptChangesDuringFill. (Inherited from DataAdapter.)
ShouldSerializeAcceptChangesDuringFill | Determines whether the AcceptChangesDuringFill property should be persisted. (Inherited from DataAdapter.)
ShouldSerializeFillLoadOption | Determines whether the FillLoadOption property should be persisted. (Inherited from DataAdapter.)
ShouldSerializeTableMappings | Determines whether one or more DataTableMapping objects exist and they should be persisted. (Inherited from DataAdapter.)
TerminateBatching | Ends batching for the DbDataAdapter. (Inherited from DbDataAdapter.)
ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Update | Overloaded.

See Also

MySqlDataAdapter Class


Dispose Method

[image] [image]

MySQL Connector/Net
MySqlDataAdapter..::.Dispose Method
MySqlDataAdapter Class See Also Send Feedback

Overload List

Name | Description
Dispose()()() | Releases all resources used by the Component. (Inherited from Component.)
Dispose(Boolean) | Releases the unmanaged resources used by the DbDataAdapter and optionally releases the managed resources. (Inherited from DbDataAdapter.)

See Also

MySqlDataAdapter Class
MySqlDataAdapter Members


Fill Method

[image] [image]

MySQL Connector/Net
MySqlDataAdapter..::.Fill Method
MySqlDataAdapter Class See Also Send Feedback

Overload List

Name | Description
Fill(DataSet) | Adds or refreshes rows in the DataSet. (Inherited from DbDataAdapter.)
Fill(DataTable) | Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataTable name. (Inherited from DbDataAdapter.)
Fill(DataSet, String) | Adds or refreshes rows in the DataSet to match those in the data source using the DataSet and DataTable names. (Inherited from DbDataAdapter.)
Fill(DataTable, IDataReader) | Adds or refreshes rows in the DataTable to match those in the data source using the DataTable name and the specified IDataReader. (Inherited from DataAdapter.)
Fill(Int32, Int32, array<DataTable>[]()[]) | Adds or refreshes rows in a DataTable to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records. (Inherited from DbDataAdapter.)
Fill(DataTable, IDbCommand, CommandBehavior) | Adds or refreshes rows in a DataTable to match those in the data source using the specified DataTable, IDbCommand and CommandBehavior. (Inherited from DbDataAdapter.)
Fill(DataSet, Int32, Int32, String) | Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. (Inherited from DbDataAdapter.)
Fill(array<DataTable>[]()[], IDataReader, Int32, Int32) | Adds or refreshes rows in a specified range in the collection of DataTable objects to match those in the data source. (Inherited from DataAdapter.)
Fill(array<DataTable>[]()[], Int32, Int32, IDbCommand, CommandBehavior) | Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. (Inherited from DbDataAdapter.)
Fill(DataSet, String, IDataReader, Int32, Int32) | Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. (Inherited from DataAdapter.)
Fill(DataSet, Int32, Int32, String, IDbCommand, CommandBehavior) | Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and source table names, command string, and command behavior. (Inherited from DbDataAdapter.)

See Also

MySqlDataAdapter Class
MySqlDataAdapter Members


FillSchema Method

[image] [image]

MySQL Connector/Net
MySqlDataAdapter..::.FillSchema Method
MySqlDataAdapter Class See Also Send Feedback

Overload List

Name | Description
FillSchema(DataTable, SchemaType) | Configures the schema of the specified DataTable based on the specified SchemaType. (Inherited from DbDataAdapter.)
FillSchema(DataSet, SchemaType) | Adds a DataTable named "Table" to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType. (Inherited from DbDataAdapter.)
FillSchema(DataSet, SchemaType, String) | Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based upon the specified SchemaType and DataTable. (Inherited from DbDataAdapter.)
FillSchema(DataTable, SchemaType, IDataReader) | Adds a DataTable to the specified DataSet. (Inherited from DataAdapter.)
FillSchema(DataTable, SchemaType, IDbCommand, CommandBehavior) | Configures the schema of the specified DataTable based on the specified SchemaType, command string, and CommandBehavior values. (Inherited from DbDataAdapter.)
FillSchema(DataSet, SchemaType, String, IDataReader) | Adds a DataTable to the specified DataSet. (Inherited from DataAdapter.)
FillSchema(DataSet, SchemaType, IDbCommand, String, CommandBehavior) | Adds a DataTable to the specified DataSet and configures the schema to match that in the data source based on the specified SchemaType. (Inherited from DbDataAdapter.)

See Also

MySqlDataAdapter Class
MySqlDataAdapter Members


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlDataAdapter..::.MemberwiseClone Method
MySqlDataAdapter Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlDataAdapter Class
MySqlDataAdapter Members


Update Method

[image] [image]

MySQL Connector/Net
MySqlDataAdapter..::.Update Method
MySqlDataAdapter Class See Also Send Feedback

Overload List

Name | Description
Update(DataSet) | Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet. (Inherited from DbDataAdapter.)
Update(array<DataRow>[]()[]) | Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array of DataRow objects. (Inherited from DbDataAdapter.)
Update(DataTable) | Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataTable. (Inherited from DbDataAdapter.)
Update(DataSet, String) | Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet with the specified DataTable name. (Inherited from DbDataAdapter.)
Update(array<DataRow>[]()[], DataTableMapping) | Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified array of DataRow objects. (Inherited from DbDataAdapter.)

See Also

MySqlDataAdapter Class
MySqlDataAdapter Members


MySqlDataAdapter Properties

[image] [image]

MySQL Connector/Net
MySqlDataAdapter Properties
MySqlDataAdapter Class See Also Send Feedback

The MySqlDataAdapter type exposes the following members.

Properties

Name | Description
AcceptChangesDuringFill | Gets or sets a value indicating whether AcceptChanges()()() is called on a DataRow after it is added to the DataTable during any of the Fill operations. (Inherited from DataAdapter.)
AcceptChangesDuringUpdate | Gets or sets whether AcceptChanges()()() is called during a Update(DataSet). (Inherited from DataAdapter.)
CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Container | Gets the IContainer that contains the Component. (Inherited from Component.)
ContinueUpdateOnError | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update. (Inherited from DataAdapter.)
DeleteCommand | Gets or sets a SQL statement or stored procedure used to delete records from the data set.
DesignMode | Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
FillCommandBehavior | Gets or sets the behavior of the command used to fill the data adapter. (Inherited from DbDataAdapter.)
FillLoadOption | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader. (Inherited from DataAdapter.)
InsertCommand | Gets or sets a SQL statement or stored procedure used to insert records into the data set.
MissingMappingAction | Determines the action to take when incoming data does not have a matching table or column. (Inherited from DataAdapter.)
MissingSchemaAction | Determines the action to take when existing DataSet schema does not match incoming data. (Inherited from DataAdapter.)
ReturnProviderSpecificTypes | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values. (Inherited from DataAdapter.)
SelectCommand | Gets or sets a SQL statement or stored procedure used to select records in the data source.
Site | Gets or sets the ISite of the Component. (Inherited from Component.)
TableMappings | Gets a collection that provides the master mapping between a source table and a DataTable. (Inherited from DataAdapter.)
UpdateBatchSize | (Overrides DbDataAdapter..::.UpdateBatchSize.)
UpdateCommand | Gets or sets a SQL statement or stored procedure used to updated records in the data source.

See Also

MySqlDataAdapter Class


DeleteCommand Property

[image]

MySQL Connector/Net
MySqlDataAdapter..::.DeleteCommand Property
MySqlDataAdapter Class Example See Also Send Feedback
Gets or sets a SQL statement or stored procedure used to delete records from the data set.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand DeleteCommand { get; set; }
Visual Basic (Declaration)
Public Property DeleteCommand As MySqlCommand
Visual C++
public:
property MySqlCommand^ DeleteCommand {
    MySqlCommand^ get ();
    void set (MySqlCommand^ value);
}

Field Value

A MySqlCommand used during Update(DataSet) to delete records in the database that correspond to deleted rows in the DataSet.

Remarks

During Update(DataSet), if this property is not set and primary key information is present in the DataSet, the DeleteCommand can be generated automatically if you set the SelectCommand property and use the MySqlCommandBuilder. 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 MySqlCommand, the MySqlCommand is not cloned. The DeleteCommand maintains a reference to the previously created MySqlCommand object.

Examples

The following example creates a MySqlDataAdapter and sets the SelectCommand and DeleteCommand properties. It assumes you have already created a MySqlConnection object.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class


InsertCommand Property

[image]

MySQL Connector/Net
MySqlDataAdapter..::.InsertCommand Property
MySqlDataAdapter Class Example See Also Send Feedback
Gets or sets a SQL statement or stored procedure used to insert records into the data set.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand InsertCommand { get; set; }
Visual Basic (Declaration)
Public Property InsertCommand As MySqlCommand
Visual C++
public:
property MySqlCommand^ InsertCommand {
    MySqlCommand^ get ();
    void set (MySqlCommand^ value);
}

Field Value

A MySqlCommand used during Update(DataSet) to insert records into the database that correspond to new rows in the DataSet.

Remarks

During Update(DataSet), if this property is not set and primary key information is present in the DataSet, the InsertCommand can be generated automatically if you set the SelectCommand property and use the MySqlCommandBuilder. 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 MySqlCommand, the MySqlCommand is not cloned. The InsertCommand maintains a reference to the previously created MySqlCommand object.

Note: If execution of this command returns rows, these rows may be added to the DataSet depending on how you set the UpdatedRowSource property of the MySqlCommand object.

Examples

The following example creates a MySqlDataAdapter and sets the SelectCommand and InsertCommand properties. It assumes you have already created a MySqlConnection object.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class


SelectCommand Property

[image]

MySQL Connector/Net
MySqlDataAdapter..::.SelectCommand Property
MySqlDataAdapter Class Example See Also Send Feedback
Gets or sets a SQL statement or stored procedure used to select records in the data source.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand SelectCommand { get; set; }
Visual Basic (Declaration)
Public Property SelectCommand As MySqlCommand
Visual C++
public:
property MySqlCommand^ SelectCommand {
    MySqlCommand^ get ();
    void set (MySqlCommand^ value);
}

Field Value

A MySqlCommand used during Fill(DataSet) to select records from the database for placement in the DataSet.

Remarks

When SelectCommand is assigned to a previously created MySqlCommand, 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 DataSet, and no exception is raised.

Examples

The following example creates a MySqlDataAdapter and sets the SelectCommand and InsertCommand properties. It assumes you have already created a MySqlConnection object.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class


UpdateBatchSize Property

[image]

MySQL Connector/Net
MySqlDataAdapter..::.UpdateBatchSize Property
MySqlDataAdapter Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int UpdateBatchSize { get; set; }
Visual Basic (Declaration)
Public Overrides Property UpdateBatchSize As Integer
Visual C++
public:
virtual property int UpdateBatchSize {
    int get () override;
    void set (int value) override;
}

See Also

MySqlDataAdapter Class


UpdateCommand Property

[image]

MySQL Connector/Net
MySqlDataAdapter..::.UpdateCommand Property
MySqlDataAdapter Class Example See Also Send Feedback
Gets or sets a SQL statement or stored procedure used to updated records in the data source.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand UpdateCommand { get; set; }
Visual Basic (Declaration)
Public Property UpdateCommand As MySqlCommand
Visual C++
public:
property MySqlCommand^ UpdateCommand {
    MySqlCommand^ get ();
    void set (MySqlCommand^ value);
}

Field Value

A MySqlCommand used during Update(DataSet) to update records in the database with data from the DataSet.

Remarks

During Update(DataSet), if this property is not set and primary key information is present in the DataSet, the UpdateCommand can be generated automatically if you set the SelectCommand property and use the MySqlCommandBuilder. 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 MySqlCommand, the MySqlCommand is not cloned. The UpdateCommand maintains a reference to the previously created MySqlCommand object.

Note: If execution of this command returns rows, these rows may be merged with the DataSet depending on how you set the UpdatedRowSource property of the MySqlCommand object.

Examples

The following example creates a MySqlDataAdapter and sets the SelectCommand and UpdateCommand properties. It assumes you have already created a MySqlConnection object.
CopyVB.NET
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
CopyC#
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;
}

See Also

MySqlDataAdapter Class


MySqlDataAdapter Events

[image] [image]

MySQL Connector/Net
MySqlDataAdapter Events
MySqlDataAdapter Class See Also Send Feedback

The MySqlDataAdapter type exposes the following members.

Events

Name | Description
Disposed | Occurs when the component is disposed by a call to the Dispose()()() method. (Inherited from Component.)
FillError | Returned when an error occurs during a fill operation. (Inherited from DataAdapter.)
RowUpdated | Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
RowUpdating | Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.

See Also

MySqlDataAdapter Class


RowUpdated Event

[image]

MySQL Connector/Net
MySqlDataAdapter..::.RowUpdated Event
MySqlDataAdapter Class See Also Send Feedback
Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public event MySqlRowUpdatedEventHandler RowUpdated
Visual Basic (Declaration)
Public Event RowUpdated As MySqlRowUpdatedEventHandler
Visual C++
public:
 event MySqlRowUpdatedEventHandler^ RowUpdated {
    void add (MySqlRowUpdatedEventHandler^ value);
    void remove (MySqlRowUpdatedEventHandler^ value);
}

See Also

MySqlDataAdapter Class


RowUpdating Event

[image]

MySQL Connector/Net
MySqlDataAdapter..::.RowUpdating Event
MySqlDataAdapter Class See Also Send Feedback
Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public event MySqlRowUpdatingEventHandler RowUpdating
Visual Basic (Declaration)
Public Event RowUpdating As MySqlRowUpdatingEventHandler
Visual C++
public:
 event MySqlRowUpdatingEventHandler^ RowUpdating {
    void add (MySqlRowUpdatingEventHandler^ value);
    void remove (MySqlRowUpdatingEventHandler^ value);
}

See Also

MySqlDataAdapter Class


MySqlDataReader Class

[image]

MySQL Connector/Net
MySqlDataReader Class
Members Example See Also Send Feedback
Provides a means of reading a forward-only stream of rows from a MySQL database. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlDataReader : DbDataReader,
    IDataReader, IDisposable, IDataRecord
Visual Basic (Declaration)
Public NotInheritable Class MySqlDataReader _
    Inherits DbDataReader _
    Implements IDataReader, IDisposable, IDataRecord
Visual C++
public ref class MySqlDataReader sealed : public DbDataReader,
    IDataReader, IDisposable, IDataRecord

Remarks

To create a MySQLDataReader, you must call the ExecuteReader()()() method of the MySqlCommand object, rather than directly using a constructor.

While the MySqlDataReader is in use, the associated MySqlConnection 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 Close()()() method of the MySqlDataReader is called.

IsClosed and RecordsAffected 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 GetValue(Int32) 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.

Examples

The following example creates a MySqlConnection, a MySqlCommand, and a MySqlDataReader. The example reads through the data, writing it out to the console. Finally, the example closes the MySqlDataReader, then the MySqlConnection.
CopyVB.NET
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
CopyC#
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();
}

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.Data.Common..::.DbDataReader
MySql.Data.MySqlClient..::.MySqlDataReader

See Also

MySqlDataReader Members


MySqlDataReader Members

[image] [image]

MySQL Connector/Net
MySqlDataReader Members
MySqlDataReader Class Methods Properties See Also Send Feedback

The MySqlDataReader type exposes the following members.

Methods

Name | Description
Close | Closes the MySqlDataReader object. (Overrides DbDataReader..::.Close()()().)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetBoolean | Overloaded.
GetByte | Overloaded.
GetBytes | Reads a stream of bytes from the specified column offset into the buffer an array starting at the given buffer offset. (Overrides DbDataReader..::.GetBytes(Int32, Int64, array<Byte>[]()[], Int32, Int32).)
GetChar | Overloaded.
GetChars | Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset. (Overrides DbDataReader..::.GetChars(Int32, Int64, array<Char>[]()[], Int32, Int32).)
GetData | Returns a DbDataReader object for the requested column ordinal. (Inherited from DbDataReader.)
GetDataTypeName | Gets the name of the source data type. (Overrides DbDataReader..::.GetDataTypeName(Int32).)
GetDateTime | Overloaded.
GetDbDataReader | Returns a DbDataReader object for the requested column ordinal that can be overridden with a provider-specific implementation. (Inherited from DbDataReader.)
GetDecimal | Overloaded.
GetDouble | Overloaded.
GetEnumerator | Returns an IEnumerator that iterates through the MySqlDataReader. (Overrides DbDataReader..::.GetEnumerator()()().)
GetFieldType | Gets the Type that is the data type of the object. (Overrides DbDataReader..::.GetFieldType(Int32).)
GetFloat | Overloaded.
GetGuid | Overloaded.
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetInt16 | Overloaded.
GetInt32 | Overloaded.
GetInt64 | Overloaded.
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetMySqlDateTime | Overloaded.
GetName | Gets the name of the specified column. (Overrides DbDataReader..::.GetName(Int32).)
GetOrdinal | Gets the column ordinal, given the name of the column. (Overrides DbDataReader..::.GetOrdinal(String).)
GetProviderSpecificFieldType | Returns the provider-specific field type of the specified column. (Inherited from DbDataReader.)
GetProviderSpecificValue | Gets the value of the specified column as an instance of Object. (Inherited from DbDataReader.)
GetProviderSpecificValues | Gets all provider-specific attribute columns in the collection for the current row. (Inherited from DbDataReader.)
GetSByte | Overloaded.
GetSchemaTable | Returns a DataTable that describes the column metadata of the MySqlDataReader. (Overrides DbDataReader..::.GetSchemaTable()()().)
GetString | Overloaded.
GetTimeSpan | Overloaded.
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUInt16 | Overloaded.
GetUInt32 | Overloaded.
GetUInt64 | Overloaded.
GetValue | Gets the value of the specified column in its native format. (Overrides DbDataReader..::.GetValue(Int32).)
GetValues | Gets all attribute columns in the collection for the current row. (Overrides DbDataReader..::.GetValues(array<Object>[]()[]).)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
IsDBNull | Gets a value indicating whether the column contains non-existent or missing values. (Overrides DbDataReader..::.IsDBNull(Int32).)
MemberwiseClone | Overloaded.
NextResult | Advances the data reader to the next result, when reading the results of batch SQL statements. (Overrides DbDataReader..::.NextResult()()().)
Read | Advances the MySqlDataReader to the next record. (Overrides DbDataReader..::.Read()()().)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Depth | Gets a value indicating the depth of nesting for the current row. This method is not supported currently and always returns 0. (Overrides DbDataReader..::.Depth.)
FieldCount | Gets the number of columns in the current row. (Overrides DbDataReader..::.FieldCount.)
HasRows | Gets a value indicating whether the MySqlDataReader contains one or more rows. (Overrides DbDataReader..::.HasRows.)
IsClosed | Gets a value indicating whether the data reader is closed. (Overrides DbDataReader..::.IsClosed.)
Item | Overloaded.
RecordsAffected | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. (Overrides DbDataReader..::.RecordsAffected.)
VisibleFieldCount | Gets the number of fields in the DbDataReader that are not hidden. (Inherited from DbDataReader.)

See Also

MySqlDataReader Class


MySqlDataReader Methods

[image] [image]

MySQL Connector/Net
MySqlDataReader Methods
MySqlDataReader Class See Also Send Feedback

The MySqlDataReader type exposes the following members.

Methods

Name | Description
Close | Closes the MySqlDataReader object. (Overrides DbDataReader..::.Close()()().)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetBoolean | Overloaded.
GetByte | Overloaded.
GetBytes | Reads a stream of bytes from the specified column offset into the buffer an array starting at the given buffer offset. (Overrides DbDataReader..::.GetBytes(Int32, Int64, array<Byte>[]()[], Int32, Int32).)
GetChar | Overloaded.
GetChars | Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset. (Overrides DbDataReader..::.GetChars(Int32, Int64, array<Char>[]()[], Int32, Int32).)
GetData | Returns a DbDataReader object for the requested column ordinal. (Inherited from DbDataReader.)
GetDataTypeName | Gets the name of the source data type. (Overrides DbDataReader..::.GetDataTypeName(Int32).)
GetDateTime | Overloaded.
GetDbDataReader | Returns a DbDataReader object for the requested column ordinal that can be overridden with a provider-specific implementation. (Inherited from DbDataReader.)
GetDecimal | Overloaded.
GetDouble | Overloaded.
GetEnumerator | Returns an IEnumerator that iterates through the MySqlDataReader. (Overrides DbDataReader..::.GetEnumerator()()().)
GetFieldType | Gets the Type that is the data type of the object. (Overrides DbDataReader..::.GetFieldType(Int32).)
GetFloat | Overloaded.
GetGuid | Overloaded.
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetInt16 | Overloaded.
GetInt32 | Overloaded.
GetInt64 | Overloaded.
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetMySqlDateTime | Overloaded.
GetName | Gets the name of the specified column. (Overrides DbDataReader..::.GetName(Int32).)
GetOrdinal | Gets the column ordinal, given the name of the column. (Overrides DbDataReader..::.GetOrdinal(String).)
GetProviderSpecificFieldType | Returns the provider-specific field type of the specified column. (Inherited from DbDataReader.)
GetProviderSpecificValue | Gets the value of the specified column as an instance of Object. (Inherited from DbDataReader.)
GetProviderSpecificValues | Gets all provider-specific attribute columns in the collection for the current row. (Inherited from DbDataReader.)
GetSByte | Overloaded.
GetSchemaTable | Returns a DataTable that describes the column metadata of the MySqlDataReader. (Overrides DbDataReader..::.GetSchemaTable()()().)
GetString | Overloaded.
GetTimeSpan | Overloaded.
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUInt16 | Overloaded.
GetUInt32 | Overloaded.
GetUInt64 | Overloaded.
GetValue | Gets the value of the specified column in its native format. (Overrides DbDataReader..::.GetValue(Int32).)
GetValues | Gets all attribute columns in the collection for the current row. (Overrides DbDataReader..::.GetValues(array<Object>[]()[]).)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
IsDBNull | Gets a value indicating whether the column contains non-existent or missing values. (Overrides DbDataReader..::.IsDBNull(Int32).)
MemberwiseClone | Overloaded.
NextResult | Advances the data reader to the next result, when reading the results of batch SQL statements. (Overrides DbDataReader..::.NextResult()()().)
Read | Advances the MySqlDataReader to the next record. (Overrides DbDataReader..::.Read()()().)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlDataReader Class


Close Method

[image]

MySQL Connector/Net
MySqlDataReader..::.Close Method
MySqlDataReader Class See Also Send Feedback
Closes the MySqlDataReader object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Close()
Visual Basic (Declaration)
Public Overrides Sub Close
Visual C++
public:
virtual void Close() override

Implements

IDataReader..::.Close()()()
IDataReader..::.Close()()()

See Also

MySqlDataReader Class


Dispose Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.Dispose Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
Dispose()()() | Releases all resources used by the current instance of the DbDataReader class. (Inherited from DbDataReader.)
Dispose(Boolean) | Releases the managed resources used by the DbDataReader and optionally releases the unmanaged resources. (Inherited from DbDataReader.)

See Also

MySqlDataReader Class
MySqlDataReader Members


GetBoolean Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetBoolean Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetBoolean(Int32) | Gets the value of the specified column as a Boolean. (Overrides DbDataReader..::.GetBoolean(Int32).)
GetBoolean(String) | Gets the value of the specified column as a Boolean.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetBoolean Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetBoolean Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a Boolean.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool GetBoolean(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetBoolean ( _
    i As Integer _
) As Boolean
Visual C++
public:
virtual bool GetBoolean(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetBoolean(Int32)
IDataRecord..::.GetBoolean(Int32)

See Also

MySqlDataReader Class
GetBoolean Overload


GetBoolean Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetBoolean Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a Boolean.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool GetBoolean(
    string name
)
Visual Basic (Declaration)
Public Function GetBoolean ( _
    name As String _
) As Boolean
Visual C++
public:
bool GetBoolean(
    String^ name
)

Parameters

name
Type: System..::.String

Return Value

See Also

MySqlDataReader Class
GetBoolean Overload


GetByte Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetByte Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetByte(Int32) | Gets the value of the specified column as a byte. (Overrides DbDataReader..::.GetByte(Int32).)
GetByte(String) | Gets the value of the specified column as a byte.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetByte Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetByte Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a byte.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override byte GetByte(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetByte ( _
    i As Integer _
) As Byte
Visual C++
public:
virtual unsigned char GetByte(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetByte(Int32)
IDataRecord..::.GetByte(Int32)

See Also

MySqlDataReader Class
GetByte Overload


GetByte Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetByte Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a byte.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public byte GetByte(
    string name
)
Visual Basic (Declaration)
Public Function GetByte ( _
    name As String _
) As Byte
Visual C++
public:
unsigned char GetByte(
    String^ name
)

Parameters

name
Type: System..::.String

Return Value

See Also

MySqlDataReader Class
GetByte Overload


GetBytes Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetBytes Method
MySqlDataReader Class See Also Send Feedback
Reads a stream of bytes from the specified column offset into the buffer an array starting at the given buffer offset.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override long GetBytes(
    int i,
    long fieldOffset,
    byte[] buffer,
    int bufferoffset,
    int length
)
Visual Basic (Declaration)
Public Overrides Function GetBytes ( _
    i As Integer, _
    fieldOffset As Long, _
    buffer As Byte(), _
    bufferoffset As Integer, _
    length As Integer _
) As Long
Visual C++
public:
virtual long long GetBytes(
    int i,
    long long fieldOffset,
    array<unsigned char>^ buffer,
    int bufferoffset,
    int length
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.
fieldOffset
Type: System..::.Int64
The index within the field from which to begin the read operation.
buffer
Type: array< System..::.Byte >[]()[]
The buffer into which to read the stream of bytes.
bufferoffset
Type: System..::.Int32
The index for buffer to begin the read operation.
length
Type: System..::.Int32
The maximum length to copy into the buffer.

Return Value

The actual number of bytes read.

Implements

IDataRecord..::.GetBytes(Int32, Int64, array<Byte>[]()[], Int32, Int32)
IDataRecord..::.GetBytes(Int32, Int64, array<Byte>[]()[], Int32, Int32)

See Also

MySqlDataReader Class


GetChar Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetChar Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetChar(Int32) | Gets the value of the specified column as a single character. (Overrides DbDataReader..::.GetChar(Int32).)
GetChar(String) | Gets the value of the specified column as a single character.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetChar Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetChar Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a single character.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override char GetChar(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetChar ( _
    i As Integer _
) As Char
Visual C++
public:
virtual wchar_t GetChar(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetChar(Int32)
IDataRecord..::.GetChar(Int32)

See Also

MySqlDataReader Class
GetChar Overload


GetChar Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetChar Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a single character.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public char GetChar(
    string name
)
Visual Basic (Declaration)
Public Function GetChar ( _
    name As String _
) As Char
Visual C++
public:
wchar_t GetChar(
    String^ name
)

Parameters

name
Type: System..::.String

Return Value

See Also

MySqlDataReader Class
GetChar Overload


GetChars Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetChars Method
MySqlDataReader Class See Also Send Feedback
Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override long GetChars(
    int i,
    long fieldoffset,
    char[] buffer,
    int bufferoffset,
    int length
)
Visual Basic (Declaration)
Public Overrides Function GetChars ( _
    i As Integer, _
    fieldoffset As Long, _
    buffer As Char(), _
    bufferoffset As Integer, _
    length As Integer _
) As Long
Visual C++
public:
virtual long long GetChars(
    int i,
    long long fieldoffset,
    array<wchar_t>^ buffer,
    int bufferoffset,
    int length
) override

Parameters

i
Type: System..::.Int32
fieldoffset
Type: System..::.Int64
buffer
Type: array< System..::.Char >[]()[]
bufferoffset
Type: System..::.Int32
length
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetChars(Int32, Int64, array<Char>[]()[], Int32, Int32)
IDataRecord..::.GetChars(Int32, Int64, array<Char>[]()[], Int32, Int32)

See Also

MySqlDataReader Class


GetDataTypeName Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetDataTypeName Method
MySqlDataReader Class See Also Send Feedback
Gets the name of the source data type.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string GetDataTypeName(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetDataTypeName ( _
    i As Integer _
) As String
Visual C++
public:
virtual String^ GetDataTypeName(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetDataTypeName(Int32)
IDataRecord..::.GetDataTypeName(Int32)

See Also

MySqlDataReader Class


GetDateTime Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetDateTime Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetDateTime(Int32) | Gets the value of the specified column as a DateTime object. (Overrides DbDataReader..::.GetDateTime(Int32).)
GetDateTime(String) | Gets the value of the specified column as a DateTime object.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetDateTime Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetDateTime Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a DateTime object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DateTime GetDateTime(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetDateTime ( _
    i As Integer _
) As DateTime
Visual C++
public:
virtual DateTime GetDateTime(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetDateTime(Int32)
IDataRecord..::.GetDateTime(Int32)

Remarks

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.

Note:

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 GetMySqlDateTime(Int32).

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 ConnectionString.

See Also

MySqlDataReader Class
GetDateTime Overload


GetDateTime Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetDateTime Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a DateTime object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public DateTime GetDateTime(
    string column
)
Visual Basic (Declaration)
Public Function GetDateTime ( _
    column As String _
) As DateTime
Visual C++
public:
DateTime GetDateTime(
    String^ column
)

Parameters

column
Type: System..::.String
The column name.

Return Value

The value of the specified column.

Remarks

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.

Note:

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 GetMySqlDateTime(Int32).

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 ConnectionString.

See Also

MySqlDataReader Class
GetDateTime Overload


GetDecimal Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetDecimal Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetDecimal(Int32) | Gets the value of the specified column as a Decimal object. (Overrides DbDataReader..::.GetDecimal(Int32).)
GetDecimal(String) | Gets the value of the specified column as a Decimal object.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetDecimal Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetDecimal Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a Decimal object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override decimal GetDecimal(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetDecimal ( _
    i As Integer _
) As Decimal
Visual C++
public:
virtual Decimal GetDecimal(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetDecimal(Int32)
IDataRecord..::.GetDecimal(Int32)

Remarks

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.

See Also

MySqlDataReader Class
GetDecimal Overload


GetDecimal Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetDecimal Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a Decimal object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public decimal GetDecimal(
    string column
)
Visual Basic (Declaration)
Public Function GetDecimal ( _
    column As String _
) As Decimal
Visual C++
public:
Decimal GetDecimal(
    String^ column
)

Parameters

column
Type: System..::.String
The column name

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetDecimal Overload


GetDouble Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetDouble Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetDouble(Int32) | Gets the value of the specified column as a double-precision floating point number. (Overrides DbDataReader..::.GetDouble(Int32).)
GetDouble(String) | Gets the value of the specified column as a double-precision floating point number.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetDouble Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetDouble Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a double-precision floating point number.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override double GetDouble(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetDouble ( _
    i As Integer _
) As Double
Visual C++
public:
virtual double GetDouble(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetDouble(Int32)
IDataRecord..::.GetDouble(Int32)

Remarks

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.

See Also

MySqlDataReader Class
GetDouble Overload


GetDouble Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetDouble Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a double-precision floating point number.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public double GetDouble(
    string column
)
Visual Basic (Declaration)
Public Function GetDouble ( _
    column As String _
) As Double
Visual C++
public:
double GetDouble(
    String^ column
)

Parameters

column
Type: System..::.String
The column name

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetDouble Overload


GetEnumerator Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetEnumerator Method
MySqlDataReader Class See Also Send Feedback
Returns an IEnumerator that iterates through the MySqlDataReader.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override IEnumerator GetEnumerator()
Visual Basic (Declaration)
Public Overrides Function GetEnumerator As IEnumerator
Visual C++
public:
virtual IEnumerator^ GetEnumerator() override

Return Value

Implements

IEnumerable..::.GetEnumerator()()()

See Also

MySqlDataReader Class


GetFieldType Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetFieldType Method
MySqlDataReader Class See Also Send Feedback
Gets the Type that is the data type of the object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Type GetFieldType(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetFieldType ( _
    i As Integer _
) As Type
Visual C++
public:
virtual Type^ GetFieldType(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetFieldType(Int32)
IDataRecord..::.GetFieldType(Int32)

See Also

MySqlDataReader Class


GetFloat Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetFloat Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetFloat(Int32) | Gets the value of the specified column as a single-precision floating point number. (Overrides DbDataReader..::.GetFloat(Int32).)
GetFloat(String) | Gets the value of the specified column as a single-precision floating point number.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetFloat Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetFloat Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a single-precision floating point number.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override float GetFloat(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetFloat ( _
    i As Integer _
) As Single
Visual C++
public:
virtual float GetFloat(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetFloat(Int32)
IDataRecord..::.GetFloat(Int32)

Remarks

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.

See Also

MySqlDataReader Class
GetFloat Overload


GetFloat Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetFloat Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a single-precision floating point number.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public float GetFloat(
    string column
)
Visual Basic (Declaration)
Public Function GetFloat ( _
    column As String _
) As Single
Visual C++
public:
float GetFloat(
    String^ column
)

Parameters

column
Type: System..::.String
The column name

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetFloat Overload


GetGuid Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetGuid Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetGuid(Int32) | (Overrides DbDataReader..::.GetGuid(Int32).)
GetGuid(String) |

See Also

MySqlDataReader Class
MySqlDataReader Members


GetGuid Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetGuid Method (Int32)
MySqlDataReader Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Guid GetGuid(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetGuid ( _
    i As Integer _
) As Guid
Visual C++
public:
virtual Guid GetGuid(
    int i
) override

Parameters

i
Type: System..::.Int32

Implements

IDataRecord..::.GetGuid(Int32)
IDataRecord..::.GetGuid(Int32)

See Also

MySqlDataReader Class
GetGuid Overload


GetGuid Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetGuid Method (String)
MySqlDataReader Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public Guid GetGuid(
    string column
)
Visual Basic (Declaration)
Public Function GetGuid ( _
    column As String _
) As Guid
Visual C++
public:
Guid GetGuid(
    String^ column
)

Parameters

column
Type: System..::.String

See Also

MySqlDataReader Class
GetGuid Overload


GetInt16 Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetInt16 Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetInt16(Int32) | Gets the value of the specified column as a 16-bit signed integer. (Overrides DbDataReader..::.GetInt16(Int32).)
GetInt16(String) | Gets the value of the specified column as a 16-bit signed integer.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetInt16 Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetInt16 Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 16-bit signed integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override short GetInt16(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetInt16 ( _
    i As Integer _
) As Short
Visual C++
public:
virtual short GetInt16(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetInt16(Int32)
IDataRecord..::.GetInt16(Int32)

Remarks

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.

See Also

MySqlDataReader Class
GetInt16 Overload


GetInt16 Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetInt16 Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 16-bit signed integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public short GetInt16(
    string column
)
Visual Basic (Declaration)
Public Function GetInt16 ( _
    column As String _
) As Short
Visual C++
public:
short GetInt16(
    String^ column
)

Parameters

column
Type: System..::.String
The column name

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetInt16 Overload


GetInt32 Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetInt32 Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetInt32(Int32) | Gets the value of the specified column as a 32-bit signed integer. (Overrides DbDataReader..::.GetInt32(Int32).)
GetInt32(String) | Gets the value of the specified column as a 32-bit signed integer.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetInt32 Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetInt32 Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 32-bit signed integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int GetInt32(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetInt32 ( _
    i As Integer _
) As Integer
Visual C++
public:
virtual int GetInt32(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetInt32(Int32)
IDataRecord..::.GetInt32(Int32)

Remarks

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.

See Also

MySqlDataReader Class
GetInt32 Overload


GetInt32 Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetInt32 Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 32-bit signed integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int GetInt32(
    string column
)
Visual Basic (Declaration)
Public Function GetInt32 ( _
    column As String _
) As Integer
Visual C++
public:
int GetInt32(
    String^ column
)

Parameters

column
Type: System..::.String
The column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetInt32 Overload


GetInt64 Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetInt64 Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetInt64(Int32) | Gets the value of the specified column as a 64-bit signed integer. (Overrides DbDataReader..::.GetInt64(Int32).)
GetInt64(String) | Gets the value of the specified column as a 64-bit signed integer.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetInt64 Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetInt64 Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 64-bit signed integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override long GetInt64(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetInt64 ( _
    i As Integer _
) As Long
Visual C++
public:
virtual long long GetInt64(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetInt64(Int32)
IDataRecord..::.GetInt64(Int32)

Remarks

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.

See Also

MySqlDataReader Class
GetInt64 Overload


GetInt64 Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetInt64 Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 64-bit signed integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public long GetInt64(
    string column
)
Visual Basic (Declaration)
Public Function GetInt64 ( _
    column As String _
) As Long
Visual C++
public:
long long GetInt64(
    String^ column
)

Parameters

column
Type: System..::.String
The column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetInt64 Overload


GetMySqlDateTime Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetMySqlDateTime Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetMySqlDateTime(Int32) | Gets the value of the specified column as a MySqlDateTime object.
GetMySqlDateTime(String) | Gets the value of the specified column as a MySqlDateTime object.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetMySqlDateTime Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetMySqlDateTime Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a MySqlDateTime object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDateTime GetMySqlDateTime(
    int column
)
Visual Basic (Declaration)
Public Function GetMySqlDateTime ( _
    column As Integer _
) As MySqlDateTime
Visual C++
public:
MySqlDateTime GetMySqlDateTime(
    int column
)

Parameters

column
Type: System..::.Int32
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetMySqlDateTime Overload


GetMySqlDateTime Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetMySqlDateTime Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a MySqlDateTime object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDateTime GetMySqlDateTime(
    string column
)
Visual Basic (Declaration)
Public Function GetMySqlDateTime ( _
    column As String _
) As MySqlDateTime
Visual C++
public:
MySqlDateTime GetMySqlDateTime(
    String^ column
)

Parameters

column
Type: System..::.String
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetMySqlDateTime Overload


GetName Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetName Method
MySqlDataReader Class See Also Send Feedback
Gets the name of the specified column.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string GetName(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetName ( _
    i As Integer _
) As String
Visual C++
public:
virtual String^ GetName(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetName(Int32)
IDataRecord..::.GetName(Int32)

See Also

MySqlDataReader Class


GetOrdinal Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetOrdinal Method
MySqlDataReader Class See Also Send Feedback
Gets the column ordinal, given the name of the column.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int GetOrdinal(
    string name
)
Visual Basic (Declaration)
Public Overrides Function GetOrdinal ( _
    name As String _
) As Integer
Visual C++
public:
virtual int GetOrdinal(
    String^ name
) override

Parameters

name
Type: System..::.String

Return Value

Implements

IDataRecord..::.GetOrdinal(String)
IDataRecord..::.GetOrdinal(String)

See Also

MySqlDataReader Class


GetSByte Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetSByte Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetSByte(Int32) | Gets the value of the specified column as a sbyte.
GetSByte(String) | Gets the value of the specified column as a sbyte.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetSByte Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetSByte Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a sbyte.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sbyte GetSByte(
    int i
)
Visual Basic (Declaration)
Public Function GetSByte ( _
    i As Integer _
) As SByte
Visual C++
public:
signed char GetSByte(
    int i
)

Parameters

i
Type: System..::.Int32

Return Value

See Also

MySqlDataReader Class
GetSByte Overload


GetSByte Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetSByte Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a sbyte.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public byte GetSByte(
    string name
)
Visual Basic (Declaration)
Public Function GetSByte ( _
    name As String _
) As Byte
Visual C++
public:
unsigned char GetSByte(
    String^ name
)

Parameters

name
Type: System..::.String

Return Value

See Also

MySqlDataReader Class
GetSByte Overload


GetSchemaTable Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetSchemaTable Method
MySqlDataReader Class See Also Send Feedback
Returns a DataTable that describes the column metadata of the MySqlDataReader.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DataTable GetSchemaTable()
Visual Basic (Declaration)
Public Overrides Function GetSchemaTable As DataTable
Visual C++
public:
virtual DataTable^ GetSchemaTable() override

Return Value

Implements

IDataReader..::.GetSchemaTable()()()
IDataReader..::.GetSchemaTable()()()

See Also

MySqlDataReader Class


GetString Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetString Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetString(Int32) | Gets the value of the specified column as a String object. (Overrides DbDataReader..::.GetString(Int32).)
GetString(String) | Gets the value of the specified column as a String object.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetString Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetString Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a String object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string GetString(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetString ( _
    i As Integer _
) As String
Visual C++
public:
virtual String^ GetString(
    int i
) override

Parameters

i
Type: System..::.Int32
The zero-based column ordinal.

Return Value

The value of the specified column.

Implements

IDataRecord..::.GetString(Int32)
IDataRecord..::.GetString(Int32)

Remarks

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.

See Also

MySqlDataReader Class
GetString Overload


GetString Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetString Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a String object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string GetString(
    string column
)
Visual Basic (Declaration)
Public Function GetString ( _
    column As String _
) As String
Visual C++
public:
String^ GetString(
    String^ column
)

Parameters

column
Type: System..::.String
The column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetString Overload


GetTimeSpan Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetTimeSpan Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetTimeSpan(Int32) | Gets the value of the specified column as a TimeSpan object.
GetTimeSpan(String) | Gets the value of the specified column as a TimeSpan object.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetTimeSpan Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetTimeSpan Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a TimeSpan object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public TimeSpan GetTimeSpan(
    int column
)
Visual Basic (Declaration)
Public Function GetTimeSpan ( _
    column As Integer _
) As TimeSpan
Visual C++
public:
TimeSpan GetTimeSpan(
    int column
)

Parameters

column
Type: System..::.Int32
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetTimeSpan Overload


GetTimeSpan Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetTimeSpan Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a TimeSpan object.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public TimeSpan GetTimeSpan(
    string column
)
Visual Basic (Declaration)
Public Function GetTimeSpan ( _
    column As String _
) As TimeSpan
Visual C++
public:
TimeSpan GetTimeSpan(
    String^ column
)

Parameters

column
Type: System..::.String
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetTimeSpan Overload


GetUInt16 Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt16 Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetUInt16(Int32) | Gets the value of the specified column as a 16-bit unsigned integer.
GetUInt16(String) | Gets the value of the specified column as a 16-bit unsigned integer.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetUInt16 Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt16 Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 16-bit unsigned integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public ushort GetUInt16(
    int column
)
Visual Basic (Declaration)
Public Function GetUInt16 ( _
    column As Integer _
) As UShort
Visual C++
public:
unsigned short GetUInt16(
    int column
)

Parameters

column
Type: System..::.Int32
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetUInt16 Overload


GetUInt16 Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt16 Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 16-bit unsigned integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public ushort GetUInt16(
    string column
)
Visual Basic (Declaration)
Public Function GetUInt16 ( _
    column As String _
) As UShort
Visual C++
public:
unsigned short GetUInt16(
    String^ column
)

Parameters

column
Type: System..::.String
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetUInt16 Overload


GetUInt32 Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt32 Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetUInt32(Int32) | Gets the value of the specified column as a 32-bit unsigned integer.
GetUInt32(String) | Gets the value of the specified column as a 32-bit unsigned integer.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetUInt32 Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt32 Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 32-bit unsigned integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint GetUInt32(
    int column
)
Visual Basic (Declaration)
Public Function GetUInt32 ( _
    column As Integer _
) As UInteger
Visual C++
public:
unsigned int GetUInt32(
    int column
)

Parameters

column
Type: System..::.Int32
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetUInt32 Overload


GetUInt32 Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt32 Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 32-bit unsigned integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public uint GetUInt32(
    string column
)
Visual Basic (Declaration)
Public Function GetUInt32 ( _
    column As String _
) As UInteger
Visual C++
public:
unsigned int GetUInt32(
    String^ column
)

Parameters

column
Type: System..::.String
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetUInt32 Overload


GetUInt64 Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt64 Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
GetUInt64(Int32) | Gets the value of the specified column as a 64-bit unsigned integer.
GetUInt64(String) | Gets the value of the specified column as a 64-bit unsigned integer.

See Also

MySqlDataReader Class
MySqlDataReader Members


GetUInt64 Method (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt64 Method (Int32)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 64-bit unsigned integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public ulong GetUInt64(
    int column
)
Visual Basic (Declaration)
Public Function GetUInt64 ( _
    column As Integer _
) As ULong
Visual C++
public:
unsigned long long GetUInt64(
    int column
)

Parameters

column
Type: System..::.Int32
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetUInt64 Overload


GetUInt64 Method (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.GetUInt64 Method (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column as a 64-bit unsigned integer.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public ulong GetUInt64(
    string column
)
Visual Basic (Declaration)
Public Function GetUInt64 ( _
    column As String _
) As ULong
Visual C++
public:
unsigned long long GetUInt64(
    String^ column
)

Parameters

column
Type: System..::.String
The zero-based column ordinal or column name.

Return Value

The value of the specified column.

Remarks

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.

See Also

MySqlDataReader Class
GetUInt64 Overload


GetValue Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetValue Method
MySqlDataReader Class See Also Send Feedback
Gets the value of the specified column in its native format.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Object GetValue(
    int i
)
Visual Basic (Declaration)
Public Overrides Function GetValue ( _
    i As Integer _
) As Object
Visual C++
public:
virtual Object^ GetValue(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.GetValue(Int32)
IDataRecord..::.GetValue(Int32)

See Also

MySqlDataReader Class


GetValues Method

[image]

MySQL Connector/Net
MySqlDataReader..::.GetValues Method
MySqlDataReader Class See Also Send Feedback
Gets all attribute columns in the collection for the current row.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int GetValues(
    Object[] values
)
Visual Basic (Declaration)
Public Overrides Function GetValues ( _
    values As Object() _
) As Integer
Visual C++
public:
virtual int GetValues(
    array<Object^>^ values
) override

Parameters

values
Type: array< System..::.Object >[]()[]

Return Value

Implements

IDataRecord..::.GetValues(array<Object>[]()[])
IDataRecord..::.GetValues(array<Object>[]()[])

See Also

MySqlDataReader Class


IsDBNull Method

[image]

MySQL Connector/Net
MySqlDataReader..::.IsDBNull Method
MySqlDataReader Class See Also Send Feedback
Gets a value indicating whether the column contains non-existent or missing values.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool IsDBNull(
    int i
)
Visual Basic (Declaration)
Public Overrides Function IsDBNull ( _
    i As Integer _
) As Boolean
Visual C++
public:
virtual bool IsDBNull(
    int i
) override

Parameters

i
Type: System..::.Int32

Return Value

Implements

IDataRecord..::.IsDBNull(Int32)
IDataRecord..::.IsDBNull(Int32)

See Also

MySqlDataReader Class


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.MemberwiseClone Method
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlDataReader Class
MySqlDataReader Members


NextResult Method

[image]

MySQL Connector/Net
MySqlDataReader..::.NextResult Method
MySqlDataReader Class See Also Send Feedback
Advances the data reader to the next result, when reading the results of batch SQL statements.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool NextResult()
Visual Basic (Declaration)
Public Overrides Function NextResult As Boolean
Visual C++
public:
virtual bool NextResult() override

Return Value

Implements

IDataReader..::.NextResult()()()
IDataReader..::.NextResult()()()

See Also

MySqlDataReader Class


Read Method

[image]

MySQL Connector/Net
MySqlDataReader..::.Read Method
MySqlDataReader Class See Also Send Feedback
Advances the MySqlDataReader to the next record.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool Read()
Visual Basic (Declaration)
Public Overrides Function Read As Boolean
Visual C++
public:
virtual bool Read() override

Return Value

Implements

IDataReader..::.Read()()()
IDataReader..::.Read()()()

See Also

MySqlDataReader Class


MySqlDataReader Properties

[image] [image]

MySQL Connector/Net
MySqlDataReader Properties
MySqlDataReader Class See Also Send Feedback

The MySqlDataReader type exposes the following members.

Properties

Name | Description
Depth | Gets a value indicating the depth of nesting for the current row. This method is not supported currently and always returns 0. (Overrides DbDataReader..::.Depth.)
FieldCount | Gets the number of columns in the current row. (Overrides DbDataReader..::.FieldCount.)
HasRows | Gets a value indicating whether the MySqlDataReader contains one or more rows. (Overrides DbDataReader..::.HasRows.)
IsClosed | Gets a value indicating whether the data reader is closed. (Overrides DbDataReader..::.IsClosed.)
Item | Overloaded.
RecordsAffected | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. (Overrides DbDataReader..::.RecordsAffected.)
VisibleFieldCount | Gets the number of fields in the DbDataReader that are not hidden. (Inherited from DbDataReader.)

See Also

MySqlDataReader Class


Depth Property

[image]

MySQL Connector/Net
MySqlDataReader..::.Depth Property
MySqlDataReader Class See Also Send Feedback
Gets a value indicating the depth of nesting for the current row. This method is not supported currently and always returns 0.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int Depth { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property Depth As Integer
Visual C++
public:
virtual property int Depth {
    int get () override;
}

Implements

IDataReader..::.Depth
IDataReader..::.Depth

See Also

MySqlDataReader Class


FieldCount Property

[image]

MySQL Connector/Net
MySqlDataReader..::.FieldCount Property
MySqlDataReader Class See Also Send Feedback
Gets the number of columns in the current row.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int FieldCount { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property FieldCount As Integer
Visual C++
public:
virtual property int FieldCount {
    int get () override;
}

Implements

IDataRecord..::.FieldCount
IDataRecord..::.FieldCount

See Also

MySqlDataReader Class


HasRows Property

[image]

MySQL Connector/Net
MySqlDataReader..::.HasRows Property
MySqlDataReader Class See Also Send Feedback
Gets a value indicating whether the MySqlDataReader contains one or more rows.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool HasRows { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property HasRows As Boolean
Visual C++
public:
virtual property bool HasRows {
    bool get () override;
}

See Also

MySqlDataReader Class


IsClosed Property

[image]

MySQL Connector/Net
MySqlDataReader..::.IsClosed Property
MySqlDataReader Class See Also Send Feedback
Gets a value indicating whether the data reader is closed.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool IsClosed { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property IsClosed As Boolean
Visual C++
public:
virtual property bool IsClosed {
    bool get () override;
}

Implements

IDataReader..::.IsClosed
IDataReader..::.IsClosed

See Also

MySqlDataReader Class


Item Property

[image] [image]

MySQL Connector/Net
MySqlDataReader..::.Item Property
MySqlDataReader Class See Also Send Feedback

Overload List

Name | Description
Item[([(Int32])]) | Overloaded. Gets the value of a column in its native format. In C#, this property is the indexer for the MySqlDataReader class. (Overrides DbDataReader..::.Item[([(Int32])]).)
Item[([(String])]) | Gets the value of a column in its native format. [C#] In C#, this property is the indexer for the MySqlDataReader class. (Overrides DbDataReader..::.Item[([(String])]).)

See Also

MySqlDataReader Class
MySqlDataReader Members


Item Property (Int32)

[image]

MySQL Connector/Net
MySqlDataReader..::.Item Property (Int32)
MySqlDataReader Class See Also Send Feedback
Overloaded. Gets the value of a column in its native format. In C#, this property is the indexer for the MySqlDataReader class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Object this[
    int i
] { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Default Property Item ( _
    i As Integer _
) As Object
Visual C++
public:
virtual property Object^ default[int i] {
    Object^ get (int i) override;
}

Parameters

i
Type: System..::.Int32

Implements

IDataRecord..::.Item[([(Int32])])
IDataRecord..::.Item[([(Int32])])

See Also

MySqlDataReader Class
Item Overload


Item Property (String)

[image]

MySQL Connector/Net
MySqlDataReader..::.Item Property (String)
MySqlDataReader Class See Also Send Feedback
Gets the value of a column in its native format. [C#] In C#, this property is the indexer for the MySqlDataReader class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Object this[
    string name
] { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Default Property Item ( _
    name As String _
) As Object
Visual C++
public:
virtual property Object^ default[String^ name] {
    Object^ get (String^ name) override;
}

Parameters

name
Type: System..::.String

Implements

IDataRecord..::.Item[([(String])])
IDataRecord..::.Item[([(String])])

See Also

MySqlDataReader Class
Item Overload


RecordsAffected Property

[image]

MySQL Connector/Net
MySqlDataReader..::.RecordsAffected Property
MySqlDataReader Class See Also Send Feedback
Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int RecordsAffected { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property RecordsAffected As Integer
Visual C++
public:
virtual property int RecordsAffected {
    int get () override;
}

Implements

IDataReader..::.RecordsAffected
IDataReader..::.RecordsAffected

See Also

MySqlDataReader Class


MySqlDbType Enumeration

[image]

MySQL Connector/Net
MySqlDbType Enumeration
See Also Send Feedback
Specifies MySQL specific data type of a field, property, for use in a MySqlParameter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public enum MySqlDbType
Visual Basic (Declaration)
Public Enumeration MySqlDbType
Visual C++
public enum class MySqlDbType

Members

Member name | Description
Decimal | Decimal A fixed precision and scale numeric value between -1038 -1 and 10 38 -1.
Byte | Byte The signed range is -128 to 127. The unsigned range is 0 to 255.
Int16 | Int16 A 16-bit signed integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535
Int24 | Specifies a 24 (3 byte) signed or unsigned value.
Int32 | Int32 A 32-bit signed integer
Int64 | Int64 A 64-bit signed integer.
Float | Single 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.
Double | Double 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.
Timestamp | A timestamp. The range is '1970-01-01 00:00:00' to sometime in the year 2037
Date | Date The supported range is '1000-01-01' to '9999-12-31'.
Time | Time The range is '-838:59:59' to '838:59:59'.
DateTime | DateTime The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
Datetime | Obsolete. Datetime The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
Year | 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).
Newdate | Obsolete Use Datetime or Date type
VarString | A variable-length string containing 0 to 65535 characters
Bit | Bit-field data type
NewDecimal | New Decimal
Enum | 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
Set | 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.
TinyBlob | A binary column with a maximum length of 255 (2^8 - 1) characters
MediumBlob | A binary column with a maximum length of 16777215 (2^24 - 1) bytes.
LongBlob | A binary column with a maximum length of 4294967295 or 4G (2^32 - 1) bytes.
Blob | A binary column with a maximum length of 65535 (2^16 - 1) bytes.
VarChar | A variable-length string containing 0 to 255 bytes.
String | A fixed-length string.
Geometry | Geometric (GIS) data type.
UByte | Unsigned 8-bit value.
UInt16 | Unsigned 16-bit value.
UInt24 | Unsigned 24-bit value.
UInt32 | Unsigned 32-bit value.
UInt64 | Unsigned 64-bit value.
Binary | Fixed length binary string.
VarBinary | Variable length binary string.
TinyText | A text column with a maximum length of 255 (2^8 - 1) characters.
MediumText | A text column with a maximum length of 16777215 (2^24 - 1) characters.
LongText | A text column with a maximum length of 4294967295 or 4G (2^32 - 1) characters.
Text | A text column with a maximum length of 65535 (2^16 - 1) characters.
Guid | A guid column

See Also


MySqlDriverType Enumeration

[image]

MySQL Connector/Net
MySqlDriverType Enumeration
See Also Send Feedback
Specifies the connection types supported

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public enum MySqlDriverType
Visual Basic (Declaration)
Public Enumeration MySqlDriverType
Visual C++
public enum class MySqlDriverType

Members

Member name | Description
Native | Use TCP/IP sockets.
Client | Use client library.
Embedded | Use MySQL embedded server.

See Also


MySqlError Class

[image]

MySQL Connector/Net
MySqlError Class
Members See Also Send Feedback
Collection of error codes that can be returned by the server

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public class MySqlError
Visual Basic (Declaration)
Public Class MySqlError
Visual C++
public ref class MySqlError

Inheritance Hierarchy

System..::.Object
MySql.Data.MySqlClient..::.MySqlError

See Also

MySqlError Members


MySqlError Members

[image] [image]

MySQL Connector/Net
MySqlError Members
MySqlError Class Constructors Methods Properties See Also Send Feedback

The MySqlError type exposes the following members.

Constructors

Name | Description
MySqlError |

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Code | Error code
Level | Error level
Message | Error message

See Also

MySqlError Class


MySqlError Constructor

[image]

MySQL Connector/Net
MySqlError Constructor
MySqlError Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlError(
    string level,
    int code,
    string message
)
Visual Basic (Declaration)
Public Sub New ( _
    level As String, _
    code As Integer, _
    message As String _
)
Visual C++
public:
MySqlError(
    String^ level,
    int code,
    String^ message
)

Parameters

level
Type: System..::.String
code
Type: System..::.Int32
message
Type: System..::.String

See Also

MySqlError Class


MySqlError Methods

[image] [image]

MySQL Connector/Net
MySqlError Methods
MySqlError Class See Also Send Feedback

The MySqlError type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlError Class


MySqlError Properties

[image] [image]

MySQL Connector/Net
MySqlError Properties
MySqlError Class See Also Send Feedback

The MySqlError type exposes the following members.

Properties

Name | Description
Code | Error code
Level | Error level
Message | Error message

See Also

MySqlError Class


Code Property

[image]

MySQL Connector/Net
MySqlError..::.Code Property
MySqlError Class See Also Send Feedback
Error code

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Code { get; }
Visual Basic (Declaration)
Public ReadOnly Property Code As Integer
Visual C++
public:
property int Code {
    int get ();
}

See Also

MySqlError Class


Level Property

[image]

MySQL Connector/Net
MySqlError..::.Level Property
MySqlError Class See Also Send Feedback
Error level

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string Level { get; }
Visual Basic (Declaration)
Public ReadOnly Property Level As String
Visual C++
public:
property String^ Level {
    String^ get ();
}

See Also

MySqlError Class


Message Property

[image]

MySQL Connector/Net
MySqlError..::.Message Property
MySqlError Class See Also Send Feedback
Error message

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string Message { get; }
Visual Basic (Declaration)
Public ReadOnly Property Message As String
Visual C++
public:
property String^ Message {
    String^ get ();
}

See Also

MySqlError Class


MySqlErrorCode Enumeration

[image]

MySQL Connector/Net
MySqlErrorCode Enumeration
See Also Send Feedback
Provides a reference to error codes returned by MySQL.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public enum MySqlErrorCode
Visual Basic (Declaration)
Public Enumeration MySqlErrorCode
Visual C++
public enum class MySqlErrorCode

Members

Member name | Description
None |
DuplicateKey | There is already a key with the given values.
KeyNotFound | The specified key was not found.
UnableToConnectToHost | Given when the connection is unable to successfully connect to host.
AccessDenied | Normally returned when an incorrect password is given
UnknownDatabase |
DuplicateKeyName | Duplicate Key Name
DuplicateKeyEntry | Duplicate Key Entry
HostNotPrivileged | The given host is not allowed to connect
AnonymousUser | The anonymous user is not allowed to connect
PasswordNotAllowed | The given password is not allowed
PasswordNoMatch | The given password does not match
TableAccessDenied |
ColumnAccessDenied |
IllegalGrantForTable |
NoSuchTable |
NonExistingTableGrant |
PacketTooLarge | An attempt was made to send or receive a packet larger than max_allowed_packet_size

See Also


MySqlException Class

[image]

MySQL Connector/Net
MySqlException Class
Members Example See Also Send Feedback
The exception that is thrown when MySQL returns an error. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
[SerializableAttribute]
public sealed class MySqlException : DbException
Visual Basic (Declaration)
<SerializableAttribute> _
Public NotInheritable Class MySqlException _
    Inherits DbException
Visual C++
[SerializableAttribute]
public ref class MySqlException sealed : public DbException

Remarks

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 MySqlDataReader objects or MySqlConnection objects.

Examples

The following example generates a MySqlException due to a missing server, and then displays the exception.
CopyVB.NET
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
CopyC#
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 );
}
}

Inheritance Hierarchy

System..::.Object
System..::.Exception
System..::.SystemException
System.Runtime.InteropServices..::.ExternalException
System.Data.Common..::.DbException
MySql.Data.MySqlClient..::.MySqlException

See Also

MySqlException Members


MySqlException Members

[image] [image]

MySQL Connector/Net
MySqlException Members
MySqlException Class Methods Properties See Also Send Feedback

The MySqlException type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)

Properties

Name | Description
Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
ErrorCode | Gets the HRESULT of the error. (Inherited from ExternalException.)
HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Message | Gets a message that describes the current exception. (Inherited from Exception.)
Number | Gets a number that identifies the type of error.
Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)

See Also

MySqlException Class


MySqlException Methods

[image] [image]

MySQL Connector/Net
MySqlException Methods
MySqlException Class See Also Send Feedback

The MySqlException type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)

See Also

MySqlException Class


MySqlException Properties

[image] [image]

MySQL Connector/Net
MySqlException Properties
MySqlException Class See Also Send Feedback

The MySqlException type exposes the following members.

Properties

Name | Description
Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
ErrorCode | Gets the HRESULT of the error. (Inherited from ExternalException.)
HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Message | Gets a message that describes the current exception. (Inherited from Exception.)
Number | Gets a number that identifies the type of error.
Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)

See Also

MySqlException Class


Number Property

[image]

MySQL Connector/Net
MySqlException..::.Number Property
MySqlException Class See Also Send Feedback
Gets a number that identifies the type of error.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Number { get; }
Visual Basic (Declaration)
Public ReadOnly Property Number As Integer
Visual C++
public:
property int Number {
    int get ();
}

See Also

MySqlException Class


MySqlHelper Class

[image]

MySQL Connector/Net
MySqlHelper Class
Members See Also Send Feedback
Helper class that makes it easier to work with the provider.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlHelper
Visual Basic (Declaration)
Public NotInheritable Class MySqlHelper
Visual C++
public ref class MySqlHelper sealed

Inheritance Hierarchy

System..::.Object
MySql.Data.MySqlClient..::.MySqlHelper

See Also

MySqlHelper Members


MySqlHelper Members

[image] [image]

MySQL Connector/Net
MySqlHelper Members
MySqlHelper Class Methods See Also Send Feedback

The MySqlHelper type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
EscapeString | Escapes the string.
ExecuteDataRow | 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.
ExecuteDataset | Overloaded.
ExecuteNonQuery | Overloaded.
ExecuteReader | Overloaded.
ExecuteScalar | Overloaded.
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)
UpdateDataSet | Updates the given table with data from the given DataSet

See Also

MySqlHelper Class


MySqlHelper Methods

[image] [image]

MySQL Connector/Net
MySqlHelper Methods
MySqlHelper Class See Also Send Feedback

The MySqlHelper type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
EscapeString | Escapes the string.
ExecuteDataRow | 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.
ExecuteDataset | Overloaded.
ExecuteNonQuery | Overloaded.
ExecuteReader | Overloaded.
ExecuteScalar | Overloaded.
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)
UpdateDataSet | Updates the given table with data from the given DataSet

See Also

MySqlHelper Class


EscapeString Method

[image]

MySQL Connector/Net
MySqlHelper..::.EscapeString Method
MySqlHelper Class See Also Send Feedback
Escapes the string.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string EscapeString(
    string value
)
Visual Basic (Declaration)
Public Shared Function EscapeString ( _
    value As String _
) As String
Visual C++
public:
static String^ EscapeString(
    String^ value
)

Parameters

value
Type: System..::.String
The string to escape

Return Value

The string with all quotes escaped.

See Also

MySqlHelper Class


ExecuteDataRow Method

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteDataRow Method
MySqlHelper Class See Also Send Feedback
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.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static DataRow ExecuteDataRow(
    string connectionString,
    string commandText,
    params MySqlParameter[] parms
)
Visual Basic (Declaration)
Public Shared Function ExecuteDataRow ( _
    connectionString As String, _
    commandText As String, _
    ParamArray parms As MySqlParameter() _
) As DataRow
Visual C++
public:
static DataRow^ ExecuteDataRow(
    String^ connectionString,
    String^ commandText,
    ... array<MySqlParameter^>^ parms
)

Parameters

connectionString
Type: System..::.String
Settings to be used for the connection
commandText
Type: System..::.String
Command to execute
parms
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Parameters to use for the command

Return Value

DataRow containing the first row of the resultset

See Also

MySqlHelper Class


ExecuteDataset Method

[image] [image]

MySQL Connector/Net
MySqlHelper..::.ExecuteDataset Method
MySqlHelper Class See Also Send Feedback

Overload List

Name | Description
ExecuteDataset(MySqlConnection, String) | Executes a single SQL command and returns the resultset in a DataSet. The state of the MySqlConnection object remains unchanged after execution of this method.
ExecuteDataset(String, String) | Executes a single SQL command and returns the resultset in a DataSet. A new MySqlConnection object is created, opened, and closed during this method.
ExecuteDataset(MySqlConnection, String, array<MySqlParameter>[]()[]) | Executes a single SQL command and returns the resultset in a DataSet. The state of the MySqlConnection object remains unchanged after execution of this method.
ExecuteDataset(String, String, array<MySqlParameter>[]()[]) | Executes a single SQL command and returns the resultset in a DataSet. A new MySqlConnection object is created, opened, and closed during this method.

See Also

MySqlHelper Class
MySqlHelper Members


ExecuteDataset Method (MySqlConnection, String)

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteDataset Method (MySqlConnection, String)
MySqlHelper Class See Also Send Feedback
Executes a single SQL command and returns the resultset in a DataSet. The state of the MySqlConnection object remains unchanged after execution of this method.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static DataSet ExecuteDataset(
    MySqlConnection connection,
    string commandText
)
Visual Basic (Declaration)
Public Shared Function ExecuteDataset ( _
    connection As MySqlConnection, _
    commandText As String _
) As DataSet
Visual C++
public:
static DataSet^ ExecuteDataset(
    MySqlConnection^ connection,
    String^ commandText
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
MySqlConnection object to use
commandText
Type: System..::.String
Command to execute

Return Value

DataSet containing the resultset

See Also

MySqlHelper Class
ExecuteDataset Overload


ExecuteDataset Method (String, String)

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteDataset Method (String, String)
MySqlHelper Class See Also Send Feedback
Executes a single SQL command and returns the resultset in a DataSet. A new MySqlConnection object is created, opened, and closed during this method.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static DataSet ExecuteDataset(
    string connectionString,
    string commandText
)
Visual Basic (Declaration)
Public Shared Function ExecuteDataset ( _
    connectionString As String, _
    commandText As String _
) As DataSet
Visual C++
public:
static DataSet^ ExecuteDataset(
    String^ connectionString,
    String^ commandText
)

Parameters

connectionString
Type: System..::.String
Settings to be used for the connection
commandText
Type: System..::.String
Command to execute

Return Value

DataSet containing the resultset

See Also

MySqlHelper Class
ExecuteDataset Overload


ExecuteDataset Method (MySqlConnection, String, MySqlParameter[])

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteDataset Method (MySqlConnection, String, array<MySqlParameter>[]()[])
MySqlHelper Class See Also Send Feedback
Executes a single SQL command and returns the resultset in a DataSet. The state of the MySqlConnection object remains unchanged after execution of this method.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static DataSet ExecuteDataset(
    MySqlConnection connection,
    string commandText,
    params MySqlParameter[] commandParameters
)
Visual Basic (Declaration)
Public Shared Function ExecuteDataset ( _
    connection As MySqlConnection, _
    commandText As String, _
    ParamArray commandParameters As MySqlParameter() _
) As DataSet
Visual C++
public:
static DataSet^ ExecuteDataset(
    MySqlConnection^ connection,
    String^ commandText,
    ... array<MySqlParameter^>^ commandParameters
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
MySqlConnection object to use
commandText
Type: System..::.String
Command to execute
commandParameters
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Parameters to use for the command

Return Value

DataSet containing the resultset

See Also

MySqlHelper Class
ExecuteDataset Overload


ExecuteDataset Method (String, String, MySqlParameter[])

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteDataset Method (String, String, array<MySqlParameter>[]()[])
MySqlHelper Class See Also Send Feedback
Executes a single SQL command and returns the resultset in a DataSet. A new MySqlConnection object is created, opened, and closed during this method.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static DataSet ExecuteDataset(
    string connectionString,
    string commandText,
    params MySqlParameter[] commandParameters
)
Visual Basic (Declaration)
Public Shared Function ExecuteDataset ( _
    connectionString As String, _
    commandText As String, _
    ParamArray commandParameters As MySqlParameter() _
) As DataSet
Visual C++
public:
static DataSet^ ExecuteDataset(
    String^ connectionString,
    String^ commandText,
    ... array<MySqlParameter^>^ commandParameters
)

Parameters

connectionString
Type: System..::.String
Settings to be used for the connection
commandText
Type: System..::.String
Command to execute
commandParameters
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Parameters to use for the command

Return Value

DataSet containing the resultset

See Also

MySqlHelper Class
ExecuteDataset Overload


ExecuteNonQuery Method

[image] [image]

MySQL Connector/Net
MySqlHelper..::.ExecuteNonQuery Method
MySqlHelper Class See Also Send Feedback

Overload List

Name | Description
ExecuteNonQuery(MySqlConnection, String, array<MySqlParameter>[]()[]) | Executes a single command against a MySQL database. The MySqlConnection is assumed to be open when the method is called and remains open after the method completes.
ExecuteNonQuery(String, String, array<MySqlParameter>[]()[]) | Executes a single command against a MySQL database. A new MySqlConnection is created using the ConnectionString given.

See Also

MySqlHelper Class
MySqlHelper Members


ExecuteNonQuery Method (MySqlConnection, String, MySqlParameter[])

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteNonQuery Method (MySqlConnection, String, array<MySqlParameter>[]()[])
MySqlHelper Class See Also Send Feedback
Executes a single command against a MySQL database. The MySqlConnection is assumed to be open when the method is called and remains open after the method completes.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static int ExecuteNonQuery(
    MySqlConnection connection,
    string commandText,
    params MySqlParameter[] commandParameters
)
Visual Basic (Declaration)
Public Shared Function ExecuteNonQuery ( _
    connection As MySqlConnection, _
    commandText As String, _
    ParamArray commandParameters As MySqlParameter() _
) As Integer
Visual C++
public:
static int ExecuteNonQuery(
    MySqlConnection^ connection,
    String^ commandText,
    ... array<MySqlParameter^>^ commandParameters
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
MySqlConnection object to use
commandText
Type: System..::.String
SQL command to be executed
commandParameters
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Array of MySqlParameter objects to use with the command.

Return Value

See Also

MySqlHelper Class
ExecuteNonQuery Overload


ExecuteNonQuery Method (String, String, MySqlParameter[])

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteNonQuery Method (String, String, array<MySqlParameter>[]()[])
MySqlHelper Class See Also Send Feedback
Executes a single command against a MySQL database. A new MySqlConnection is created using the ConnectionString given.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static int ExecuteNonQuery(
    string connectionString,
    string commandText,
    params MySqlParameter[] parms
)
Visual Basic (Declaration)
Public Shared Function ExecuteNonQuery ( _
    connectionString As String, _
    commandText As String, _
    ParamArray parms As MySqlParameter() _
) As Integer
Visual C++
public:
static int ExecuteNonQuery(
    String^ connectionString,
    String^ commandText,
    ... array<MySqlParameter^>^ parms
)

Parameters

connectionString
Type: System..::.String
ConnectionString to use
commandText
Type: System..::.String
SQL command to be executed
parms
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Array of MySqlParameter objects to use with the command.

Return Value

See Also

MySqlHelper Class
ExecuteNonQuery Overload


ExecuteReader Method

[image] [image]

MySQL Connector/Net
MySqlHelper..::.ExecuteReader Method
MySqlHelper Class See Also Send Feedback

Overload List

Name | Description
ExecuteReader(String, String) | Executes a single command against a MySQL database.
ExecuteReader(String, String, array<MySqlParameter>[]()[]) | Executes a single command against a MySQL database.

See Also

MySqlHelper Class
MySqlHelper Members


ExecuteReader Method (String, String)

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteReader Method (String, String)
MySqlHelper Class See Also Send Feedback
Executes a single command against a MySQL database.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static MySqlDataReader ExecuteReader(
    string connectionString,
    string commandText
)
Visual Basic (Declaration)
Public Shared Function ExecuteReader ( _
    connectionString As String, _
    commandText As String _
) As MySqlDataReader
Visual C++
public:
static MySqlDataReader^ ExecuteReader(
    String^ connectionString,
    String^ commandText
)

Parameters

connectionString
Type: System..::.String
Settings to use for this command
commandText
Type: System..::.String
Command text to use

Return Value

MySqlDataReader object ready to read the results of the command

See Also

MySqlHelper Class
ExecuteReader Overload


ExecuteReader Method (String, String, MySqlParameter[])

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteReader Method (String, String, array<MySqlParameter>[]()[])
MySqlHelper Class See Also Send Feedback
Executes a single command against a MySQL database.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static MySqlDataReader ExecuteReader(
    string connectionString,
    string commandText,
    params MySqlParameter[] commandParameters
)
Visual Basic (Declaration)
Public Shared Function ExecuteReader ( _
    connectionString As String, _
    commandText As String, _
    ParamArray commandParameters As MySqlParameter() _
) As MySqlDataReader
Visual C++
public:
static MySqlDataReader^ ExecuteReader(
    String^ connectionString,
    String^ commandText,
    ... array<MySqlParameter^>^ commandParameters
)

Parameters

connectionString
Type: System..::.String
Settings to use for this command
commandText
Type: System..::.String
Command text to use
commandParameters
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Array of MySqlParameter objects to use with the command

Return Value

MySqlDataReader object ready to read the results of the command

See Also

MySqlHelper Class
ExecuteReader Overload


ExecuteScalar Method

[image] [image]

MySQL Connector/Net
MySqlHelper..::.ExecuteScalar Method
MySqlHelper Class See Also Send Feedback

Overload List

Name | Description
ExecuteScalar(MySqlConnection, String) | Execute a single command against a MySQL database.
ExecuteScalar(String, String) | Execute a single command against a MySQL database.
ExecuteScalar(MySqlConnection, String, array<MySqlParameter>[]()[]) | Execute a single command against a MySQL database.
ExecuteScalar(String, String, array<MySqlParameter>[]()[]) | Execute a single command against a MySQL database.

See Also

MySqlHelper Class
MySqlHelper Members


ExecuteScalar Method (MySqlConnection, String)

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteScalar Method (MySqlConnection, String)
MySqlHelper Class See Also Send Feedback
Execute a single command against a MySQL database.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static Object ExecuteScalar(
    MySqlConnection connection,
    string commandText
)
Visual Basic (Declaration)
Public Shared Function ExecuteScalar ( _
    connection As MySqlConnection, _
    commandText As String _
) As Object
Visual C++
public:
static Object^ ExecuteScalar(
    MySqlConnection^ connection,
    String^ commandText
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
MySqlConnection object to use
commandText
Type: System..::.String
Command text to use for the command

Return Value

The first column of the first row in the result set, or a null reference if the result set is empty.

See Also

MySqlHelper Class
ExecuteScalar Overload


ExecuteScalar Method (String, String)

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteScalar Method (String, String)
MySqlHelper Class See Also Send Feedback
Execute a single command against a MySQL database.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static Object ExecuteScalar(
    string connectionString,
    string commandText
)
Visual Basic (Declaration)
Public Shared Function ExecuteScalar ( _
    connectionString As String, _
    commandText As String _
) As Object
Visual C++
public:
static Object^ ExecuteScalar(
    String^ connectionString,
    String^ commandText
)

Parameters

connectionString
Type: System..::.String
Settings to use for the update
commandText
Type: System..::.String
Command text to use for the update

Return Value

The first column of the first row in the result set, or a null reference if the result set is empty.

See Also

MySqlHelper Class
ExecuteScalar Overload


ExecuteScalar Method (MySqlConnection, String, MySqlParameter[])

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteScalar Method (MySqlConnection, String, array<MySqlParameter>[]()[])
MySqlHelper Class See Also Send Feedback
Execute a single command against a MySQL database.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static Object ExecuteScalar(
    MySqlConnection connection,
    string commandText,
    params MySqlParameter[] commandParameters
)
Visual Basic (Declaration)
Public Shared Function ExecuteScalar ( _
    connection As MySqlConnection, _
    commandText As String, _
    ParamArray commandParameters As MySqlParameter() _
) As Object
Visual C++
public:
static Object^ ExecuteScalar(
    MySqlConnection^ connection,
    String^ commandText,
    ... array<MySqlParameter^>^ commandParameters
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
MySqlConnection object to use
commandText
Type: System..::.String
Command text to use for the command
commandParameters
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Parameters to use for the command

Return Value

The first column of the first row in the result set, or a null reference if the result set is empty.

See Also

MySqlHelper Class
ExecuteScalar Overload


ExecuteScalar Method (String, String, MySqlParameter[])

[image]

MySQL Connector/Net
MySqlHelper..::.ExecuteScalar Method (String, String, array<MySqlParameter>[]()[])
MySqlHelper Class See Also Send Feedback
Execute a single command against a MySQL database.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static Object ExecuteScalar(
    string connectionString,
    string commandText,
    params MySqlParameter[] commandParameters
)
Visual Basic (Declaration)
Public Shared Function ExecuteScalar ( _
    connectionString As String, _
    commandText As String, _
    ParamArray commandParameters As MySqlParameter() _
) As Object
Visual C++
public:
static Object^ ExecuteScalar(
    String^ connectionString,
    String^ commandText,
    ... array<MySqlParameter^>^ commandParameters
)

Parameters

connectionString
Type: System..::.String
Settings to use for the command
commandText
Type: System..::.String
Command text to use for the command
commandParameters
Type: array< MySql.Data.MySqlClient..::.MySqlParameter >[]()[]
Parameters to use for the command

Return Value

The first column of the first row in the result set, or a null reference if the result set is empty.

See Also

MySqlHelper Class
ExecuteScalar Overload


UpdateDataSet Method

[image]

MySQL Connector/Net
MySqlHelper..::.UpdateDataSet Method
MySqlHelper Class See Also Send Feedback
Updates the given table with data from the given DataSet

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static void UpdateDataSet(
    string connectionString,
    string commandText,
    DataSet ds,
    string tablename
)
Visual Basic (Declaration)
Public Shared Sub UpdateDataSet ( _
    connectionString As String, _
    commandText As String, _
    ds As DataSet, _
    tablename As String _
)
Visual C++
public:
static void UpdateDataSet(
    String^ connectionString,
    String^ commandText,
    DataSet^ ds,
    String^ tablename
)

Parameters

connectionString
Type: System..::.String
Settings to use for the update
commandText
Type: System..::.String
Command text to use for the update
ds
Type: System.Data..::.DataSet
DataSet containing the new data to use in the update
tablename
Type: System..::.String
Tablename in the dataset to update

See Also

MySqlHelper Class


MySqlInfoMessageEventArgs Class

[image]

MySQL Connector/Net
MySqlInfoMessageEventArgs Class
Members See Also Send Feedback
Provides data for the InfoMessage event. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public class MySqlInfoMessageEventArgs : EventArgs
Visual Basic (Declaration)
Public Class MySqlInfoMessageEventArgs _
    Inherits EventArgs
Visual C++
public ref class MySqlInfoMessageEventArgs : public EventArgs

Inheritance Hierarchy

System..::.Object
System..::.EventArgs
MySql.Data.MySqlClient..::.MySqlInfoMessageEventArgs

See Also

MySqlInfoMessageEventArgs Members


MySqlInfoMessageEventArgs Members

[image] [image]

MySQL Connector/Net
MySqlInfoMessageEventArgs Members
MySqlInfoMessageEventArgs Class Constructors Methods Fields See Also Send Feedback

The MySqlInfoMessageEventArgs type exposes the following members.

Constructors

Name | Description
MySqlInfoMessageEventArgs |

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Fields

Name | Description
errors |

See Also

MySqlInfoMessageEventArgs Class


MySqlInfoMessageEventArgs Constructor

[image]

MySQL Connector/Net
MySqlInfoMessageEventArgs Constructor
MySqlInfoMessageEventArgs Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlInfoMessageEventArgs()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlInfoMessageEventArgs()

See Also

MySqlInfoMessageEventArgs Class


MySqlInfoMessageEventArgs Fields

[image] [image]

MySQL Connector/Net
MySqlInfoMessageEventArgs Fields
MySqlInfoMessageEventArgs Class See Also Send Feedback

The MySqlInfoMessageEventArgs type exposes the following members.

Fields

Name | Description
errors |

See Also

MySqlInfoMessageEventArgs Class


errors Field

[image]

MySQL Connector/Net
MySqlInfoMessageEventArgs..::.errors Field
MySqlInfoMessageEventArgs Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlError[] errors
Visual Basic (Declaration)
Public errors As MySqlError()
Visual C++
public:
array<MySqlError^>^ errors

See Also

MySqlInfoMessageEventArgs Class


MySqlInfoMessageEventArgs Methods

[image] [image]

MySQL Connector/Net
MySqlInfoMessageEventArgs Methods
MySqlInfoMessageEventArgs Class See Also Send Feedback

The MySqlInfoMessageEventArgs type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlInfoMessageEventArgs Class


MySqlInfoMessageEventHandler Delegate

[image]

MySQL Connector/Net
MySqlInfoMessageEventHandler Delegate
See Also Send Feedback
Represents the method that will handle the InfoMessage event of a MySqlConnection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public delegate void MySqlInfoMessageEventHandler(
    Object sender,
    MySqlInfoMessageEventArgs args
)
Visual Basic (Declaration)
Public Delegate Sub MySqlInfoMessageEventHandler ( _
    sender As Object, _
    args As MySqlInfoMessageEventArgs _
)
Visual C++
public delegate void MySqlInfoMessageEventHandler(
    Object^ sender,
    MySqlInfoMessageEventArgs^ args
)

Parameters

sender
Type: System..::.Object
args
Type: MySql.Data.MySqlClient..::.MySqlInfoMessageEventArgs

See Also


MySqlParameter Class

[image]

MySQL Connector/Net
MySqlParameter Class
Members See Also Send Feedback
Represents a parameter to a MySqlCommand, and optionally, its mapping to DataSet columns. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlParameter : DbParameter,
    IDbDataParameter, IDataParameter, ICloneable
Visual Basic (Declaration)
Public NotInheritable Class MySqlParameter _
    Inherits DbParameter _
    Implements IDbDataParameter, IDataParameter, ICloneable
Visual C++
public ref class MySqlParameter sealed : public DbParameter,
    IDbDataParameter, IDataParameter, ICloneable

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.Data.Common..::.DbParameter
MySql.Data.MySqlClient..::.MySqlParameter

See Also

MySqlParameter Members


MySqlParameter Members

[image] [image]

MySQL Connector/Net
MySqlParameter Members
MySqlParameter Class Constructors Methods Properties See Also Send Feedback

The MySqlParameter type exposes the following members.

Constructors

Name | Description
MySqlParameter | Overloaded.

Methods

Name | Description
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
ResetDbType | Resets the DbType property to its original settings. (Overrides DbParameter..::.ResetDbType()()().)
ToString | Overridden. Gets a string containing the ParameterName. (Overrides Object..::.ToString()()().)

Properties

Name | Description
DbType | Gets or sets the DbType of the parameter. (Overrides DbParameter..::.DbType.)
Direction | 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. (Overrides DbParameter..::.Direction.)
IsNullable | Gets or sets a value indicating whether the parameter accepts null values. (Overrides DbParameter..::.IsNullable.)
MySqlDbType | Gets or sets the MySqlDbType of the parameter.
ParameterName | Gets or sets the name of the MySqlParameter. (Overrides DbParameter..::.ParameterName.)
Precision | Gets or sets the maximum number of digits used to represent the Value property.
Scale | Gets or sets the number of decimal places to which Value is resolved.
Size | Gets or sets the maximum size, in bytes, of the data within the column. (Overrides DbParameter..::.Size.)
SourceColumn | Gets or sets the name of the source column that is mapped to the DataSet and used for loading or returning the Value. (Overrides DbParameter..::.SourceColumn.)
SourceColumnNullMapping | Sets or gets a value which indicates whether the source column is nullable. This allows DbCommandBuilder to correctly generate Update statements for nullable columns. (Overrides DbParameter..::.SourceColumnNullMapping.)
SourceVersion | Gets or sets the DataRowVersion to use when loading Value. (Overrides DbParameter..::.SourceVersion.)
Value | Gets or sets the value of the parameter. (Overrides DbParameter..::.Value.)

See Also

MySqlParameter Class


MySqlParameter Constructor

[image] [image]

MySQL Connector/Net
MySqlParameter Constructor
MySqlParameter Class See Also Send Feedback

Overload List

Name | Description
MySqlParameter()()() | Initializes a new instance of the MySqlParameter class.
MySqlParameter(String, MySqlDbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object) | Initializes a new instance of the MySqlParameter class with the parameter name, the type of the parameter, the size of the parameter, a ParameterDirection, the precision of the parameter, the scale of the parameter, the source column, a DataRowVersion to use, and the value of the parameter.
MySqlParameter(String, MySqlDbType) | Initializes a new instance of the MySqlParameter class with the parameter name and the data type.
MySqlParameter(String, Object) | Initializes a new instance of the MySqlParameter class with the parameter name and a value of the new MySqlParameter.
MySqlParameter(String, MySqlDbType, Int32) | Initializes a new instance of the MySqlParameter class with the parameter name, the MySqlDbType, and the size.
MySqlParameter(String, MySqlDbType, Int32, String) | Initializes a new instance of the MySqlParameter class with the parameter name, the MySqlDbType, the size, and the source column name.

See Also

MySqlParameter Class
MySqlParameter Members


MySqlParameter Constructor

[image]

MySQL Connector/Net
MySqlParameter Constructor
MySqlParameter Class See Also Send Feedback
Initializes a new instance of the MySqlParameter class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlParameter()

See Also

MySqlParameter Class
MySqlParameter Overload


MySqlParameter Constructor (String, MySqlDbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)

[image]

MySQL Connector/Net
MySqlParameter Constructor (String, MySqlDbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)
MySqlParameter Class See Also Send Feedback
Initializes a new instance of the MySqlParameter class with the parameter name, the type of the parameter, the size of the parameter, a ParameterDirection, the precision of the parameter, the scale of the parameter, the source column, a DataRowVersion to use, and the value of the parameter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter(
    string parameterName,
    MySqlDbType dbType,
    int size,
    ParameterDirection direction,
    bool isNullable,
    byte precision,
    byte scale,
    string sourceColumn,
    DataRowVersion sourceVersion,
    Object value
)
Visual Basic (Declaration)
Public Sub New ( _
    parameterName As String, _
    dbType As MySqlDbType, _
    size As Integer, _
    direction As ParameterDirection, _
    isNullable As Boolean, _
    precision As Byte, _
    scale As Byte, _
    sourceColumn As String, _
    sourceVersion As DataRowVersion, _
    value As Object _
)
Visual C++
public:
MySqlParameter(
    String^ parameterName,
    MySqlDbType dbType,
    int size,
    ParameterDirection direction,
    bool isNullable,
    unsigned char precision,
    unsigned char scale,
    String^ sourceColumn,
    DataRowVersion sourceVersion,
    Object^ value
)

Parameters

parameterName
Type: System..::.String
The name of the parameter to map.
dbType
Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.
size
Type: System..::.Int32
The length of the parameter.
direction
Type: System.Data..::.ParameterDirection
One of the ParameterDirection values.
isNullable
Type: System..::.Boolean
true if the value of the field can be null, otherwise false.
precision
Type: System..::.Byte
The total number of digits to the left and right of the decimal point to which Value is resolved.
scale
Type: System..::.Byte
The total number of decimal places to which Value is resolved.
sourceColumn
Type: System..::.String
The name of the source column.
sourceVersion
Type: System.Data..::.DataRowVersion
One of the DataRowVersion values.
value
Type: System..::.Object
An Object that is the value of the MySqlParameter.

Exceptions

Exception | Condition
System..::.ArgumentException |

See Also

MySqlParameter Class
MySqlParameter Overload


MySqlParameter Constructor (String, MySqlDbType)

[image]

MySQL Connector/Net
MySqlParameter Constructor (String, MySqlDbType)
MySqlParameter Class See Also Send Feedback
Initializes a new instance of the MySqlParameter class with the parameter name and the data type.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter(
    string parameterName,
    MySqlDbType dbType
)
Visual Basic (Declaration)
Public Sub New ( _
    parameterName As String, _
    dbType As MySqlDbType _
)
Visual C++
public:
MySqlParameter(
    String^ parameterName,
    MySqlDbType dbType
)

Parameters

parameterName
Type: System..::.String
The name of the parameter to map.
dbType
Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.

See Also

MySqlParameter Class
MySqlParameter Overload


MySqlParameter Constructor (String, Object)

[image]

MySQL Connector/Net
MySqlParameter Constructor (String, Object)
MySqlParameter Class See Also Send Feedback
Initializes a new instance of the MySqlParameter class with the parameter name and a value of the new MySqlParameter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter(
    string parameterName,
    Object value
)
Visual Basic (Declaration)
Public Sub New ( _
    parameterName As String, _
    value As Object _
)
Visual C++
public:
MySqlParameter(
    String^ parameterName,
    Object^ value
)

Parameters

parameterName
Type: System..::.String
The name of the parameter to map.
value
Type: System..::.Object
An Object that is the value of the MySqlParameter.

See Also

MySqlParameter Class
MySqlParameter Overload


MySqlParameter Constructor (String, MySqlDbType, Int32)

[image]

MySQL Connector/Net
MySqlParameter Constructor (String, MySqlDbType, Int32)
MySqlParameter Class See Also Send Feedback
Initializes a new instance of the MySqlParameter class with the parameter name, the MySqlDbType, and the size.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter(
    string parameterName,
    MySqlDbType dbType,
    int size
)
Visual Basic (Declaration)
Public Sub New ( _
    parameterName As String, _
    dbType As MySqlDbType, _
    size As Integer _
)
Visual C++
public:
MySqlParameter(
    String^ parameterName,
    MySqlDbType dbType,
    int size
)

Parameters

parameterName
Type: System..::.String
The name of the parameter to map.
dbType
Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.
size
Type: System..::.Int32
The length of the parameter.

See Also

MySqlParameter Class
MySqlParameter Overload


MySqlParameter Constructor (String, MySqlDbType, Int32, String)

[image]

MySQL Connector/Net
MySqlParameter Constructor (String, MySqlDbType, Int32, String)
MySqlParameter Class See Also Send Feedback
Initializes a new instance of the MySqlParameter class with the parameter name, the MySqlDbType, the size, and the source column name.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter(
    string parameterName,
    MySqlDbType dbType,
    int size,
    string sourceColumn
)
Visual Basic (Declaration)
Public Sub New ( _
    parameterName As String, _
    dbType As MySqlDbType, _
    size As Integer, _
    sourceColumn As String _
)
Visual C++
public:
MySqlParameter(
    String^ parameterName,
    MySqlDbType dbType,
    int size,
    String^ sourceColumn
)

Parameters

parameterName
Type: System..::.String
The name of the parameter to map.
dbType
Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.
size
Type: System..::.Int32
The length of the parameter.
sourceColumn
Type: System..::.String
The name of the source column.

See Also

MySqlParameter Class
MySqlParameter Overload


MySqlParameter Methods

[image] [image]

MySQL Connector/Net
MySqlParameter Methods
MySqlParameter Class See Also Send Feedback

The MySqlParameter type exposes the following members.

Methods

Name | Description
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
ResetDbType | Resets the DbType property to its original settings. (Overrides DbParameter..::.ResetDbType()()().)
ToString | Overridden. Gets a string containing the ParameterName. (Overrides Object..::.ToString()()().)

See Also

MySqlParameter Class


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlParameter..::.MemberwiseClone Method
MySqlParameter Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlParameter Class
MySqlParameter Members


ResetDbType Method

[image]

MySQL Connector/Net
MySqlParameter..::.ResetDbType Method
MySqlParameter Class See Also Send Feedback
Resets the DbType property to its original settings.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void ResetDbType()
Visual Basic (Declaration)
Public Overrides Sub ResetDbType
Visual C++
public:
virtual void ResetDbType() override

See Also

MySqlParameter Class


ToString Method

[image]

MySQL Connector/Net
MySqlParameter..::.ToString Method
MySqlParameter Class See Also Send Feedback
Overridden. Gets a string containing the ParameterName.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string ToString()
Visual Basic (Declaration)
Public Overrides Function ToString As String
Visual C++
public:
virtual String^ ToString() override

Return Value

See Also

MySqlParameter Class


MySqlParameter Properties

[image] [image]

MySQL Connector/Net
MySqlParameter Properties
MySqlParameter Class See Also Send Feedback

The MySqlParameter type exposes the following members.

Properties

Name | Description
DbType | Gets or sets the DbType of the parameter. (Overrides DbParameter..::.DbType.)
Direction | 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. (Overrides DbParameter..::.Direction.)
IsNullable | Gets or sets a value indicating whether the parameter accepts null values. (Overrides DbParameter..::.IsNullable.)
MySqlDbType | Gets or sets the MySqlDbType of the parameter.
ParameterName | Gets or sets the name of the MySqlParameter. (Overrides DbParameter..::.ParameterName.)
Precision | Gets or sets the maximum number of digits used to represent the Value property.
Scale | Gets or sets the number of decimal places to which Value is resolved.
Size | Gets or sets the maximum size, in bytes, of the data within the column. (Overrides DbParameter..::.Size.)
SourceColumn | Gets or sets the name of the source column that is mapped to the DataSet and used for loading or returning the Value. (Overrides DbParameter..::.SourceColumn.)
SourceColumnNullMapping | Sets or gets a value which indicates whether the source column is nullable. This allows DbCommandBuilder to correctly generate Update statements for nullable columns. (Overrides DbParameter..::.SourceColumnNullMapping.)
SourceVersion | Gets or sets the DataRowVersion to use when loading Value. (Overrides DbParameter..::.SourceVersion.)
Value | Gets or sets the value of the parameter. (Overrides DbParameter..::.Value.)

See Also

MySqlParameter Class


DbType Property

[image]

MySQL Connector/Net
MySqlParameter..::.DbType Property
MySqlParameter Class See Also Send Feedback
Gets or sets the DbType of the parameter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DbType DbType { get; set; }
Visual Basic (Declaration)
Public Overrides Property DbType As DbType
Visual C++
public:
virtual property DbType DbType {
    DbType get () override;
    void set (DbType value) override;
}

Implements

IDataParameter..::.DbType
IDataParameter..::.DbType

See Also

MySqlParameter Class


Direction Property

[image]

MySQL Connector/Net
MySqlParameter..::.Direction Property
MySqlParameter Class See Also Send Feedback
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.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override ParameterDirection Direction { get; set; }
Visual Basic (Declaration)
Public Overrides Property Direction As ParameterDirection
Visual C++
public:
virtual property ParameterDirection Direction {
    ParameterDirection get () override;
    void set (ParameterDirection value) override;
}

Implements

IDataParameter..::.Direction
IDataParameter..::.Direction

See Also

MySqlParameter Class


IsNullable Property

[image]

MySQL Connector/Net
MySqlParameter..::.IsNullable Property
MySqlParameter Class See Also Send Feedback
Gets or sets a value indicating whether the parameter accepts null values.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool IsNullable { get; set; }
Visual Basic (Declaration)
Public Overrides Property IsNullable As Boolean
Visual C++
public:
virtual property bool IsNullable {
    bool get () override;
    void set (bool value) override;
}

Implements

IDataParameter..::.IsNullable
IDataParameter..::.IsNullable

See Also

MySqlParameter Class


MySqlDbType Property

[image]

MySQL Connector/Net
MySqlParameter..::.MySqlDbType Property
MySqlParameter Class See Also Send Feedback
Gets or sets the MySqlDbType of the parameter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDbType MySqlDbType { get; set; }
Visual Basic (Declaration)
Public Property MySqlDbType As MySqlDbType
Visual C++
public:
property MySqlDbType MySqlDbType {
    MySqlDbType get ();
    void set (MySqlDbType value);
}

See Also

MySqlParameter Class


ParameterName Property

[image]

MySQL Connector/Net
MySqlParameter..::.ParameterName Property
MySqlParameter Class See Also Send Feedback
Gets or sets the name of the MySqlParameter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string ParameterName { get; set; }
Visual Basic (Declaration)
Public Overrides Property ParameterName As String
Visual C++
public:
virtual property String^ ParameterName {
    String^ get () override;
    void set (String^ value) override;
}

Implements

IDataParameter..::.ParameterName
IDataParameter..::.ParameterName

See Also

MySqlParameter Class


Precision Property

[image]

MySQL Connector/Net
MySqlParameter..::.Precision Property
MySqlParameter Class See Also Send Feedback
Gets or sets the maximum number of digits used to represent the Value property.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public byte Precision { get; set; }
Visual Basic (Declaration)
Public Property Precision As Byte
Visual C++
public:
virtual property unsigned char Precision {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

Implements

IDbDataParameter..::.Precision

See Also

MySqlParameter Class


Scale Property

[image]

MySQL Connector/Net
MySqlParameter..::.Scale Property
MySqlParameter Class See Also Send Feedback
Gets or sets the number of decimal places to which Value is resolved.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public byte Scale { get; set; }
Visual Basic (Declaration)
Public Property Scale As Byte
Visual C++
public:
virtual property unsigned char Scale {
    unsigned char get () sealed;
    void set (unsigned char value) sealed;
}

Implements

IDbDataParameter..::.Scale

See Also

MySqlParameter Class


Size Property

[image]

MySQL Connector/Net
MySqlParameter..::.Size Property
MySqlParameter Class See Also Send Feedback
Gets or sets the maximum size, in bytes, of the data within the column.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int Size { get; set; }
Visual Basic (Declaration)
Public Overrides Property Size As Integer
Visual C++
public:
virtual property int Size {
    int get () override;
    void set (int value) override;
}

Implements

IDbDataParameter..::.Size
IDbDataParameter..::.Size

See Also

MySqlParameter Class


SourceColumn Property

[image]

MySQL Connector/Net
MySqlParameter..::.SourceColumn Property
MySqlParameter Class See Also Send Feedback
Gets or sets the name of the source column that is mapped to the DataSet and used for loading or returning the Value.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string SourceColumn { get; set; }
Visual Basic (Declaration)
Public Overrides Property SourceColumn As String
Visual C++
public:
virtual property String^ SourceColumn {
    String^ get () override;
    void set (String^ value) override;
}

Implements

IDataParameter..::.SourceColumn
IDataParameter..::.SourceColumn

See Also

MySqlParameter Class


SourceColumnNullMapping Property

[image]

MySQL Connector/Net
MySqlParameter..::.SourceColumnNullMapping Property
MySqlParameter Class See Also Send Feedback
Sets or gets a value which indicates whether the source column is nullable. This allows DbCommandBuilder to correctly generate Update statements for nullable columns.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool SourceColumnNullMapping { get; set; }
Visual Basic (Declaration)
Public Overrides Property SourceColumnNullMapping As Boolean
Visual C++
public:
virtual property bool SourceColumnNullMapping {
    bool get () override;
    void set (bool value) override;
}

See Also

MySqlParameter Class


SourceVersion Property

[image]

MySQL Connector/Net
MySqlParameter..::.SourceVersion Property
MySqlParameter Class See Also Send Feedback
Gets or sets the DataRowVersion to use when loading Value.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override DataRowVersion SourceVersion { get; set; }
Visual Basic (Declaration)
Public Overrides Property SourceVersion As DataRowVersion
Visual C++
public:
virtual property DataRowVersion SourceVersion {
    DataRowVersion get () override;
    void set (DataRowVersion value) override;
}

Implements

IDataParameter..::.SourceVersion
IDataParameter..::.SourceVersion

See Also

MySqlParameter Class


Value Property

[image]

MySQL Connector/Net
MySqlParameter..::.Value Property
MySqlParameter Class See Also Send Feedback
Gets or sets the value of the parameter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Object Value { get; set; }
Visual Basic (Declaration)
Public Overrides Property Value As Object
Visual C++
public:
virtual property Object^ Value {
    Object^ get () override;
    void set (Object^ value) override;
}

Implements

IDataParameter..::.Value
IDataParameter..::.Value

See Also

MySqlParameter Class


MySqlParameterCollection Class

[image]

MySQL Connector/Net
MySqlParameterCollection Class
Members Example See Also Send Feedback
Represents a collection of parameters relevant to a MySqlCommand as well as their respective mappings to columns in a DataSet. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlParameterCollection : DbParameterCollection
Visual Basic (Declaration)
Public NotInheritable Class MySqlParameterCollection _
    Inherits DbParameterCollection
Visual C++
public ref class MySqlParameterCollection sealed : public DbParameterCollection

Remarks

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.

Examples

The following example creates multiple instances of MySqlParameter through the MySqlParameterCollection collection within the MySqlDataAdapter. These parameters are used to select data within the data source and place the data in the DataSet. This code assumes that a DataSet and a MySqlDataAdapter have already been created with the appropriate schema, commands, and connection.
CopyVB.NET
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
CopyC#
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);

}

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.Data.Common..::.DbParameterCollection
MySql.Data.MySqlClient..::.MySqlParameterCollection

See Also

MySqlParameterCollection Members


MySqlParameterCollection Members

[image] [image]

MySQL Connector/Net
MySqlParameterCollection Members
MySqlParameterCollection Class Methods Properties See Also Send Feedback

The MySqlParameterCollection type exposes the following members.

Methods

Name | Description
Add | Overloaded.
AddRange | Adds an array of values to the end of the MySqlParameterCollection. (Overrides DbParameterCollection..::.AddRange(Array).)
AddWithValue |
Clear | Removes all items from the collection. (Overrides DbParameterCollection..::.Clear()()().)
Contains | Overloaded. Gets a value indicating whether a MySqlParameter exists in the collection.
CopyTo | Copies MySqlParameter objects from the MySqlParameterCollection to the specified array. (Overrides DbParameterCollection..::.CopyTo(Array, Int32).)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetEnumerator | Returns an enumerator that iterates through the MySqlParameterCollection. (Overrides DbParameterCollection..::.GetEnumerator()()().)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetParameter | Overloaded.
GetType | Gets the Type of the current instance. (Inherited from Object.)
IndexOf | Overloaded. Gets the location of a MySqlParameter in the collection.
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Insert | Inserts a MySqlParameter into the collection at the specified index. (Overrides DbParameterCollection..::.Insert(Int32, Object).)
MemberwiseClone | Overloaded.
Remove | Removes the specified MySqlParameter from the collection. (Overrides DbParameterCollection..::.Remove(Object).)
RemoveAt | Overloaded. Removes the specified MySqlParameter from the collection.
SetParameter | Overloaded.
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Count | Gets the number of MySqlParameter objects in the collection. (Overrides DbParameterCollection..::.Count.)
IsFixedSize | Gets a value that indicates whether the MySqlParameterCollection has a fixed size. (Overrides DbParameterCollection..::.IsFixedSize.)
IsReadOnly | Gets a value that indicates whether the MySqlParameterCollection is read-only. (Overrides DbParameterCollection..::.IsReadOnly.)
IsSynchronized | Gets a value that indicates whether the MySqlParameterCollection is synchronized. (Overrides DbParameterCollection..::.IsSynchronized.)
Item | Overloaded. Gets the MySqlParameter with a specified attribute. [C#] In C#, this property is the indexer for the MySqlParameterCollection class.
SyncRoot | Gets an object that can be used to synchronize access to the MySqlParameterCollection. (Overrides DbParameterCollection..::.SyncRoot.)

See Also

MySqlParameterCollection Class


MySqlParameterCollection Methods

[image] [image]

MySQL Connector/Net
MySqlParameterCollection Methods
MySqlParameterCollection Class See Also Send Feedback

The MySqlParameterCollection type exposes the following members.

Methods

Name | Description
Add | Overloaded.
AddRange | Adds an array of values to the end of the MySqlParameterCollection. (Overrides DbParameterCollection..::.AddRange(Array).)
AddWithValue |
Clear | Removes all items from the collection. (Overrides DbParameterCollection..::.Clear()()().)
Contains | Overloaded. Gets a value indicating whether a MySqlParameter exists in the collection.
CopyTo | Copies MySqlParameter objects from the MySqlParameterCollection to the specified array. (Overrides DbParameterCollection..::.CopyTo(Array, Int32).)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetEnumerator | Returns an enumerator that iterates through the MySqlParameterCollection. (Overrides DbParameterCollection..::.GetEnumerator()()().)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetParameter | Overloaded.
GetType | Gets the Type of the current instance. (Inherited from Object.)
IndexOf | Overloaded. Gets the location of a MySqlParameter in the collection.
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Insert | Inserts a MySqlParameter into the collection at the specified index. (Overrides DbParameterCollection..::.Insert(Int32, Object).)
MemberwiseClone | Overloaded.
Remove | Removes the specified MySqlParameter from the collection. (Overrides DbParameterCollection..::.Remove(Object).)
RemoveAt | Overloaded. Removes the specified MySqlParameter from the collection.
SetParameter | Overloaded.
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlParameterCollection Class


Add Method

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.Add Method
MySqlParameterCollection Class See Also Send Feedback

Overload List

Name | Description
Add(MySqlParameter) | Adds the specified MySqlParameter object to the MySqlParameterCollection.
Add(Object) | Adds the specified MySqlParameter object to the MySqlParameterCollection. (Overrides DbParameterCollection..::.Add(Object).)
Add(String, MySqlDbType) | Adds a MySqlParameter to the MySqlParameterCollection given the parameter name and the data type.
Add(String, Object) | Obsolete. Adds a MySqlParameter to the MySqlParameterCollection given the specified parameter name and value.
Add(String, MySqlDbType, Int32) | Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, and the column length.
Add(String, MySqlDbType, Int32, String) | Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, the column length, and the source column name.

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


Add Method (MySqlParameter)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Add Method (MySqlParameter)
MySqlParameterCollection Class See Also Send Feedback
Adds the specified MySqlParameter object to the MySqlParameterCollection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter Add(
    MySqlParameter value
)
Visual Basic (Declaration)
Public Function Add ( _
    value As MySqlParameter _
) As MySqlParameter
Visual C++
public:
MySqlParameter^ Add(
    MySqlParameter^ value
)

Parameters

value
Type: MySql.Data.MySqlClient..::.MySqlParameter
The MySqlParameter to add to the collection.

Return Value

The newly added MySqlParameter object.

See Also

MySqlParameterCollection Class
Add Overload


Add Method (Object)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Add Method (Object)
MySqlParameterCollection Class See Also Send Feedback
Adds the specified MySqlParameter object to the MySqlParameterCollection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int Add(
    Object value
)
Visual Basic (Declaration)
Public Overrides Function Add ( _
    value As Object _
) As Integer
Visual C++
public:
virtual int Add(
    Object^ value
) override

Parameters

value
Type: System..::.Object
The MySqlParameter to add to the collection.

Return Value

The index of the new MySqlParameter object.

Implements

IList..::.Add(Object)

See Also

MySqlParameterCollection Class
Add Overload


Add Method (String, MySqlDbType)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Add Method (String, MySqlDbType)
MySqlParameterCollection Class See Also Send Feedback
Adds a MySqlParameter to the MySqlParameterCollection given the parameter name and the data type.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter Add(
    string parameterName,
    MySqlDbType dbType
)
Visual Basic (Declaration)
Public Function Add ( _
    parameterName As String, _
    dbType As MySqlDbType _
) As MySqlParameter
Visual C++
public:
MySqlParameter^ Add(
    String^ parameterName,
    MySqlDbType dbType
)

Parameters

parameterName
Type: System..::.String
The name of the parameter.
dbType
Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.

Return Value

The newly added MySqlParameter object.

See Also

MySqlParameterCollection Class
Add Overload


Add Method (String, Object)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Add Method (String, Object)
MySqlParameterCollection Class See Also Send Feedback
Adds a MySqlParameter to the MySqlParameterCollection given the specified parameter name and value.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
[ObsoleteAttribute("Add(String parameterName, Object value) has been deprecated.  Use AddWithValue(String parameterName, Object value)")]
public MySqlParameter Add(
    string parameterName,
    Object value
)
Visual Basic (Declaration)
<ObsoleteAttribute("Add(String parameterName, Object value) has been deprecated.  Use AddWithValue(String parameterName, Object value)")> _
Public Function Add ( _
    parameterName As String, _
    value As Object _
) As MySqlParameter
Visual C++
[ObsoleteAttribute(L"Add(String parameterName, Object value) has been deprecated.  Use AddWithValue(String parameterName, Object value)")]
public:
MySqlParameter^ Add(
    String^ parameterName,
    Object^ value
)

Parameters

parameterName
Type: System..::.String
The name of the parameter.
value
Type: System..::.Object
The Value of the MySqlParameter to add to the collection.

Return Value

The newly added MySqlParameter object.

See Also

MySqlParameterCollection Class
Add Overload


Add Method (String, MySqlDbType, Int32)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Add Method (String, MySqlDbType, Int32)
MySqlParameterCollection Class See Also Send Feedback
Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, and the column length.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter Add(
    string parameterName,
    MySqlDbType dbType,
    int size
)
Visual Basic (Declaration)
Public Function Add ( _
    parameterName As String, _
    dbType As MySqlDbType, _
    size As Integer _
) As MySqlParameter
Visual C++
public:
MySqlParameter^ Add(
    String^ parameterName,
    MySqlDbType dbType,
    int size
)

Parameters

parameterName
Type: System..::.String
The name of the parameter.
dbType
Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.
size
Type: System..::.Int32
The length of the column.

Return Value

The newly added MySqlParameter object.

See Also

MySqlParameterCollection Class
Add Overload


Add Method (String, MySqlDbType, Int32, String)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Add Method (String, MySqlDbType, Int32, String)
MySqlParameterCollection Class See Also Send Feedback
Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, the column length, and the source column name.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter Add(
    string parameterName,
    MySqlDbType dbType,
    int size,
    string sourceColumn
)
Visual Basic (Declaration)
Public Function Add ( _
    parameterName As String, _
    dbType As MySqlDbType, _
    size As Integer, _
    sourceColumn As String _
) As MySqlParameter
Visual C++
public:
MySqlParameter^ Add(
    String^ parameterName,
    MySqlDbType dbType,
    int size,
    String^ sourceColumn
)

Parameters

parameterName
Type: System..::.String
The name of the parameter.
dbType
Type: MySql.Data.MySqlClient..::.MySqlDbType
One of the MySqlDbType values.
size
Type: System..::.Int32
The length of the column.
sourceColumn
Type: System..::.String
The name of the source column.

Return Value

The newly added MySqlParameter object.

See Also

MySqlParameterCollection Class
Add Overload


AddRange Method

[image]

MySQL Connector/Net
MySqlParameterCollection..::.AddRange Method
MySqlParameterCollection Class See Also Send Feedback
Adds an array of values to the end of the MySqlParameterCollection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void AddRange(
    Array values
)
Visual Basic (Declaration)
Public Overrides Sub AddRange ( _
    values As Array _
)
Visual C++
public:
virtual void AddRange(
    Array^ values
) override

Parameters

values
Type: System..::.Array

See Also

MySqlParameterCollection Class


AddWithValue Method

[image]

MySQL Connector/Net
MySqlParameterCollection..::.AddWithValue Method
MySqlParameterCollection Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter AddWithValue(
    string parameterName,
    Object value
)
Visual Basic (Declaration)
Public Function AddWithValue ( _
    parameterName As String, _
    value As Object _
) As MySqlParameter
Visual C++
public:
MySqlParameter^ AddWithValue(
    String^ parameterName,
    Object^ value
)

Parameters

parameterName
Type: System..::.String
value
Type: System..::.Object

See Also

MySqlParameterCollection Class


Clear Method

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Clear Method
MySqlParameterCollection Class See Also Send Feedback
Removes all items from the collection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Clear()
Visual Basic (Declaration)
Public Overrides Sub Clear
Visual C++
public:
virtual void Clear() override

Implements

IList..::.Clear()()()

See Also

MySqlParameterCollection Class


Contains Method

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.Contains Method
MySqlParameterCollection Class See Also Send Feedback
Gets a value indicating whether a MySqlParameter exists in the collection.

Overload List

Name | Description
Contains(Object) | Gets a value indicating whether a MySqlParameter exists in the collection. (Overrides DbParameterCollection..::.Contains(Object).)
Contains(String) | Gets a value indicating whether a MySqlParameter with the specified parameter name exists in the collection. (Overrides DbParameterCollection..::.Contains(String).)

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


Contains Method (Object)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Contains Method (Object)
MySqlParameterCollection Class See Also Send Feedback
Gets a value indicating whether a MySqlParameter exists in the collection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool Contains(
    Object value
)
Visual Basic (Declaration)
Public Overrides Function Contains ( _
    value As Object _
) As Boolean
Visual C++
public:
virtual bool Contains(
    Object^ value
) override

Parameters

value
Type: System..::.Object
The value of the MySqlParameter object to find.

Return Value

true if the collection contains the MySqlParameter object; otherwise, false.

Implements

IList..::.Contains(Object)

See Also

MySqlParameterCollection Class
Contains Overload


Contains Method (String)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Contains Method (String)
MySqlParameterCollection Class See Also Send Feedback
Gets a value indicating whether a MySqlParameter with the specified parameter name exists in the collection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool Contains(
    string parameterName
)
Visual Basic (Declaration)
Public Overrides Function Contains ( _
    parameterName As String _
) As Boolean
Visual C++
public:
virtual bool Contains(
    String^ parameterName
) override

Parameters

parameterName
Type: System..::.String
The name of the MySqlParameter object to find.

Return Value

true if the collection contains the parameter; otherwise, false.

Implements

IDataParameterCollection..::.Contains(String)

See Also

MySqlParameterCollection Class
Contains Overload


CopyTo Method

[image]

MySQL Connector/Net
MySqlParameterCollection..::.CopyTo Method
MySqlParameterCollection Class See Also Send Feedback
Copies MySqlParameter objects from the MySqlParameterCollection to the specified array.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void CopyTo(
    Array array,
    int index
)
Visual Basic (Declaration)
Public Overrides Sub CopyTo ( _
    array As Array, _
    index As Integer _
)
Visual C++
public:
virtual void CopyTo(
    Array^ array,
    int index
) override

Parameters

array
Type: System..::.Array
index
Type: System..::.Int32

Implements

ICollection..::.CopyTo(Array, Int32)

See Also

MySqlParameterCollection Class


GetEnumerator Method

[image]

MySQL Connector/Net
MySqlParameterCollection..::.GetEnumerator Method
MySqlParameterCollection Class See Also Send Feedback
Returns an enumerator that iterates through the MySqlParameterCollection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override IEnumerator GetEnumerator()
Visual Basic (Declaration)
Public Overrides Function GetEnumerator As IEnumerator
Visual C++
public:
virtual IEnumerator^ GetEnumerator() override

Return Value

Implements

IEnumerable..::.GetEnumerator()()()

See Also

MySqlParameterCollection Class


GetParameter Method

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.GetParameter Method
MySqlParameterCollection Class See Also Send Feedback

Overload List

Name | Description
GetParameter(Int32) | Returns the DbParameter object at the specified index in the collection. (Inherited from DbParameterCollection.)
GetParameter(String) | Returns DbParameter the object with the specified name. (Inherited from DbParameterCollection.)

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


IndexOf Method

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.IndexOf Method
MySqlParameterCollection Class See Also Send Feedback
Gets the location of a MySqlParameter in the collection.

Overload List

Name | Description
IndexOf(Object) | Gets the location of a MySqlParameter in the collection. (Overrides DbParameterCollection..::.IndexOf(Object).)
IndexOf(String) | Gets the location of the MySqlParameter in the collection with a specific parameter name. (Overrides DbParameterCollection..::.IndexOf(String).)

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


IndexOf Method (Object)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.IndexOf Method (Object)
MySqlParameterCollection Class See Also Send Feedback
Gets the location of a MySqlParameter in the collection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int IndexOf(
    Object value
)
Visual Basic (Declaration)
Public Overrides Function IndexOf ( _
    value As Object _
) As Integer
Visual C++
public:
virtual int IndexOf(
    Object^ value
) override

Parameters

value
Type: System..::.Object
The MySqlParameter object to locate.

Return Value

The zero-based location of the MySqlParameter in the collection.

Implements

IList..::.IndexOf(Object)

See Also

MySqlParameterCollection Class
IndexOf Overload


IndexOf Method (String)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.IndexOf Method (String)
MySqlParameterCollection Class See Also Send Feedback
Gets the location of the MySqlParameter in the collection with a specific parameter name.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int IndexOf(
    string parameterName
)
Visual Basic (Declaration)
Public Overrides Function IndexOf ( _
    parameterName As String _
) As Integer
Visual C++
public:
virtual int IndexOf(
    String^ parameterName
) override

Parameters

parameterName
Type: System..::.String
The name of the MySqlParameter object to retrieve.

Return Value

The zero-based location of the MySqlParameter in the collection.

Implements

IDataParameterCollection..::.IndexOf(String)

See Also

MySqlParameterCollection Class
IndexOf Overload


Insert Method

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Insert Method
MySqlParameterCollection Class See Also Send Feedback
Inserts a MySqlParameter into the collection at the specified index.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Insert(
    int index,
    Object value
)
Visual Basic (Declaration)
Public Overrides Sub Insert ( _
    index As Integer, _
    value As Object _
)
Visual C++
public:
virtual void Insert(
    int index,
    Object^ value
) override

Parameters

index
Type: System..::.Int32
value
Type: System..::.Object

Implements

IList..::.Insert(Int32, Object)

See Also

MySqlParameterCollection Class


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.MemberwiseClone Method
MySqlParameterCollection Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


Remove Method

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Remove Method
MySqlParameterCollection Class See Also Send Feedback
Removes the specified MySqlParameter from the collection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Remove(
    Object value
)
Visual Basic (Declaration)
Public Overrides Sub Remove ( _
    value As Object _
)
Visual C++
public:
virtual void Remove(
    Object^ value
) override

Parameters

value
Type: System..::.Object

Implements

IList..::.Remove(Object)

See Also

MySqlParameterCollection Class


RemoveAt Method

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.RemoveAt Method
MySqlParameterCollection Class See Also Send Feedback
Removes the specified MySqlParameter from the collection.

Overload List

Name | Description
RemoveAt(Int32) | Removes the specified MySqlParameter from the collection using a specific index. (Overrides DbParameterCollection..::.RemoveAt(Int32).)
RemoveAt(String) | Removes the specified MySqlParameter from the collection using the parameter name. (Overrides DbParameterCollection..::.RemoveAt(String).)

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


RemoveAt Method (Int32)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.RemoveAt Method (Int32)
MySqlParameterCollection Class See Also Send Feedback
Removes the specified MySqlParameter from the collection using a specific index.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void RemoveAt(
    int index
)
Visual Basic (Declaration)
Public Overrides Sub RemoveAt ( _
    index As Integer _
)
Visual C++
public:
virtual void RemoveAt(
    int index
) override

Parameters

index
Type: System..::.Int32
The zero-based index of the parameter.

Implements

IList..::.RemoveAt(Int32)

See Also

MySqlParameterCollection Class
RemoveAt Overload


RemoveAt Method (String)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.RemoveAt Method (String)
MySqlParameterCollection Class See Also Send Feedback
Removes the specified MySqlParameter from the collection using the parameter name.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void RemoveAt(
    string parameterName
)
Visual Basic (Declaration)
Public Overrides Sub RemoveAt ( _
    parameterName As String _
)
Visual C++
public:
virtual void RemoveAt(
    String^ parameterName
) override

Parameters

parameterName
Type: System..::.String
The name of the MySqlParameter object to retrieve.

Implements

IDataParameterCollection..::.RemoveAt(String)

See Also

MySqlParameterCollection Class
RemoveAt Overload


SetParameter Method

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.SetParameter Method
MySqlParameterCollection Class See Also Send Feedback

Overload List

Name | Description
SetParameter(Int32, DbParameter) | Sets the DbParameter object at the specified index to a new value. (Inherited from DbParameterCollection.)
SetParameter(String, DbParameter) | Sets the DbParameter object with the specified name to a new value. (Inherited from DbParameterCollection.)

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


MySqlParameterCollection Properties

[image] [image]

MySQL Connector/Net
MySqlParameterCollection Properties
MySqlParameterCollection Class See Also Send Feedback

The MySqlParameterCollection type exposes the following members.

Properties

Name | Description
Count | Gets the number of MySqlParameter objects in the collection. (Overrides DbParameterCollection..::.Count.)
IsFixedSize | Gets a value that indicates whether the MySqlParameterCollection has a fixed size. (Overrides DbParameterCollection..::.IsFixedSize.)
IsReadOnly | Gets a value that indicates whether the MySqlParameterCollection is read-only. (Overrides DbParameterCollection..::.IsReadOnly.)
IsSynchronized | Gets a value that indicates whether the MySqlParameterCollection is synchronized. (Overrides DbParameterCollection..::.IsSynchronized.)
Item | Overloaded. Gets the MySqlParameter with a specified attribute. [C#] In C#, this property is the indexer for the MySqlParameterCollection class.
SyncRoot | Gets an object that can be used to synchronize access to the MySqlParameterCollection. (Overrides DbParameterCollection..::.SyncRoot.)

See Also

MySqlParameterCollection Class


Count Property

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Count Property
MySqlParameterCollection Class See Also Send Feedback
Gets the number of MySqlParameter objects in the collection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override int Count { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property Count As Integer
Visual C++
public:
virtual property int Count {
    int get () override;
}

Implements

ICollection..::.Count

See Also

MySqlParameterCollection Class


IsFixedSize Property

[image]

MySQL Connector/Net
MySqlParameterCollection..::.IsFixedSize Property
MySqlParameterCollection Class See Also Send Feedback
Gets a value that indicates whether the MySqlParameterCollection has a fixed size.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool IsFixedSize { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property IsFixedSize As Boolean
Visual C++
public:
virtual property bool IsFixedSize {
    bool get () override;
}

Implements

IList..::.IsFixedSize

See Also

MySqlParameterCollection Class


IsReadOnly Property

[image]

MySQL Connector/Net
MySqlParameterCollection..::.IsReadOnly Property
MySqlParameterCollection Class See Also Send Feedback
Gets a value that indicates whether the MySqlParameterCollection is read-only.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool IsReadOnly { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property IsReadOnly As Boolean
Visual C++
public:
virtual property bool IsReadOnly {
    bool get () override;
}

Implements

IList..::.IsReadOnly

See Also

MySqlParameterCollection Class


IsSynchronized Property

[image]

MySQL Connector/Net
MySqlParameterCollection..::.IsSynchronized Property
MySqlParameterCollection Class See Also Send Feedback
Gets a value that indicates whether the MySqlParameterCollection is synchronized.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override bool IsSynchronized { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property IsSynchronized As Boolean
Visual C++
public:
virtual property bool IsSynchronized {
    bool get () override;
}

Implements

ICollection..::.IsSynchronized

See Also

MySqlParameterCollection Class


Item Property

[image] [image]

MySQL Connector/Net
MySqlParameterCollection..::.Item Property
MySqlParameterCollection Class See Also Send Feedback
Gets the MySqlParameter with a specified attribute. [C#] In C#, this property is the indexer for the MySqlParameterCollection class.

Overload List

Name | Description
Item[([(Int32])]) | Gets the MySqlParameter at the specified index.
Item[([(String])]) | Gets the MySqlParameter with the specified name.

See Also

MySqlParameterCollection Class
MySqlParameterCollection Members


Item Property (Int32)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Item Property (Int32)
MySqlParameterCollection Class See Also Send Feedback
Gets the MySqlParameter at the specified index.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter this[
    int index
] { get; set; }
Visual Basic (Declaration)
Public Default Property Item ( _
    index As Integer _
) As MySqlParameter
Visual C++
public:
property MySqlParameter^ default[int index] {
    MySqlParameter^ get (int index);
    void set (int index, MySqlParameter^ value);
}

Parameters

index
Type: System..::.Int32

See Also

MySqlParameterCollection Class
Item Overload


Item Property (String)

[image]

MySQL Connector/Net
MySqlParameterCollection..::.Item Property (String)
MySqlParameterCollection Class See Also Send Feedback
Gets the MySqlParameter with the specified name.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlParameter this[
    string name
] { get; set; }
Visual Basic (Declaration)
Public Default Property Item ( _
    name As String _
) As MySqlParameter
Visual C++
public:
property MySqlParameter^ default[String^ name] {
    MySqlParameter^ get (String^ name);
    void set (String^ name, MySqlParameter^ value);
}

Parameters

name
Type: System..::.String

See Also

MySqlParameterCollection Class
Item Overload


SyncRoot Property

[image]

MySQL Connector/Net
MySqlParameterCollection..::.SyncRoot Property
MySqlParameterCollection Class See Also Send Feedback
Gets an object that can be used to synchronize access to the MySqlParameterCollection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override Object SyncRoot { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property SyncRoot As Object
Visual C++
public:
virtual property Object^ SyncRoot {
    Object^ get () override;
}

Implements

ICollection..::.SyncRoot

See Also

MySqlParameterCollection Class


MySqlRowUpdatedEventArgs Class

[image]

MySQL Connector/Net
MySqlRowUpdatedEventArgs Class
Members See Also Send Feedback
Provides data for the RowUpdated event. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlRowUpdatedEventArgs : RowUpdatedEventArgs
Visual Basic (Declaration)
Public NotInheritable Class MySqlRowUpdatedEventArgs _
    Inherits RowUpdatedEventArgs
Visual C++
public ref class MySqlRowUpdatedEventArgs sealed : public RowUpdatedEventArgs

Inheritance Hierarchy

System..::.Object
System..::.EventArgs
System.Data.Common..::.RowUpdatedEventArgs
MySql.Data.MySqlClient..::.MySqlRowUpdatedEventArgs

See Also

MySqlRowUpdatedEventArgs Members


MySqlRowUpdatedEventArgs Members

[image] [image]

MySQL Connector/Net
MySqlRowUpdatedEventArgs Members
MySqlRowUpdatedEventArgs Class Constructors Methods Properties See Also Send Feedback

The MySqlRowUpdatedEventArgs type exposes the following members.

Constructors

Name | Description
MySqlRowUpdatedEventArgs | Initializes a new instance of the MySqlRowUpdatedEventArgs class.

Methods

Name | Description
CopyToRows | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Command | Gets or sets the MySqlCommand executed when Update is called.
Errors | Gets any errors generated by the .NET Framework data provider when the Command was executed. (Inherited from RowUpdatedEventArgs.)
RecordsAffected | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. (Inherited from RowUpdatedEventArgs.)
Row | Gets the DataRow sent through an Update(DataSet). (Inherited from RowUpdatedEventArgs.)
RowCount | Gets the number of rows processed in a batch of updated records. (Inherited from RowUpdatedEventArgs.)
StatementType | Gets the type of SQL statement executed. (Inherited from RowUpdatedEventArgs.)
Status | Gets the UpdateStatus of the Command property. (Inherited from RowUpdatedEventArgs.)
TableMapping | Gets the DataTableMapping sent through an Update(DataSet). (Inherited from RowUpdatedEventArgs.)

See Also

MySqlRowUpdatedEventArgs Class


MySqlRowUpdatedEventArgs Constructor

[image]

MySQL Connector/Net
MySqlRowUpdatedEventArgs Constructor
MySqlRowUpdatedEventArgs Class See Also Send Feedback
Initializes a new instance of the MySqlRowUpdatedEventArgs class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlRowUpdatedEventArgs(
    DataRow row,
    IDbCommand command,
    StatementType statementType,
    DataTableMapping tableMapping
)
Visual Basic (Declaration)
Public Sub New ( _
    row As DataRow, _
    command As IDbCommand, _
    statementType As StatementType, _
    tableMapping As DataTableMapping _
)
Visual C++
public:
MySqlRowUpdatedEventArgs(
    DataRow^ row,
    IDbCommand^ command,
    StatementType statementType,
    DataTableMapping^ tableMapping
)

Parameters

row
Type: System.Data..::.DataRow
The DataRow sent through an Update(DataSet).
command
Type: System.Data..::.IDbCommand
The IDbCommand executed when Update(DataSet) is called.
statementType
Type: System.Data..::.StatementType
One of the StatementType values that specifies the type of query executed.
tableMapping
Type: System.Data.Common..::.DataTableMapping
The DataTableMapping sent through an Update(DataSet).

See Also

MySqlRowUpdatedEventArgs Class


MySqlRowUpdatedEventArgs Methods

[image] [image]

MySQL Connector/Net
MySqlRowUpdatedEventArgs Methods
MySqlRowUpdatedEventArgs Class See Also Send Feedback

The MySqlRowUpdatedEventArgs type exposes the following members.

Methods

Name | Description
CopyToRows | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlRowUpdatedEventArgs Class


CopyToRows Method

[image] [image]

MySQL Connector/Net
MySqlRowUpdatedEventArgs..::.CopyToRows Method
MySqlRowUpdatedEventArgs Class See Also Send Feedback

Overload List

Name | Description
CopyToRows(array<DataRow>[]()[]) | Copies references to the modified rows into the provided array. (Inherited from RowUpdatedEventArgs.)
CopyToRows(array<DataRow>[]()[], Int32) | Copies references to the modified rows into the provided array. (Inherited from RowUpdatedEventArgs.)

See Also

MySqlRowUpdatedEventArgs Class
MySqlRowUpdatedEventArgs Members


MySqlRowUpdatedEventArgs Properties

[image] [image]

MySQL Connector/Net
MySqlRowUpdatedEventArgs Properties
MySqlRowUpdatedEventArgs Class See Also Send Feedback

The MySqlRowUpdatedEventArgs type exposes the following members.

Properties

Name | Description
Command | Gets or sets the MySqlCommand executed when Update is called.
Errors | Gets any errors generated by the .NET Framework data provider when the Command was executed. (Inherited from RowUpdatedEventArgs.)
RecordsAffected | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement. (Inherited from RowUpdatedEventArgs.)
Row | Gets the DataRow sent through an Update(DataSet). (Inherited from RowUpdatedEventArgs.)
RowCount | Gets the number of rows processed in a batch of updated records. (Inherited from RowUpdatedEventArgs.)
StatementType | Gets the type of SQL statement executed. (Inherited from RowUpdatedEventArgs.)
Status | Gets the UpdateStatus of the Command property. (Inherited from RowUpdatedEventArgs.)
TableMapping | Gets the DataTableMapping sent through an Update(DataSet). (Inherited from RowUpdatedEventArgs.)

See Also

MySqlRowUpdatedEventArgs Class


Command Property

[image]

MySQL Connector/Net
MySqlRowUpdatedEventArgs..::.Command Property
MySqlRowUpdatedEventArgs Class See Also Send Feedback
Gets or sets the MySqlCommand executed when Update is called.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand Command { get; }
Visual Basic (Declaration)
Public ReadOnly Property Command As MySqlCommand
Visual C++
public:
property MySqlCommand^ Command {
    MySqlCommand^ get ();
}

See Also

MySqlRowUpdatedEventArgs Class


MySqlRowUpdatedEventHandler Delegate

[image]

MySQL Connector/Net
MySqlRowUpdatedEventHandler Delegate
See Also Send Feedback
Represents the method that will handle the RowUpdated event of a MySqlDataAdapter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public delegate void MySqlRowUpdatedEventHandler(
    Object sender,
    MySqlRowUpdatedEventArgs e
)
Visual Basic (Declaration)
Public Delegate Sub MySqlRowUpdatedEventHandler ( _
    sender As Object, _
    e As MySqlRowUpdatedEventArgs _
)
Visual C++
public delegate void MySqlRowUpdatedEventHandler(
    Object^ sender,
    MySqlRowUpdatedEventArgs^ e
)

Parameters

sender
Type: System..::.Object
e
Type: MySql.Data.MySqlClient..::.MySqlRowUpdatedEventArgs

See Also


MySqlRowUpdatingEventArgs Class

[image]

MySQL Connector/Net
MySqlRowUpdatingEventArgs Class
Members See Also Send Feedback
Provides data for the RowUpdating event. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlRowUpdatingEventArgs : RowUpdatingEventArgs
Visual Basic (Declaration)
Public NotInheritable Class MySqlRowUpdatingEventArgs _
    Inherits RowUpdatingEventArgs
Visual C++
public ref class MySqlRowUpdatingEventArgs sealed : public RowUpdatingEventArgs

Inheritance Hierarchy

System..::.Object
System..::.EventArgs
System.Data.Common..::.RowUpdatingEventArgs
MySql.Data.MySqlClient..::.MySqlRowUpdatingEventArgs

See Also

MySqlRowUpdatingEventArgs Members


MySqlRowUpdatingEventArgs Members

[image] [image]

MySQL Connector/Net
MySqlRowUpdatingEventArgs Members
MySqlRowUpdatingEventArgs Class Constructors Methods Properties See Also Send Feedback

The MySqlRowUpdatingEventArgs type exposes the following members.

Constructors

Name | Description
MySqlRowUpdatingEventArgs | Initializes a new instance of the MySqlRowUpdatingEventArgs class.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
BaseCommand | Gets or sets the IDbCommand object for an instance of this class. (Inherited from RowUpdatingEventArgs.)
Command | Gets or sets the MySqlCommand to execute when performing the Update.
Errors | Gets any errors generated by the .NET Framework data provider when the Command executes. (Inherited from RowUpdatingEventArgs.)
Row | Gets the DataRow that will be sent to the server as part of an insert, update, or delete operation. (Inherited from RowUpdatingEventArgs.)
StatementType | Gets the type of SQL statement to execute. (Inherited from RowUpdatingEventArgs.)
Status | Gets or sets the UpdateStatus of the Command property. (Inherited from RowUpdatingEventArgs.)
TableMapping | Gets the DataTableMapping to send through the Update(DataSet). (Inherited from RowUpdatingEventArgs.)

See Also

MySqlRowUpdatingEventArgs Class


MySqlRowUpdatingEventArgs Constructor

[image]

MySQL Connector/Net
MySqlRowUpdatingEventArgs Constructor
MySqlRowUpdatingEventArgs Class See Also Send Feedback
Initializes a new instance of the MySqlRowUpdatingEventArgs class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlRowUpdatingEventArgs(
    DataRow row,
    IDbCommand command,
    StatementType statementType,
    DataTableMapping tableMapping
)
Visual Basic (Declaration)
Public Sub New ( _
    row As DataRow, _
    command As IDbCommand, _
    statementType As StatementType, _
    tableMapping As DataTableMapping _
)
Visual C++
public:
MySqlRowUpdatingEventArgs(
    DataRow^ row,
    IDbCommand^ command,
    StatementType statementType,
    DataTableMapping^ tableMapping
)

Parameters

row
Type: System.Data..::.DataRow
The DataRow to Update(DataSet).
command
Type: System.Data..::.IDbCommand
The IDbCommand to execute during Update(DataSet).
statementType
Type: System.Data..::.StatementType
One of the StatementType values that specifies the type of query executed.
tableMapping
Type: System.Data.Common..::.DataTableMapping
The DataTableMapping sent through an Update(DataSet).

See Also

MySqlRowUpdatingEventArgs Class


MySqlRowUpdatingEventArgs Methods

[image] [image]

MySQL Connector/Net
MySqlRowUpdatingEventArgs Methods
MySqlRowUpdatingEventArgs Class See Also Send Feedback

The MySqlRowUpdatingEventArgs type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlRowUpdatingEventArgs Class


MySqlRowUpdatingEventArgs Properties

[image] [image]

MySQL Connector/Net
MySqlRowUpdatingEventArgs Properties
MySqlRowUpdatingEventArgs Class See Also Send Feedback

The MySqlRowUpdatingEventArgs type exposes the following members.

Properties

Name | Description
BaseCommand | Gets or sets the IDbCommand object for an instance of this class. (Inherited from RowUpdatingEventArgs.)
Command | Gets or sets the MySqlCommand to execute when performing the Update.
Errors | Gets any errors generated by the .NET Framework data provider when the Command executes. (Inherited from RowUpdatingEventArgs.)
Row | Gets the DataRow that will be sent to the server as part of an insert, update, or delete operation. (Inherited from RowUpdatingEventArgs.)
StatementType | Gets the type of SQL statement to execute. (Inherited from RowUpdatingEventArgs.)
Status | Gets or sets the UpdateStatus of the Command property. (Inherited from RowUpdatingEventArgs.)
TableMapping | Gets the DataTableMapping to send through the Update(DataSet). (Inherited from RowUpdatingEventArgs.)

See Also

MySqlRowUpdatingEventArgs Class


Command Property

[image]

MySQL Connector/Net
MySqlRowUpdatingEventArgs..::.Command Property
MySqlRowUpdatingEventArgs Class See Also Send Feedback
Gets or sets the MySqlCommand to execute when performing the Update.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlCommand Command { get; set; }
Visual Basic (Declaration)
Public Property Command As MySqlCommand
Visual C++
public:
property MySqlCommand^ Command {
    MySqlCommand^ get ();
    void set (MySqlCommand^ value);
}

See Also

MySqlRowUpdatingEventArgs Class


MySqlRowUpdatingEventHandler Delegate

[image]

MySQL Connector/Net
MySqlRowUpdatingEventHandler Delegate
See Also Send Feedback
Represents the method that will handle the RowUpdating event of a MySqlDataAdapter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public delegate void MySqlRowUpdatingEventHandler(
    Object sender,
    MySqlRowUpdatingEventArgs e
)
Visual Basic (Declaration)
Public Delegate Sub MySqlRowUpdatingEventHandler ( _
    sender As Object, _
    e As MySqlRowUpdatingEventArgs _
)
Visual C++
public delegate void MySqlRowUpdatingEventHandler(
    Object^ sender,
    MySqlRowUpdatingEventArgs^ e
)

Parameters

sender
Type: System..::.Object
e
Type: MySql.Data.MySqlClient..::.MySqlRowUpdatingEventArgs

See Also


MySqlScript Class

[image]

MySQL Connector/Net
MySqlScript Class
Members See Also Send Feedback
Provides a class capable of executing a SQL script containing multiple SQL statements including CREATE PROCEDURE statements that require changing the delimiter

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public class MySqlScript
Visual Basic (Declaration)
Public Class MySqlScript
Visual C++
public ref class MySqlScript

Inheritance Hierarchy

System..::.Object
MySql.Data.MySqlClient..::.MySqlScript

See Also

MySqlScript Members


MySqlScript Members

[image] [image]

MySQL Connector/Net
MySqlScript Members
MySqlScript Class Constructors Methods Properties Events See Also Send Feedback

The MySqlScript type exposes the following members.

Constructors

Name | Description
MySqlScript | Overloaded.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Execute | Executes this instance.
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Connection | Gets or sets the connection.
Delimiter | Gets or sets the delimiter.
Query | Gets or sets the query.

Events

Name | Description
Error |
ScriptCompleted |
StatementExecuted |

See Also

MySqlScript Class


MySqlScript Constructor

[image] [image]

MySQL Connector/Net
MySqlScript Constructor
MySqlScript Class See Also Send Feedback

Overload List

Name | Description
MySqlScript()()() | Initializes a new instance of the MySqlScript class.
MySqlScript(MySqlConnection) | Initializes a new instance of the MySqlScript class.
MySqlScript(String) | Initializes a new instance of the MySqlScript class.
MySqlScript(MySqlConnection, String) | Initializes a new instance of the MySqlScript class.

See Also

MySqlScript Class
MySqlScript Members


MySqlScript Constructor

[image]

MySQL Connector/Net
MySqlScript Constructor
MySqlScript Class See Also Send Feedback
Initializes a new instance of the MySqlScript class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlScript()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlScript()

See Also

MySqlScript Class
MySqlScript Overload


MySqlScript Constructor (MySqlConnection)

[image]

MySQL Connector/Net
MySqlScript Constructor (MySqlConnection)
MySqlScript Class See Also Send Feedback
Initializes a new instance of the MySqlScript class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlScript(
    MySqlConnection connection
)
Visual Basic (Declaration)
Public Sub New ( _
    connection As MySqlConnection _
)
Visual C++
public:
MySqlScript(
    MySqlConnection^ connection
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
The connection.

See Also

MySqlScript Class
MySqlScript Overload


MySqlScript Constructor (String)

[image]

MySQL Connector/Net
MySqlScript Constructor (String)
MySqlScript Class See Also Send Feedback
Initializes a new instance of the MySqlScript class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlScript(
    string query
)
Visual Basic (Declaration)
Public Sub New ( _
    query As String _
)
Visual C++
public:
MySqlScript(
    String^ query
)

Parameters

query
Type: System..::.String
The query.

See Also

MySqlScript Class
MySqlScript Overload


MySqlScript Constructor (MySqlConnection, String)

[image]

MySQL Connector/Net
MySqlScript Constructor (MySqlConnection, String)
MySqlScript Class See Also Send Feedback
Initializes a new instance of the MySqlScript class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlScript(
    MySqlConnection connection,
    string query
)
Visual Basic (Declaration)
Public Sub New ( _
    connection As MySqlConnection, _
    query As String _
)
Visual C++
public:
MySqlScript(
    MySqlConnection^ connection,
    String^ query
)

Parameters

connection
Type: MySql.Data.MySqlClient..::.MySqlConnection
The connection.
query
Type: System..::.String
The query.

See Also

MySqlScript Class
MySqlScript Overload


MySqlScript Methods

[image] [image]

MySQL Connector/Net
MySqlScript Methods
MySqlScript Class See Also Send Feedback

The MySqlScript type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Execute | Executes this instance.
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlScript Class


Execute Method

[image]

MySQL Connector/Net
MySqlScript..::.Execute Method
MySqlScript Class See Also Send Feedback
Executes this instance.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Execute()
Visual Basic (Declaration)
Public Function Execute As Integer
Visual C++
public:
int Execute()

Return Value

The number of statements executed as part of the script.

See Also

MySqlScript Class


MySqlScript Properties

[image] [image]

MySQL Connector/Net
MySqlScript Properties
MySqlScript Class See Also Send Feedback

The MySqlScript type exposes the following members.

Properties

Name | Description
Connection | Gets or sets the connection.
Delimiter | Gets or sets the delimiter.
Query | Gets or sets the query.

See Also

MySqlScript Class


Connection Property

[image]

MySQL Connector/Net
MySqlScript..::.Connection Property
MySqlScript Class See Also Send Feedback
Gets or sets the connection.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnection Connection { get; set; }
Visual Basic (Declaration)
Public Property Connection As MySqlConnection
Visual C++
public:
property MySqlConnection^ Connection {
    MySqlConnection^ get ();
    void set (MySqlConnection^ value);
}

Field Value

The connection.

See Also

MySqlScript Class


Delimiter Property

[image]

MySQL Connector/Net
MySqlScript..::.Delimiter Property
MySqlScript Class See Also Send Feedback
Gets or sets the delimiter.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string Delimiter { get; set; }
Visual Basic (Declaration)
Public Property Delimiter As String
Visual C++
public:
property String^ Delimiter {
    String^ get ();
    void set (String^ value);
}

Field Value

The delimiter.

See Also

MySqlScript Class


Query Property

[image]

MySQL Connector/Net
MySqlScript..::.Query Property
MySqlScript Class See Also Send Feedback
Gets or sets the query.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string Query { get; set; }
Visual Basic (Declaration)
Public Property Query As String
Visual C++
public:
property String^ Query {
    String^ get ();
    void set (String^ value);
}

Field Value

The query.

See Also

MySqlScript Class


MySqlScript Events

[image] [image]

MySQL Connector/Net
MySqlScript Events
MySqlScript Class See Also Send Feedback

The MySqlScript type exposes the following members.

Events

Name | Description
Error |
ScriptCompleted |
StatementExecuted |

See Also

MySqlScript Class


Error Event

[image]

MySQL Connector/Net
MySqlScript..::.Error Event
MySqlScript Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public event MySqlScriptErrorEventHandler Error
Visual Basic (Declaration)
Public Event Error As MySqlScriptErrorEventHandler
Visual C++
public:
 event MySqlScriptErrorEventHandler^ Error {
    void add (MySqlScriptErrorEventHandler^ value);
    void remove (MySqlScriptErrorEventHandler^ value);
}

See Also

MySqlScript Class


ScriptCompleted Event

[image]

MySQL Connector/Net
MySqlScript..::.ScriptCompleted Event
MySqlScript Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public event EventHandler ScriptCompleted
Visual Basic (Declaration)
Public Event ScriptCompleted As EventHandler
Visual C++
public:
 event EventHandler^ ScriptCompleted {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}

See Also

MySqlScript Class


StatementExecuted Event

[image]

MySQL Connector/Net
MySqlScript..::.StatementExecuted Event
MySqlScript Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public event MySqlStatementExecutedEventHandler StatementExecuted
Visual Basic (Declaration)
Public Event StatementExecuted As MySqlStatementExecutedEventHandler
Visual C++
public:
 event MySqlStatementExecutedEventHandler^ StatementExecuted {
    void add (MySqlStatementExecutedEventHandler^ value);
    void remove (MySqlStatementExecutedEventHandler^ value);
}

See Also

MySqlScript Class


MySqlScriptErrorEventArgs Class

[image]

MySQL Connector/Net
MySqlScriptErrorEventArgs Class
Members See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public class MySqlScriptErrorEventArgs : MySqlScriptEventArgs
Visual Basic (Declaration)
Public Class MySqlScriptErrorEventArgs _
    Inherits MySqlScriptEventArgs
Visual C++
public ref class MySqlScriptErrorEventArgs : public MySqlScriptEventArgs

Inheritance Hierarchy

System..::.Object
System..::.EventArgs
MySql.Data.MySqlClient..::.MySqlScriptEventArgs
MySql.Data.MySqlClient..::.MySqlScriptErrorEventArgs

See Also

MySqlScriptErrorEventArgs Members


MySqlScriptErrorEventArgs Members

[image] [image]

MySQL Connector/Net
MySqlScriptErrorEventArgs Members
MySqlScriptErrorEventArgs Class Constructors Methods Properties See Also Send Feedback

The MySqlScriptErrorEventArgs type exposes the following members.

Constructors

Name | Description
MySqlScriptErrorEventArgs | Initializes a new instance of the MySqlScriptErrorEventArgs class.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Exception | Gets the exception.
Ignore | Gets or sets a value indicating whether this MySqlScriptErrorEventArgs is ignore.
Line | Gets the line. (Inherited from MySqlScriptEventArgs.)
Position | Gets the position. (Inherited from MySqlScriptEventArgs.)
StatementText | Gets the statement text. (Inherited from MySqlScriptEventArgs.)

See Also

MySqlScriptErrorEventArgs Class


MySqlScriptErrorEventArgs Constructor

[image]

MySQL Connector/Net
MySqlScriptErrorEventArgs Constructor
MySqlScriptErrorEventArgs Class See Also Send Feedback
Initializes a new instance of the MySqlScriptErrorEventArgs class.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlScriptErrorEventArgs(
    Exception exception
)
Visual Basic (Declaration)
Public Sub New ( _
    exception As Exception _
)
Visual C++
public:
MySqlScriptErrorEventArgs(
    Exception^ exception
)

Parameters

exception
Type: System..::.Exception
The exception.

See Also

MySqlScriptErrorEventArgs Class


MySqlScriptErrorEventArgs Methods

[image] [image]

MySQL Connector/Net
MySqlScriptErrorEventArgs Methods
MySqlScriptErrorEventArgs Class See Also Send Feedback

The MySqlScriptErrorEventArgs type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlScriptErrorEventArgs Class


MySqlScriptErrorEventArgs Properties

[image] [image]

MySQL Connector/Net
MySqlScriptErrorEventArgs Properties
MySqlScriptErrorEventArgs Class See Also Send Feedback

The MySqlScriptErrorEventArgs type exposes the following members.

Properties

Name | Description
Exception | Gets the exception.
Ignore | Gets or sets a value indicating whether this MySqlScriptErrorEventArgs is ignore.
Line | Gets the line. (Inherited from MySqlScriptEventArgs.)
Position | Gets the position. (Inherited from MySqlScriptEventArgs.)
StatementText | Gets the statement text. (Inherited from MySqlScriptEventArgs.)

See Also

MySqlScriptErrorEventArgs Class


Exception Property

[image]

MySQL Connector/Net
MySqlScriptErrorEventArgs..::.Exception Property
MySqlScriptErrorEventArgs Class See Also Send Feedback
Gets the exception.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public Exception Exception { get; }
Visual Basic (Declaration)
Public ReadOnly Property Exception As Exception
Visual C++
public:
property Exception^ Exception {
    Exception^ get ();
}

Field Value

The exception.

See Also

MySqlScriptErrorEventArgs Class


Ignore Property

[image]

MySQL Connector/Net
MySqlScriptErrorEventArgs..::.Ignore Property
MySqlScriptErrorEventArgs Class See Also Send Feedback
Gets or sets a value indicating whether this MySqlScriptErrorEventArgs is ignore.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool Ignore { get; set; }
Visual Basic (Declaration)
Public Property Ignore As Boolean
Visual C++
public:
property bool Ignore {
    bool get ();
    void set (bool value);
}

Field Value

true if ignore; otherwise, false.

See Also

MySqlScriptErrorEventArgs Class


MySqlScriptErrorEventHandler Delegate

[image]

MySQL Connector/Net
MySqlScriptErrorEventHandler Delegate
See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public delegate void MySqlScriptErrorEventHandler(
    Object sender,
    MySqlScriptErrorEventArgs args
)
Visual Basic (Declaration)
Public Delegate Sub MySqlScriptErrorEventHandler ( _
    sender As Object, _
    args As MySqlScriptErrorEventArgs _
)
Visual C++
public delegate void MySqlScriptErrorEventHandler(
    Object^ sender,
    MySqlScriptErrorEventArgs^ args
)

Parameters

sender
Type: System..::.Object
args
Type: MySql.Data.MySqlClient..::.MySqlScriptErrorEventArgs

See Also


MySqlScriptEventArgs Class

[image]

MySQL Connector/Net
MySqlScriptEventArgs Class
Members See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public class MySqlScriptEventArgs : EventArgs
Visual Basic (Declaration)
Public Class MySqlScriptEventArgs _
    Inherits EventArgs
Visual C++
public ref class MySqlScriptEventArgs : public EventArgs

Inheritance Hierarchy

System..::.Object
System..::.EventArgs
MySql.Data.MySqlClient..::.MySqlScriptEventArgs
MySql.Data.MySqlClient..::.MySqlScriptErrorEventArgs

See Also

MySqlScriptEventArgs Members


MySqlScriptEventArgs Members

[image] [image]

MySQL Connector/Net
MySqlScriptEventArgs Members
MySqlScriptEventArgs Class Constructors Methods Properties See Also Send Feedback

The MySqlScriptEventArgs type exposes the following members.

Constructors

Name | Description
MySqlScriptEventArgs |

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Line | Gets the line.
Position | Gets the position.
StatementText | Gets the statement text.

See Also

MySqlScriptEventArgs Class


MySqlScriptEventArgs Constructor

[image]

MySQL Connector/Net
MySqlScriptEventArgs Constructor
MySqlScriptEventArgs Class See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlScriptEventArgs()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySqlScriptEventArgs()

See Also

MySqlScriptEventArgs Class


MySqlScriptEventArgs Methods

[image] [image]

MySQL Connector/Net
MySqlScriptEventArgs Methods
MySqlScriptEventArgs Class See Also Send Feedback

The MySqlScriptEventArgs type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlScriptEventArgs Class


MySqlScriptEventArgs Properties

[image] [image]

MySQL Connector/Net
MySqlScriptEventArgs Properties
MySqlScriptEventArgs Class See Also Send Feedback

The MySqlScriptEventArgs type exposes the following members.

Properties

Name | Description
Line | Gets the line.
Position | Gets the position.
StatementText | Gets the statement text.

See Also

MySqlScriptEventArgs Class


Line Property

[image]

MySQL Connector/Net
MySqlScriptEventArgs..::.Line Property
MySqlScriptEventArgs Class See Also Send Feedback
Gets the line.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Line { get; }
Visual Basic (Declaration)
Public ReadOnly Property Line As Integer
Visual C++
public:
property int Line {
    int get ();
}

Field Value

The line.

See Also

MySqlScriptEventArgs Class


Position Property

[image]

MySQL Connector/Net
MySqlScriptEventArgs..::.Position Property
MySqlScriptEventArgs Class See Also Send Feedback
Gets the position.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Position { get; }
Visual Basic (Declaration)
Public ReadOnly Property Position As Integer
Visual C++
public:
property int Position {
    int get ();
}

Field Value

The position.

See Also

MySqlScriptEventArgs Class


StatementText Property

[image]

MySQL Connector/Net
MySqlScriptEventArgs..::.StatementText Property
MySqlScriptEventArgs Class See Also Send Feedback
Gets the statement text.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public string StatementText { get; }
Visual Basic (Declaration)
Public ReadOnly Property StatementText As String
Visual C++
public:
property String^ StatementText {
    String^ get ();
}

Field Value

The statement text.

See Also

MySqlScriptEventArgs Class


MySqlStatementExecutedEventHandler Delegate

[image]

MySQL Connector/Net
MySqlStatementExecutedEventHandler Delegate
See Also Send Feedback

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public delegate void MySqlStatementExecutedEventHandler(
    Object sender,
    MySqlScriptEventArgs args
)
Visual Basic (Declaration)
Public Delegate Sub MySqlStatementExecutedEventHandler ( _
    sender As Object, _
    args As MySqlScriptEventArgs _
)
Visual C++
public delegate void MySqlStatementExecutedEventHandler(
    Object^ sender,
    MySqlScriptEventArgs^ args
)

Parameters

sender
Type: System..::.Object
args
Type: MySql.Data.MySqlClient..::.MySqlScriptEventArgs

See Also


MySqlTransaction Class

[image]

MySQL Connector/Net
MySqlTransaction Class
Members Example See Also Send Feedback
Represents a SQL transaction to be made in a MySQL database. This class cannot be inherited.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySqlTransaction : DbTransaction
Visual Basic (Declaration)
Public NotInheritable Class MySqlTransaction _
    Inherits DbTransaction
Visual C++
public ref class MySqlTransaction sealed : public DbTransaction

Remarks

The application creates a MySqlTransaction object by calling BeginTransaction()()() on the MySqlConnection object. All subsequent operations associated with the transaction (for example, committing or aborting the transaction), are performed on the MySqlTransaction object.

Examples

The following example creates a MySqlConnection and a MySqlTransaction. It also demonstrates how to use the BeginTransaction()()(), Commit()()(), and Rollback()()() methods.
CopyVB.NET
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
CopyC#
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();
}
}

Inheritance Hierarchy

System..::.Object
System..::.MarshalByRefObject
System.Data.Common..::.DbTransaction
MySql.Data.MySqlClient..::.MySqlTransaction

See Also

MySqlTransaction Members


MySqlTransaction Members

[image] [image]

MySQL Connector/Net
MySqlTransaction Members
MySqlTransaction Class Methods Properties See Also Send Feedback

The MySqlTransaction type exposes the following members.

Methods

Name | Description
Commit | Commits the database transaction. (Overrides DbTransaction..::.Commit()()().)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
Rollback | Rolls back a transaction from a pending state. (Overrides DbTransaction..::.Rollback()()().)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
Connection | Gets the MySqlConnection object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.
DbConnection | Specifies the DbConnection object associated with the transaction. (Inherited from DbTransaction.)
IsolationLevel | Specifies the IsolationLevel for this transaction. (Overrides DbTransaction..::.IsolationLevel.)

See Also

MySqlTransaction Class


MySqlTransaction Methods

[image] [image]

MySQL Connector/Net
MySqlTransaction Methods
MySqlTransaction Class See Also Send Feedback

The MySqlTransaction type exposes the following members.

Methods

Name | Description
Commit | Commits the database transaction. (Overrides DbTransaction..::.Commit()()().)
CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Dispose | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
MemberwiseClone | Overloaded.
Rollback | Rolls back a transaction from a pending state. (Overrides DbTransaction..::.Rollback()()().)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySqlTransaction Class


Commit Method

[image]

MySQL Connector/Net
MySqlTransaction..::.Commit Method
MySqlTransaction Class Example See Also Send Feedback
Commits the database transaction.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Commit()
Visual Basic (Declaration)
Public Overrides Sub Commit
Visual C++
public:
virtual void Commit() override

Implements

IDbTransaction..::.Commit()()()

Remarks

The Commit method is equivalent to the MySQL SQL statement COMMIT.

Examples

The following example creates a MySqlConnection and a MySqlTransaction. It also demonstrates how to use the BeginTransaction()()(), Commit()()(), and Rollback methods.
CopyVB.NET
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
CopyC#
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();
}
}

See Also

MySqlTransaction Class


Dispose Method

[image] [image]

MySQL Connector/Net
MySqlTransaction..::.Dispose Method
MySqlTransaction Class See Also Send Feedback

Overload List

Name | Description
Dispose()()() | Releases the unmanaged resources used by the DbTransaction. (Inherited from DbTransaction.)
Dispose(Boolean) | Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources. (Inherited from DbTransaction.)

See Also

MySqlTransaction Class
MySqlTransaction Members


MemberwiseClone Method

[image] [image]

MySQL Connector/Net
MySqlTransaction..::.MemberwiseClone Method
MySqlTransaction Class See Also Send Feedback

Overload List

Name | Description
MemberwiseClone()()() | Creates a shallow copy of the current Object. (Inherited from Object.)
MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)

See Also

MySqlTransaction Class
MySqlTransaction Members


Rollback Method

[image]

MySQL Connector/Net
MySqlTransaction..::.Rollback Method
MySqlTransaction Class Example See Also Send Feedback
Rolls back a transaction from a pending state.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override void Rollback()
Visual Basic (Declaration)
Public Overrides Sub Rollback
Visual C++
public:
virtual void Rollback() override

Implements

IDbTransaction..::.Rollback()()()

Remarks

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).

Examples

The following example creates a MySqlConnection and a MySqlTransaction. It also demonstrates how to use the BeginTransaction()()(), Commit()()(), and Rollback methods.
CopyVB.NET
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
CopyC#
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();
}
}

See Also

MySqlTransaction Class


MySqlTransaction Properties

[image] [image]

MySQL Connector/Net
MySqlTransaction Properties
MySqlTransaction Class See Also Send Feedback

The MySqlTransaction type exposes the following members.

Properties

Name | Description
Connection | Gets the MySqlConnection object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.
DbConnection | Specifies the DbConnection object associated with the transaction. (Inherited from DbTransaction.)
IsolationLevel | Specifies the IsolationLevel for this transaction. (Overrides DbTransaction..::.IsolationLevel.)

See Also

MySqlTransaction Class


Connection Property

[image]

MySQL Connector/Net
MySqlTransaction..::.Connection Property
MySqlTransaction Class See Also Send Feedback
Gets the MySqlConnection object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConnection Connection { get; }
Visual Basic (Declaration)
Public ReadOnly Property Connection As MySqlConnection
Visual C++
public:
property MySqlConnection^ Connection {
    MySqlConnection^ get ();
}

Field Value

The MySqlConnection object associated with this transaction.

Remarks

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 BeginTransaction()()().

See Also

MySqlTransaction Class


IsolationLevel Property

[image]

MySQL Connector/Net
MySqlTransaction..::.IsolationLevel Property
MySqlTransaction Class See Also Send Feedback
Specifies the IsolationLevel for this transaction.

Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override IsolationLevel IsolationLevel { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property IsolationLevel As IsolationLevel
Visual C++
public:
virtual property IsolationLevel IsolationLevel {
    IsolationLevel get () override;
}

Field Value

The IsolationLevel for this transaction. The default is ReadCommitted.

Implements

IDbTransaction..::.IsolationLevel

Remarks

Parallel transactions are not supported. Therefore, the IsolationLevel applies to the entire transaction.

See Also

MySqlTransaction Class


MySql.Data.MySqlClient.Properties Namespace

[image]

MySQL Connector/Net
MySql.Data.MySqlClient.Properties Namespace
Send Feedback

Classes

Class | Description
Resources | A strongly-typed resource class, for looking up localized strings, etc.


Resources Class

[image]

MySQL Connector/Net
Resources Class
Members See Also Send Feedback
A strongly-typed resource class, for looking up localized strings, etc.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public class Resources
Visual Basic (Declaration)
Public Class Resources
Visual C++
public ref class Resources

Inheritance Hierarchy

System..::.Object
MySql.Data.MySqlClient.Properties..::.Resources

See Also

Resources Members
MySql.Data.MySqlClient.Properties Namespace


Resources Members

[image] [image]

MySQL Connector/Net
Resources Members
Resources Class Methods Properties See Also Send Feedback

The Resources type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
AdapterIsNull | Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter is null.
AdapterSelectIsNull | Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter's SelectCommand is null.
BadVersionFormat | Looks up a localized string similar to Version string not in acceptable format.
BufferCannotBeNull | Looks up a localized string similar to The buffer cannot be null.
BufferNotLargeEnough | Looks up a localized string similar to Buffer is not large enough.
CancelNeeds50 | Looks up a localized string similar to Canceling an executing query requires MySQL 5.0 or higher..
CancelNotSupported | Looks up a localized string similar to Canceling an active query is only supported on MySQL 5.0.0 and above. .
CBMultiTableNotSupported | Looks up a localized string similar to MySqlCommandBuilder does not support multi-table statements.
CBNoKeyColumn | Looks up a localized string similar to MySqlCommandBuilder cannot operate on tables with no unique or key columns.
ChaosNotSupported | Looks up a localized string similar to Chaos isolation level is not supported.
CommandTextNotInitialized | Looks up a localized string similar to The CommandText property has not been properly initialized..
ConnectionAlreadyOpen | Looks up a localized string similar to The connection is already open..
ConnectionBroken | Looks up a localized string similar to Connection unexpectedly terminated..
ConnectionMustBeOpen | Looks up a localized string similar to Connection must be valid and open.
ConnectionNotOpen | Looks up a localized string similar to The connection is not open..
ConnectionNotSet | Looks up a localized string similar to The connection property has not been set or is null..
CountCannotBeNegative | Looks up a localized string similar to Count cannot be negative.
CSNoSetLength | Looks up a localized string similar to SetLength is not a valid operation on CompressedStream.
Culture | Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class.
DataNotInSupportedFormat | Looks up a localized string similar to The given value was not in a supported format..
DataReaderOpen | Looks up a localized string similar to There is already an open DataReader associated with this Connection which must be closed first..
DistributedTxnNotSupported | Looks up a localized string similar to MySQL Connector/Net does not currently support distributed transactions..
ErrorCreatingSocket | Looks up a localized string similar to Error creating socket connection.
FatalErrorDuringExecute | Looks up a localized string similar to Fatal error encountered during command execution..
FatalErrorDuringRead | Looks up a localized string similar to Fatal error encountered during data read..
FatalErrorReadingResult | Looks up a localized string similar to Fatal error encountered attempting to read the resultset..
FromAndLengthTooBig | Looks up a localized string similar to From index and length use more bytes than from contains.
FromIndexMustBeValid | Looks up a localized string similar to From index must be a valid index inside the from buffer.
HardProcQuery | Looks up a localized string similar to Retrieving procedure metadata for {0} from server..
ImproperValueFormat | Looks up a localized string similar to Value has an unsupported format..
IncorrectTransmission | Looks up a localized string similar to An incorrect response was received from the server..
IndexAndLengthTooBig | Looks up a localized string similar to Index and length use more bytes than to has room for.
IndexMustBeValid | Looks up a localized string similar to Index must be a valid position in the buffer.
InvalidProcName | Looks up a localized string similar to Procedure or function '{0}' cannot be found in database '{1}'..
KeywordNoNull | Looks up a localized string similar to Keyword does not allow null values..
KeywordNotSupported | Looks up a localized string similar to Keyword not supported..
MixingUpdatedRowSource | Looks up a localized string similar to When MySqlCommandBuilder.ReturnGeneratedIdentifiers is true, MySqlCommand.UpdatedRowSource must be set to None..
MultipleConnectionsInTransactionNotSupported | Looks up a localized string similar to Multiple simultaneous connections or connections with different connection strings inside the same transaction are not currently supported..
NamedPipeNoSeek | Looks up a localized string similar to NamedPipeStream does not support seeking.
NamedPipeNoSetLength | Looks up a localized string similar to NamedPipeStream doesn't support SetLength.
NextResultIsClosed | Looks up a localized string similar to Invalid attempt to call NextResult when the reader is closed..
NoBodiesAndTypeNotSet | 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..
NoNestedTransactions | Looks up a localized string similar to Nested transactions are not supported..
ObjectDisposed | Looks up a localized string similar to The object is not open or has been disposed..
OffsetCannotBeNegative | Looks up a localized string similar to Offset cannot be negative.
OffsetMustBeValid | Looks up a localized string similar to Offset must be a valid position in buffer.
ParameterAlreadyDefined | Looks up a localized string similar to Parameter '{0}' has already been defined..
ParameterCannotBeNegative | Looks up a localized string similar to Parameter cannot have a negative value.
ParameterCannotBeNull | Looks up a localized string similar to Parameter cannot be null.
ParameterIsInvalid | Looks up a localized string similar to Parameter is invalid..
ParameterMustBeDefined | Looks up a localized string similar to Parameter '{0}' must be defined..
ParameterNotFoundDuringPrepare | Looks up a localized string similar to Parameter '{0}' was not found during prepare..
PasswordMustHaveLegalChars | Looks up a localized string similar to Password must be valid and contain length characters.
PerfMonCategoryHelp | Looks up a localized string similar to This category includes a series of counters for MySQL..
PerfMonCategoryName | Looks up a localized string similar to .NET Data Provider for MySQL.
PerfMonHardProcHelp | Looks up a localized string similar to The number of times a procedures metadata had to be queried from the server..
PerfMonHardProcName | Looks up a localized string similar to Hard Procedure Queries.
PerfMonSoftProcHelp | Looks up a localized string similar to The number of times a procedures metadata was retrieved from the client-side cache..
PerfMonSoftProcName | Looks up a localized string similar to Soft Procedure Queries.
ProcAndFuncSameName | Looks up a localized string similar to same name are not supported..
QueryTooLarge | Looks up a localized string similar to Packets larger than max_allowed_packet are not allowed..
ReadFromStreamFailed | Looks up a localized string similar to Reading from the stream has failed..
ResourceManager | Returns the cached ResourceManager instance used by this class.
RoutineNotFound | 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..
SocketNoSeek | Looks up a localized string similar to Socket streams do not support seeking.
SoftProcQuery | Looks up a localized string similar to Retrieving procedure metadata for {0} from procedure cache..
SPNotSupported | Looks up a localized string similar to Stored procedures are not supported on this version of MySQL.
StreamAlreadyClosed | Looks up a localized string similar to The stream has already been closed.
StreamNoRead | Looks up a localized string similar to The stream does not support reading.
StreamNoWrite | Looks up a localized string similar to The stream does not support writing.
Timeout | 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..
TimeoutGettingConnection | 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..
UnableToConnectToHost | Looks up a localized string similar to Unable to connect to any of the specified MySQL hosts..
UnableToEnumerateUDF | 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?.
UnableToExecuteSP | Looks up a localized string similar to Unable to execute stored procedure '{0}'..
UnableToParseFK | Looks up a localized string similar to There was an error parsing the foreign key definition..
UnableToRetrieveParameters | Looks up a localized string similar to Unable to retrieve stored routine parameters. Either grant access to the routine or add the 'Use Procedure Bodies=false' option to your connection string..
UnableToRetrieveSProcData | Looks up a localized string similar to Unable to retrieve stored procedure metadata. Either grant SELECT privilege to mysql.proc for this user or use "use procedure bodies=false" with your connection string..
UnixSocketsNotSupported | Looks up a localized string similar to Unix sockets are not supported on Windows.
ValueNotSupportedForGuid | Looks up a localized string similar to The requested column value could not be treated as or conveted to a Guid..
WriteToStreamFailed | Looks up a localized string similar to Writing to the stream failed..
WrongParameterName | 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..

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


Resources Methods

[image] [image]

MySQL Connector/Net
Resources Methods
Resources Class See Also Send Feedback

The Resources type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


Resources Properties

[image] [image]

MySQL Connector/Net
Resources Properties
Resources Class See Also Send Feedback

The Resources type exposes the following members.

Properties

Name | Description
AdapterIsNull | Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter is null.
AdapterSelectIsNull | Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter's SelectCommand is null.
BadVersionFormat | Looks up a localized string similar to Version string not in acceptable format.
BufferCannotBeNull | Looks up a localized string similar to The buffer cannot be null.
BufferNotLargeEnough | Looks up a localized string similar to Buffer is not large enough.
CancelNeeds50 | Looks up a localized string similar to Canceling an executing query requires MySQL 5.0 or higher..
CancelNotSupported | Looks up a localized string similar to Canceling an active query is only supported on MySQL 5.0.0 and above. .
CBMultiTableNotSupported | Looks up a localized string similar to MySqlCommandBuilder does not support multi-table statements.
CBNoKeyColumn | Looks up a localized string similar to MySqlCommandBuilder cannot operate on tables with no unique or key columns.
ChaosNotSupported | Looks up a localized string similar to Chaos isolation level is not supported.
CommandTextNotInitialized | Looks up a localized string similar to The CommandText property has not been properly initialized..
ConnectionAlreadyOpen | Looks up a localized string similar to The connection is already open..
ConnectionBroken | Looks up a localized string similar to Connection unexpectedly terminated..
ConnectionMustBeOpen | Looks up a localized string similar to Connection must be valid and open.
ConnectionNotOpen | Looks up a localized string similar to The connection is not open..
ConnectionNotSet | Looks up a localized string similar to The connection property has not been set or is null..
CountCannotBeNegative | Looks up a localized string similar to Count cannot be negative.
CSNoSetLength | Looks up a localized string similar to SetLength is not a valid operation on CompressedStream.
Culture | Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class.
DataNotInSupportedFormat | Looks up a localized string similar to The given value was not in a supported format..
DataReaderOpen | Looks up a localized string similar to There is already an open DataReader associated with this Connection which must be closed first..
DistributedTxnNotSupported | Looks up a localized string similar to MySQL Connector/Net does not currently support distributed transactions..
ErrorCreatingSocket | Looks up a localized string similar to Error creating socket connection.
FatalErrorDuringExecute | Looks up a localized string similar to Fatal error encountered during command execution..
FatalErrorDuringRead | Looks up a localized string similar to Fatal error encountered during data read..
FatalErrorReadingResult | Looks up a localized string similar to Fatal error encountered attempting to read the resultset..
FromAndLengthTooBig | Looks up a localized string similar to From index and length use more bytes than from contains.
FromIndexMustBeValid | Looks up a localized string similar to From index must be a valid index inside the from buffer.
HardProcQuery | Looks up a localized string similar to Retrieving procedure metadata for {0} from server..
ImproperValueFormat | Looks up a localized string similar to Value has an unsupported format..
IncorrectTransmission | Looks up a localized string similar to An incorrect response was received from the server..
IndexAndLengthTooBig | Looks up a localized string similar to Index and length use more bytes than to has room for.
IndexMustBeValid | Looks up a localized string similar to Index must be a valid position in the buffer.
InvalidProcName | Looks up a localized string similar to Procedure or function '{0}' cannot be found in database '{1}'..
KeywordNoNull | Looks up a localized string similar to Keyword does not allow null values..
KeywordNotSupported | Looks up a localized string similar to Keyword not supported..
MixingUpdatedRowSource | Looks up a localized string similar to When MySqlCommandBuilder.ReturnGeneratedIdentifiers is true, MySqlCommand.UpdatedRowSource must be set to None..
MultipleConnectionsInTransactionNotSupported | Looks up a localized string similar to Multiple simultaneous connections or connections with different connection strings inside the same transaction are not currently supported..
NamedPipeNoSeek | Looks up a localized string similar to NamedPipeStream does not support seeking.
NamedPipeNoSetLength | Looks up a localized string similar to NamedPipeStream doesn't support SetLength.
NextResultIsClosed | Looks up a localized string similar to Invalid attempt to call NextResult when the reader is closed..
NoBodiesAndTypeNotSet | 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..
NoNestedTransactions | Looks up a localized string similar to Nested transactions are not supported..
ObjectDisposed | Looks up a localized string similar to The object is not open or has been disposed..
OffsetCannotBeNegative | Looks up a localized string similar to Offset cannot be negative.
OffsetMustBeValid | Looks up a localized string similar to Offset must be a valid position in buffer.
ParameterAlreadyDefined | Looks up a localized string similar to Parameter '{0}' has already been defined..
ParameterCannotBeNegative | Looks up a localized string similar to Parameter cannot have a negative value.
ParameterCannotBeNull | Looks up a localized string similar to Parameter cannot be null.
ParameterIsInvalid | Looks up a localized string similar to Parameter is invalid..
ParameterMustBeDefined | Looks up a localized string similar to Parameter '{0}' must be defined..
ParameterNotFoundDuringPrepare | Looks up a localized string similar to Parameter '{0}' was not found during prepare..
PasswordMustHaveLegalChars | Looks up a localized string similar to Password must be valid and contain length characters.
PerfMonCategoryHelp | Looks up a localized string similar to This category includes a series of counters for MySQL..
PerfMonCategoryName | Looks up a localized string similar to .NET Data Provider for MySQL.
PerfMonHardProcHelp | Looks up a localized string similar to The number of times a procedures metadata had to be queried from the server..
PerfMonHardProcName | Looks up a localized string similar to Hard Procedure Queries.
PerfMonSoftProcHelp | Looks up a localized string similar to The number of times a procedures metadata was retrieved from the client-side cache..
PerfMonSoftProcName | Looks up a localized string similar to Soft Procedure Queries.
ProcAndFuncSameName | Looks up a localized string similar to same name are not supported..
QueryTooLarge | Looks up a localized string similar to Packets larger than max_allowed_packet are not allowed..
ReadFromStreamFailed | Looks up a localized string similar to Reading from the stream has failed..
ResourceManager | Returns the cached ResourceManager instance used by this class.
RoutineNotFound | 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..
SocketNoSeek | Looks up a localized string similar to Socket streams do not support seeking.
SoftProcQuery | Looks up a localized string similar to Retrieving procedure metadata for {0} from procedure cache..
SPNotSupported | Looks up a localized string similar to Stored procedures are not supported on this version of MySQL.
StreamAlreadyClosed | Looks up a localized string similar to The stream has already been closed.
StreamNoRead | Looks up a localized string similar to The stream does not support reading.
StreamNoWrite | Looks up a localized string similar to The stream does not support writing.
Timeout | 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..
TimeoutGettingConnection | 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..
UnableToConnectToHost | Looks up a localized string similar to Unable to connect to any of the specified MySQL hosts..
UnableToEnumerateUDF | 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?.
UnableToExecuteSP | Looks up a localized string similar to Unable to execute stored procedure '{0}'..
UnableToParseFK | Looks up a localized string similar to There was an error parsing the foreign key definition..
UnableToRetrieveParameters | Looks up a localized string similar to Unable to retrieve stored routine parameters. Either grant access to the routine or add the 'Use Procedure Bodies=false' option to your connection string..
UnableToRetrieveSProcData | Looks up a localized string similar to Unable to retrieve stored procedure metadata. Either grant SELECT privilege to mysql.proc for this user or use "use procedure bodies=false" with your connection string..
UnixSocketsNotSupported | Looks up a localized string similar to Unix sockets are not supported on Windows.
ValueNotSupportedForGuid | Looks up a localized string similar to The requested column value could not be treated as or conveted to a Guid..
WriteToStreamFailed | Looks up a localized string similar to Writing to the stream failed..
WrongParameterName | 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..

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


AdapterIsNull Property

[image]

MySQL Connector/Net
Resources..::.AdapterIsNull Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter is null.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string AdapterIsNull { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property AdapterIsNull As String
Visual C++
public:
static property String^ AdapterIsNull {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


AdapterSelectIsNull Property

[image]

MySQL Connector/Net
Resources..::.AdapterSelectIsNull Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Improper MySqlCommandBuilder state: adapter's SelectCommand is null.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string AdapterSelectIsNull { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property AdapterSelectIsNull As String
Visual C++
public:
static property String^ AdapterSelectIsNull {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


BadVersionFormat Property

[image]

MySQL Connector/Net
Resources..::.BadVersionFormat Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Version string not in acceptable format.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string BadVersionFormat { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property BadVersionFormat As String
Visual C++
public:
static property String^ BadVersionFormat {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


BufferCannotBeNull Property

[image]

MySQL Connector/Net
Resources..::.BufferCannotBeNull Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The buffer cannot be null.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string BufferCannotBeNull { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property BufferCannotBeNull As String
Visual C++
public:
static property String^ BufferCannotBeNull {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


BufferNotLargeEnough Property

[image]

MySQL Connector/Net
Resources..::.BufferNotLargeEnough Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Buffer is not large enough.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string BufferNotLargeEnough { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property BufferNotLargeEnough As String
Visual C++
public:
static property String^ BufferNotLargeEnough {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


CancelNeeds50 Property

[image]

MySQL Connector/Net
Resources..::.CancelNeeds50 Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Canceling an executing query requires MySQL 5.0 or higher..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string CancelNeeds50 { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CancelNeeds50 As String
Visual C++
public:
static property String^ CancelNeeds50 {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


CancelNotSupported Property

[image]

MySQL Connector/Net
Resources..::.CancelNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Canceling an active query is only supported on MySQL 5.0.0 and above. .

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string CancelNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CancelNotSupported As String
Visual C++
public:
static property String^ CancelNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


CBMultiTableNotSupported Property

[image]

MySQL Connector/Net
Resources..::.CBMultiTableNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to MySqlCommandBuilder does not support multi-table statements.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string CBMultiTableNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CBMultiTableNotSupported As String
Visual C++
public:
static property String^ CBMultiTableNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


CBNoKeyColumn Property

[image]

MySQL Connector/Net
Resources..::.CBNoKeyColumn Property
Resources Class See Also Send Feedback
Looks up a localized string similar to MySqlCommandBuilder cannot operate on tables with no unique or key columns.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string CBNoKeyColumn { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CBNoKeyColumn As String
Visual C++
public:
static property String^ CBNoKeyColumn {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ChaosNotSupported Property

[image]

MySQL Connector/Net
Resources..::.ChaosNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Chaos isolation level is not supported.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ChaosNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ChaosNotSupported As String
Visual C++
public:
static property String^ ChaosNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


CommandTextNotInitialized Property

[image]

MySQL Connector/Net
Resources..::.CommandTextNotInitialized Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The CommandText property has not been properly initialized..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string CommandTextNotInitialized { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CommandTextNotInitialized As String
Visual C++
public:
static property String^ CommandTextNotInitialized {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ConnectionAlreadyOpen Property

[image]

MySQL Connector/Net
Resources..::.ConnectionAlreadyOpen Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The connection is already open..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ConnectionAlreadyOpen { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ConnectionAlreadyOpen As String
Visual C++
public:
static property String^ ConnectionAlreadyOpen {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ConnectionBroken Property

[image]

MySQL Connector/Net
Resources..::.ConnectionBroken Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Connection unexpectedly terminated..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ConnectionBroken { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ConnectionBroken As String
Visual C++
public:
static property String^ ConnectionBroken {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ConnectionMustBeOpen Property

[image]

MySQL Connector/Net
Resources..::.ConnectionMustBeOpen Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Connection must be valid and open.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ConnectionMustBeOpen { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ConnectionMustBeOpen As String
Visual C++
public:
static property String^ ConnectionMustBeOpen {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ConnectionNotOpen Property

[image]

MySQL Connector/Net
Resources..::.ConnectionNotOpen Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The connection is not open..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ConnectionNotOpen { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ConnectionNotOpen As String
Visual C++
public:
static property String^ ConnectionNotOpen {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ConnectionNotSet Property

[image]

MySQL Connector/Net
Resources..::.ConnectionNotSet Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The connection property has not been set or is null..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ConnectionNotSet { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ConnectionNotSet As String
Visual C++
public:
static property String^ ConnectionNotSet {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


CountCannotBeNegative Property

[image]

MySQL Connector/Net
Resources..::.CountCannotBeNegative Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Count cannot be negative.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string CountCannotBeNegative { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CountCannotBeNegative As String
Visual C++
public:
static property String^ CountCannotBeNegative {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


CSNoSetLength Property

[image]

MySQL Connector/Net
Resources..::.CSNoSetLength Property
Resources Class See Also Send Feedback
Looks up a localized string similar to SetLength is not a valid operation on CompressedStream.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string CSNoSetLength { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CSNoSetLength As String
Visual C++
public:
static property String^ CSNoSetLength {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


Culture Property

[image]

MySQL Connector/Net
Resources..::.Culture Property
Resources Class See Also Send Feedback
Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static CultureInfo Culture { get; set; }
Visual Basic (Declaration)
Public Shared Property Culture As CultureInfo
Visual C++
public:
static property CultureInfo^ Culture {
    CultureInfo^ get ();
    void set (CultureInfo^ value);
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


DataNotInSupportedFormat Property

[image]

MySQL Connector/Net
Resources..::.DataNotInSupportedFormat Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The given value was not in a supported format..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string DataNotInSupportedFormat { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property DataNotInSupportedFormat As String
Visual C++
public:
static property String^ DataNotInSupportedFormat {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


DataReaderOpen Property

[image]

MySQL Connector/Net
Resources..::.DataReaderOpen Property
Resources Class See Also Send Feedback
Looks up a localized string similar to There is already an open DataReader associated with this Connection which must be closed first..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string DataReaderOpen { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property DataReaderOpen As String
Visual C++
public:
static property String^ DataReaderOpen {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


DistributedTxnNotSupported Property

[image]

MySQL Connector/Net
Resources..::.DistributedTxnNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to MySQL Connector/Net does not currently support distributed transactions..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string DistributedTxnNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property DistributedTxnNotSupported As String
Visual C++
public:
static property String^ DistributedTxnNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ErrorCreatingSocket Property

[image]

MySQL Connector/Net
Resources..::.ErrorCreatingSocket Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Error creating socket connection.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ErrorCreatingSocket { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ErrorCreatingSocket As String
Visual C++
public:
static property String^ ErrorCreatingSocket {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


FatalErrorDuringExecute Property

[image]

MySQL Connector/Net
Resources..::.FatalErrorDuringExecute Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Fatal error encountered during command execution..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string FatalErrorDuringExecute { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property FatalErrorDuringExecute As String
Visual C++
public:
static property String^ FatalErrorDuringExecute {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


FatalErrorDuringRead Property

[image]

MySQL Connector/Net
Resources..::.FatalErrorDuringRead Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Fatal error encountered during data read..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string FatalErrorDuringRead { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property FatalErrorDuringRead As String
Visual C++
public:
static property String^ FatalErrorDuringRead {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


FatalErrorReadingResult Property

[image]

MySQL Connector/Net
Resources..::.FatalErrorReadingResult Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Fatal error encountered attempting to read the resultset..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string FatalErrorReadingResult { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property FatalErrorReadingResult As String
Visual C++
public:
static property String^ FatalErrorReadingResult {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


FromAndLengthTooBig Property

[image]

MySQL Connector/Net
Resources..::.FromAndLengthTooBig Property
Resources Class See Also Send Feedback
Looks up a localized string similar to From index and length use more bytes than from contains.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string FromAndLengthTooBig { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property FromAndLengthTooBig As String
Visual C++
public:
static property String^ FromAndLengthTooBig {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


FromIndexMustBeValid Property

[image]

MySQL Connector/Net
Resources..::.FromIndexMustBeValid Property
Resources Class See Also Send Feedback
Looks up a localized string similar to From index must be a valid index inside the from buffer.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string FromIndexMustBeValid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property FromIndexMustBeValid As String
Visual C++
public:
static property String^ FromIndexMustBeValid {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


HardProcQuery Property

[image]

MySQL Connector/Net
Resources..::.HardProcQuery Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Retrieving procedure metadata for {0} from server..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string HardProcQuery { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property HardProcQuery As String
Visual C++
public:
static property String^ HardProcQuery {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ImproperValueFormat Property

[image]

MySQL Connector/Net
Resources..::.ImproperValueFormat Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Value has an unsupported format..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ImproperValueFormat { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ImproperValueFormat As String
Visual C++
public:
static property String^ ImproperValueFormat {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


IncorrectTransmission Property

[image]

MySQL Connector/Net
Resources..::.IncorrectTransmission Property
Resources Class See Also Send Feedback
Looks up a localized string similar to An incorrect response was received from the server..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string IncorrectTransmission { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property IncorrectTransmission As String
Visual C++
public:
static property String^ IncorrectTransmission {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


IndexAndLengthTooBig Property

[image]

MySQL Connector/Net
Resources..::.IndexAndLengthTooBig Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Index and length use more bytes than to has room for.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string IndexAndLengthTooBig { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property IndexAndLengthTooBig As String
Visual C++
public:
static property String^ IndexAndLengthTooBig {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


IndexMustBeValid Property

[image]

MySQL Connector/Net
Resources..::.IndexMustBeValid Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Index must be a valid position in the buffer.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string IndexMustBeValid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property IndexMustBeValid As String
Visual C++
public:
static property String^ IndexMustBeValid {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


InvalidProcName Property

[image]

MySQL Connector/Net
Resources..::.InvalidProcName Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Procedure or function '{0}' cannot be found in database '{1}'..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string InvalidProcName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property InvalidProcName As String
Visual C++
public:
static property String^ InvalidProcName {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


KeywordNoNull Property

[image]

MySQL Connector/Net
Resources..::.KeywordNoNull Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Keyword does not allow null values..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string KeywordNoNull { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property KeywordNoNull As String
Visual C++
public:
static property String^ KeywordNoNull {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


KeywordNotSupported Property

[image]

MySQL Connector/Net
Resources..::.KeywordNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Keyword not supported..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string KeywordNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property KeywordNotSupported As String
Visual C++
public:
static property String^ KeywordNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


MixingUpdatedRowSource Property

[image]

MySQL Connector/Net
Resources..::.MixingUpdatedRowSource Property
Resources Class See Also Send Feedback
Looks up a localized string similar to When MySqlCommandBuilder.ReturnGeneratedIdentifiers is true, MySqlCommand.UpdatedRowSource must be set to None..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string MixingUpdatedRowSource { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property MixingUpdatedRowSource As String
Visual C++
public:
static property String^ MixingUpdatedRowSource {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


MultipleConnectionsInTransactionNotSupported Property

[image]

MySQL Connector/Net
Resources..::.MultipleConnectionsInTransactionNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Multiple simultaneous connections or connections with different connection strings inside the same transaction are not currently supported..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string MultipleConnectionsInTransactionNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property MultipleConnectionsInTransactionNotSupported As String
Visual C++
public:
static property String^ MultipleConnectionsInTransactionNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


NamedPipeNoSeek Property

[image]

MySQL Connector/Net
Resources..::.NamedPipeNoSeek Property
Resources Class See Also Send Feedback
Looks up a localized string similar to NamedPipeStream does not support seeking.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string NamedPipeNoSeek { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property NamedPipeNoSeek As String
Visual C++
public:
static property String^ NamedPipeNoSeek {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


NamedPipeNoSetLength Property

[image]

MySQL Connector/Net
Resources..::.NamedPipeNoSetLength Property
Resources Class See Also Send Feedback
Looks up a localized string similar to NamedPipeStream doesn't support SetLength.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string NamedPipeNoSetLength { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property NamedPipeNoSetLength As String
Visual C++
public:
static property String^ NamedPipeNoSetLength {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


NextResultIsClosed Property

[image]

MySQL Connector/Net
Resources..::.NextResultIsClosed Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Invalid attempt to call NextResult when the reader is closed..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string NextResultIsClosed { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property NextResultIsClosed As String
Visual C++
public:
static property String^ NextResultIsClosed {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


NoBodiesAndTypeNotSet Property

[image]

MySQL Connector/Net
Resources..::.NoBodiesAndTypeNotSet Property
Resources Class See Also Send Feedback
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..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string NoBodiesAndTypeNotSet { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property NoBodiesAndTypeNotSet As String
Visual C++
public:
static property String^ NoBodiesAndTypeNotSet {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


NoNestedTransactions Property

[image]

MySQL Connector/Net
Resources..::.NoNestedTransactions Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Nested transactions are not supported..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string NoNestedTransactions { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property NoNestedTransactions As String
Visual C++
public:
static property String^ NoNestedTransactions {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ObjectDisposed Property

[image]

MySQL Connector/Net
Resources..::.ObjectDisposed Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The object is not open or has been disposed..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ObjectDisposed { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ObjectDisposed As String
Visual C++
public:
static property String^ ObjectDisposed {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


OffsetCannotBeNegative Property

[image]

MySQL Connector/Net
Resources..::.OffsetCannotBeNegative Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Offset cannot be negative.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string OffsetCannotBeNegative { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property OffsetCannotBeNegative As String
Visual C++
public:
static property String^ OffsetCannotBeNegative {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


OffsetMustBeValid Property

[image]

MySQL Connector/Net
Resources..::.OffsetMustBeValid Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Offset must be a valid position in buffer.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string OffsetMustBeValid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property OffsetMustBeValid As String
Visual C++
public:
static property String^ OffsetMustBeValid {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ParameterAlreadyDefined Property

[image]

MySQL Connector/Net
Resources..::.ParameterAlreadyDefined Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Parameter '{0}' has already been defined..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ParameterAlreadyDefined { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ParameterAlreadyDefined As String
Visual C++
public:
static property String^ ParameterAlreadyDefined {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ParameterCannotBeNegative Property

[image]

MySQL Connector/Net
Resources..::.ParameterCannotBeNegative Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Parameter cannot have a negative value.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ParameterCannotBeNegative { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ParameterCannotBeNegative As String
Visual C++
public:
static property String^ ParameterCannotBeNegative {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ParameterCannotBeNull Property

[image]

MySQL Connector/Net
Resources..::.ParameterCannotBeNull Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Parameter cannot be null.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ParameterCannotBeNull { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ParameterCannotBeNull As String
Visual C++
public:
static property String^ ParameterCannotBeNull {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ParameterIsInvalid Property

[image]

MySQL Connector/Net
Resources..::.ParameterIsInvalid Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Parameter is invalid..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ParameterIsInvalid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ParameterIsInvalid As String
Visual C++
public:
static property String^ ParameterIsInvalid {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ParameterMustBeDefined Property

[image]

MySQL Connector/Net
Resources..::.ParameterMustBeDefined Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Parameter '{0}' must be defined..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ParameterMustBeDefined { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ParameterMustBeDefined As String
Visual C++
public:
static property String^ ParameterMustBeDefined {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ParameterNotFoundDuringPrepare Property

[image]

MySQL Connector/Net
Resources..::.ParameterNotFoundDuringPrepare Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Parameter '{0}' was not found during prepare..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ParameterNotFoundDuringPrepare { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ParameterNotFoundDuringPrepare As String
Visual C++
public:
static property String^ ParameterNotFoundDuringPrepare {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


PasswordMustHaveLegalChars Property

[image]

MySQL Connector/Net
Resources..::.PasswordMustHaveLegalChars Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Password must be valid and contain length characters.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordMustHaveLegalChars { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordMustHaveLegalChars As String
Visual C++
public:
static property String^ PasswordMustHaveLegalChars {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


PerfMonCategoryHelp Property

[image]

MySQL Connector/Net
Resources..::.PerfMonCategoryHelp Property
Resources Class See Also Send Feedback
Looks up a localized string similar to This category includes a series of counters for MySQL..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string PerfMonCategoryHelp { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PerfMonCategoryHelp As String
Visual C++
public:
static property String^ PerfMonCategoryHelp {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


PerfMonCategoryName Property

[image]

MySQL Connector/Net
Resources..::.PerfMonCategoryName Property
Resources Class See Also Send Feedback
Looks up a localized string similar to .NET Data Provider for MySQL.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string PerfMonCategoryName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PerfMonCategoryName As String
Visual C++
public:
static property String^ PerfMonCategoryName {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


PerfMonHardProcHelp Property

[image]

MySQL Connector/Net
Resources..::.PerfMonHardProcHelp Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The number of times a procedures metadata had to be queried from the server..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string PerfMonHardProcHelp { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PerfMonHardProcHelp As String
Visual C++
public:
static property String^ PerfMonHardProcHelp {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


PerfMonHardProcName Property

[image]

MySQL Connector/Net
Resources..::.PerfMonHardProcName Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Hard Procedure Queries.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string PerfMonHardProcName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PerfMonHardProcName As String
Visual C++
public:
static property String^ PerfMonHardProcName {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


PerfMonSoftProcHelp Property

[image]

MySQL Connector/Net
Resources..::.PerfMonSoftProcHelp Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The number of times a procedures metadata was retrieved from the client-side cache..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string PerfMonSoftProcHelp { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PerfMonSoftProcHelp As String
Visual C++
public:
static property String^ PerfMonSoftProcHelp {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


PerfMonSoftProcName Property

[image]

MySQL Connector/Net
Resources..::.PerfMonSoftProcName Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Soft Procedure Queries.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string PerfMonSoftProcName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PerfMonSoftProcName As String
Visual C++
public:
static property String^ PerfMonSoftProcName {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ProcAndFuncSameName Property

[image]

MySQL Connector/Net
Resources..::.ProcAndFuncSameName Property
Resources Class See Also Send Feedback
Looks up a localized string similar to same name are not supported..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ProcAndFuncSameName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ProcAndFuncSameName As String
Visual C++
public:
static property String^ ProcAndFuncSameName {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


QueryTooLarge Property

[image]

MySQL Connector/Net
Resources..::.QueryTooLarge Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Packets larger than max_allowed_packet are not allowed..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string QueryTooLarge { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property QueryTooLarge As String
Visual C++
public:
static property String^ QueryTooLarge {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ReadFromStreamFailed Property

[image]

MySQL Connector/Net
Resources..::.ReadFromStreamFailed Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Reading from the stream has failed..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ReadFromStreamFailed { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ReadFromStreamFailed As String
Visual C++
public:
static property String^ ReadFromStreamFailed {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ResourceManager Property

[image]

MySQL Connector/Net
Resources..::.ResourceManager Property
Resources Class See Also Send Feedback
Returns the cached ResourceManager instance used by this class.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static ResourceManager ResourceManager { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ResourceManager As ResourceManager
Visual C++
public:
static property ResourceManager^ ResourceManager {
    ResourceManager^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


RoutineNotFound Property

[image]

MySQL Connector/Net
Resources..::.RoutineNotFound Property
Resources Class See Also Send Feedback
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..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string RoutineNotFound { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property RoutineNotFound As String
Visual C++
public:
static property String^ RoutineNotFound {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


SocketNoSeek Property

[image]

MySQL Connector/Net
Resources..::.SocketNoSeek Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Socket streams do not support seeking.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string SocketNoSeek { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property SocketNoSeek As String
Visual C++
public:
static property String^ SocketNoSeek {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


SoftProcQuery Property

[image]

MySQL Connector/Net
Resources..::.SoftProcQuery Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Retrieving procedure metadata for {0} from procedure cache..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string SoftProcQuery { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property SoftProcQuery As String
Visual C++
public:
static property String^ SoftProcQuery {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


SPNotSupported Property

[image]

MySQL Connector/Net
Resources..::.SPNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Stored procedures are not supported on this version of MySQL.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string SPNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property SPNotSupported As String
Visual C++
public:
static property String^ SPNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


StreamAlreadyClosed Property

[image]

MySQL Connector/Net
Resources..::.StreamAlreadyClosed Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The stream has already been closed.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string StreamAlreadyClosed { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property StreamAlreadyClosed As String
Visual C++
public:
static property String^ StreamAlreadyClosed {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


StreamNoRead Property

[image]

MySQL Connector/Net
Resources..::.StreamNoRead Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The stream does not support reading.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string StreamNoRead { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property StreamNoRead As String
Visual C++
public:
static property String^ StreamNoRead {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


StreamNoWrite Property

[image]

MySQL Connector/Net
Resources..::.StreamNoWrite Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The stream does not support writing.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string StreamNoWrite { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property StreamNoWrite As String
Visual C++
public:
static property String^ StreamNoWrite {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


Timeout Property

[image]

MySQL Connector/Net
Resources..::.Timeout Property
Resources Class See Also Send Feedback
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..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string Timeout { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property Timeout As String
Visual C++
public:
static property String^ Timeout {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


TimeoutGettingConnection Property

[image]

MySQL Connector/Net
Resources..::.TimeoutGettingConnection Property
Resources Class See Also Send Feedback
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..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string TimeoutGettingConnection { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property TimeoutGettingConnection As String
Visual C++
public:
static property String^ TimeoutGettingConnection {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


UnableToConnectToHost Property

[image]

MySQL Connector/Net
Resources..::.UnableToConnectToHost Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Unable to connect to any of the specified MySQL hosts..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToConnectToHost { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToConnectToHost As String
Visual C++
public:
static property String^ UnableToConnectToHost {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


UnableToEnumerateUDF Property

[image]

MySQL Connector/Net
Resources..::.UnableToEnumerateUDF Property
Resources Class See Also Send Feedback
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?.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToEnumerateUDF { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToEnumerateUDF As String
Visual C++
public:
static property String^ UnableToEnumerateUDF {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


UnableToExecuteSP Property

[image]

MySQL Connector/Net
Resources..::.UnableToExecuteSP Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Unable to execute stored procedure '{0}'..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToExecuteSP { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToExecuteSP As String
Visual C++
public:
static property String^ UnableToExecuteSP {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


UnableToParseFK Property

[image]

MySQL Connector/Net
Resources..::.UnableToParseFK Property
Resources Class See Also Send Feedback
Looks up a localized string similar to There was an error parsing the foreign key definition..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToParseFK { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToParseFK As String
Visual C++
public:
static property String^ UnableToParseFK {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


UnableToRetrieveParameters Property

[image]

MySQL Connector/Net
Resources..::.UnableToRetrieveParameters Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Unable to retrieve stored routine parameters. Either grant access to the routine or add the 'Use Procedure Bodies=false' option to your connection string..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToRetrieveParameters { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToRetrieveParameters As String
Visual C++
public:
static property String^ UnableToRetrieveParameters {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


UnableToRetrieveSProcData Property

[image]

MySQL Connector/Net
Resources..::.UnableToRetrieveSProcData Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Unable to retrieve stored procedure metadata. Either grant SELECT privilege to mysql.proc for this user or use "use procedure bodies=false" with your connection string..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToRetrieveSProcData { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToRetrieveSProcData As String
Visual C++
public:
static property String^ UnableToRetrieveSProcData {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


UnixSocketsNotSupported Property

[image]

MySQL Connector/Net
Resources..::.UnixSocketsNotSupported Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Unix sockets are not supported on Windows.

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string UnixSocketsNotSupported { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnixSocketsNotSupported As String
Visual C++
public:
static property String^ UnixSocketsNotSupported {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


ValueNotSupportedForGuid Property

[image]

MySQL Connector/Net
Resources..::.ValueNotSupportedForGuid Property
Resources Class See Also Send Feedback
Looks up a localized string similar to The requested column value could not be treated as or conveted to a Guid..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string ValueNotSupportedForGuid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ValueNotSupportedForGuid As String
Visual C++
public:
static property String^ ValueNotSupportedForGuid {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


WriteToStreamFailed Property

[image]

MySQL Connector/Net
Resources..::.WriteToStreamFailed Property
Resources Class See Also Send Feedback
Looks up a localized string similar to Writing to the stream failed..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string WriteToStreamFailed { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property WriteToStreamFailed As String
Visual C++
public:
static property String^ WriteToStreamFailed {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


WrongParameterName Property

[image]

MySQL Connector/Net
Resources..::.WrongParameterName Property
Resources Class See Also Send Feedback
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..

Namespace: MySql.Data.MySqlClient.Properties
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static string WrongParameterName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property WrongParameterName As String
Visual C++
public:
static property String^ WrongParameterName {
    String^ get ();
}

See Also

Resources Class
MySql.Data.MySqlClient.Properties Namespace


MySql.Data.Types Namespace

[image]

MySQL Connector/Net
MySql.Data.Types Namespace
Send Feedback

Classes

Class | Description
MySqlConversionException | Summary description for MySqlConversionException.

Structures

Structure | Description
MySqlDateTime |


MySqlConversionException Class

[image]

MySQL Connector/Net
MySqlConversionException Class
Members See Also Send Feedback
Summary description for MySqlConversionException.

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
[SerializableAttribute]
public class MySqlConversionException : Exception
Visual Basic (Declaration)
<SerializableAttribute> _
Public Class MySqlConversionException _
    Inherits Exception
Visual C++
[SerializableAttribute]
public ref class MySqlConversionException : public Exception

Inheritance Hierarchy

System..::.Object
System..::.Exception
MySql.Data.Types..::.MySqlConversionException

See Also

MySqlConversionException Members
MySql.Data.Types Namespace


MySqlConversionException Members

[image] [image]

MySQL Connector/Net
MySqlConversionException Members
MySqlConversionException Class Constructors Methods Properties See Also Send Feedback

The MySqlConversionException type exposes the following members.

Constructors

Name | Description
MySqlConversionException | Ctor

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)

Properties

Name | Description
Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Message | Gets a message that describes the current exception. (Inherited from Exception.)
Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)

See Also

MySqlConversionException Class
MySql.Data.Types Namespace


MySqlConversionException Constructor

[image]

MySQL Connector/Net
MySqlConversionException Constructor
MySqlConversionException Class See Also Send Feedback
Ctor

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlConversionException(
    string msg
)
Visual Basic (Declaration)
Public Sub New ( _
    msg As String _
)
Visual C++
public:
MySqlConversionException(
    String^ msg
)

Parameters

msg
Type: System..::.String

See Also

MySqlConversionException Class
MySql.Data.Types Namespace


MySqlConversionException Methods

[image] [image]

MySQL Connector/Net
MySqlConversionException Methods
MySqlConversionException Class See Also Send Feedback

The MySqlConversionException type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from Exception.)
GetType | Gets the runtime type of the current instance. (Inherited from Exception.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Creates and returns a string representation of the current exception. (Inherited from Exception.)

See Also

MySqlConversionException Class
MySql.Data.Types Namespace


MySqlConversionException Properties

[image] [image]

MySQL Connector/Net
MySqlConversionException Properties
MySqlConversionException Class See Also Send Feedback

The MySqlConversionException type exposes the following members.

Properties

Name | Description
Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.)
HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.)
HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.)
InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.)
Message | Gets a message that describes the current exception. (Inherited from Exception.)
Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.)
StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.)
TargetSite | Gets the method that throws the current exception. (Inherited from Exception.)

See Also

MySqlConversionException Class
MySql.Data.Types Namespace


MySqlDateTime Structure

[image]

MySQL Connector/Net
MySqlDateTime Structure
Members See Also Send Feedback

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public struct MySqlDateTime : IConvertible,
    IComparable
Visual Basic (Declaration)
Public Structure MySqlDateTime _
    Implements IConvertible, IComparable
Visual C++
public value class MySqlDateTime : IConvertible,
    IComparable

See Also

MySqlDateTime Members
MySql.Data.Types Namespace


MySqlDateTime Members

[image] [image]

MySQL Connector/Net
MySqlDateTime Members
MySqlDateTime Structure Constructors Methods Properties See Also Send Feedback

The MySqlDateTime type exposes the following members.

Constructors

Name | Description
MySqlDateTime | Overloaded.

Methods

Name | Description
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetDateTime | Returns this value as a DateTime
GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a MySQL specific string representation of this value (Overrides ValueType..::.ToString()()().)

Operators

Name | Description
Explicit |

Properties

Name | Description
Day | Returns the day portion of this datetime
Hour | Returns the hour portion of this datetime
IsNull | Returns true if this datetime object has a null value
IsValidDateTime | Indicates if this object contains a value that can be represented as a DateTime
Millisecond | Retrieves the millisecond value of this object.
Minute | Returns the minute portion of this datetime
Month | Returns the month portion of this datetime
Second | Returns the second portion of this datetime
Value | Retrieves the value of this MySqlDateTime as a DateTime object.
Year | Returns the year portion of this datetime

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


MySqlDateTime Constructor

[image] [image]

MySQL Connector/Net
MySqlDateTime Constructor
MySqlDateTime Structure See Also Send Feedback

Overload List

Name | Description
MySqlDateTime(MySqlDateTime) | Constructs a new MySqlDateTime object by copying the current value of the given object.
MySqlDateTime(DateTime) | Constructs a new MySqlDateTime object by using values from the given DateTime object.
MySqlDateTime(String) | Enables the contruction of a MySqlDateTime object by parsing a string.
MySqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32) | Constructs a new MySqlDateTime object by setting the individual time properties to the given values.

See Also

MySqlDateTime Structure
MySqlDateTime Members
MySql.Data.Types Namespace


MySqlDateTime Constructor (MySqlDateTime)

[image]

MySQL Connector/Net
MySqlDateTime Constructor (MySqlDateTime)
MySqlDateTime Structure See Also Send Feedback
Constructs a new MySqlDateTime object by copying the current value of the given object.

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDateTime(
    MySqlDateTime mdt
)
Visual Basic (Declaration)
Public Sub New ( _
    mdt As MySqlDateTime _
)
Visual C++
public:
MySqlDateTime(
    MySqlDateTime mdt
)

Parameters

mdt
Type: MySql.Data.Types..::.MySqlDateTime
The MySqlDateTime object to copy.

See Also

MySqlDateTime Structure
MySqlDateTime Overload
MySql.Data.Types Namespace


MySqlDateTime Constructor (DateTime)

[image]

MySQL Connector/Net
MySqlDateTime Constructor (DateTime)
MySqlDateTime Structure See Also Send Feedback
Constructs a new MySqlDateTime object by using values from the given DateTime object.

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDateTime(
    DateTime dt
)
Visual Basic (Declaration)
Public Sub New ( _
    dt As DateTime _
)
Visual C++
public:
MySqlDateTime(
    DateTime dt
)

Parameters

dt
Type: System..::.DateTime
The DateTime object to copy.

See Also

MySqlDateTime Structure
MySqlDateTime Overload
MySql.Data.Types Namespace


MySqlDateTime Constructor (String)

[image]

MySQL Connector/Net
MySqlDateTime Constructor (String)
MySqlDateTime Structure See Also Send Feedback
Enables the contruction of a MySqlDateTime object by parsing a string.

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDateTime(
    string dateTime
)
Visual Basic (Declaration)
Public Sub New ( _
    dateTime As String _
)
Visual C++
public:
MySqlDateTime(
    String^ dateTime
)

Parameters

dateTime
Type: System..::.String

See Also

MySqlDateTime Structure
MySqlDateTime Overload
MySql.Data.Types Namespace


MySqlDateTime Constructor (Int32, Int32, Int32, Int32, Int32, Int32)

[image]

MySQL Connector/Net
MySqlDateTime Constructor (Int32, Int32, Int32, Int32, Int32, Int32)
MySqlDateTime Structure See Also Send Feedback
Constructs a new MySqlDateTime object by setting the individual time properties to the given values.

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public MySqlDateTime(
    int year,
    int month,
    int day,
    int hour,
    int minute,
    int second
)
Visual Basic (Declaration)
Public Sub New ( _
    year As Integer, _
    month As Integer, _
    day As Integer, _
    hour As Integer, _
    minute As Integer, _
    second As Integer _
)
Visual C++
public:
MySqlDateTime(
    int year,
    int month,
    int day,
    int hour,
    int minute,
    int second
)

Parameters

year
Type: System..::.Int32
The year to use.
month
Type: System..::.Int32
The month to use.
day
Type: System..::.Int32
The day to use.
hour
Type: System..::.Int32
The hour to use.
minute
Type: System..::.Int32
The minute to use.
second
Type: System..::.Int32
The second to use.

See Also

MySqlDateTime Structure
MySqlDateTime Overload
MySql.Data.Types Namespace


MySqlDateTime Methods

[image] [image]

MySQL Connector/Net
MySqlDateTime Methods
MySqlDateTime Structure See Also Send Feedback

The MySqlDateTime type exposes the following members.

Methods

Name | Description
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetDateTime | Returns this value as a DateTime
GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a MySQL specific string representation of this value (Overrides ValueType..::.ToString()()().)

Operators

Name | Description
Explicit |

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Explicit Operator

[image]

MySQL Connector/Net
MySqlDateTime..::.Explicit Operator
MySqlDateTime Structure See Also Send Feedback

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public static explicit operator DateTime (
    MySqlDateTime val
)
Visual Basic (Declaration)
Public Shared Narrowing Operator CType ( _
    val As MySqlDateTime _
) As DateTime
Visual C++
static explicit operator DateTime (
    MySqlDateTime val
)

Parameters

val
Type: MySql.Data.Types..::.MySqlDateTime

Return Value

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


GetDateTime Method

[image]

MySQL Connector/Net
MySqlDateTime..::.GetDateTime Method
MySqlDateTime Structure See Also Send Feedback
Returns this value as a DateTime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public DateTime GetDateTime()
Visual Basic (Declaration)
Public Function GetDateTime As DateTime
Visual C++
public:
DateTime GetDateTime()

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


ToString Method

[image]

MySQL Connector/Net
MySqlDateTime..::.ToString Method
MySqlDateTime Structure See Also Send Feedback
Returns a MySQL specific string representation of this value

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public override string ToString()
Visual Basic (Declaration)
Public Overrides Function ToString As String
Visual C++
public:
virtual String^ ToString() override

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


MySqlDateTime Properties

[image] [image]

MySQL Connector/Net
MySqlDateTime Properties
MySqlDateTime Structure See Also Send Feedback

The MySqlDateTime type exposes the following members.

Properties

Name | Description
Day | Returns the day portion of this datetime
Hour | Returns the hour portion of this datetime
IsNull | Returns true if this datetime object has a null value
IsValidDateTime | Indicates if this object contains a value that can be represented as a DateTime
Millisecond | Retrieves the millisecond value of this object.
Minute | Returns the minute portion of this datetime
Month | Returns the month portion of this datetime
Second | Returns the second portion of this datetime
Value | Retrieves the value of this MySqlDateTime as a DateTime object.
Year | Returns the year portion of this datetime

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Day Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Day Property
MySqlDateTime Structure See Also Send Feedback
Returns the day portion of this datetime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Day { get; set; }
Visual Basic (Declaration)
Public Property Day As Integer
Visual C++
public:
property int Day {
    int get ();
    void set (int value);
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Hour Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Hour Property
MySqlDateTime Structure See Also Send Feedback
Returns the hour portion of this datetime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Hour { get; set; }
Visual Basic (Declaration)
Public Property Hour As Integer
Visual C++
public:
property int Hour {
    int get ();
    void set (int value);
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


IsNull Property

[image]

MySQL Connector/Net
MySqlDateTime..::.IsNull Property
MySqlDateTime Structure See Also Send Feedback
Returns true if this datetime object has a null value

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool IsNull { get; }
Visual Basic (Declaration)
Public ReadOnly Property IsNull As Boolean
Visual C++
public:
virtual property bool IsNull {
    bool get () sealed;
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


IsValidDateTime Property

[image]

MySQL Connector/Net
MySqlDateTime..::.IsValidDateTime Property
MySqlDateTime Structure See Also Send Feedback
Indicates if this object contains a value that can be represented as a DateTime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public bool IsValidDateTime { get; }
Visual Basic (Declaration)
Public ReadOnly Property IsValidDateTime As Boolean
Visual C++
public:
property bool IsValidDateTime {
    bool get ();
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Millisecond Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Millisecond Property
MySqlDateTime Structure See Also Send Feedback
Retrieves the millisecond value of this object.

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Millisecond { get; set; }
Visual Basic (Declaration)
Public Property Millisecond As Integer
Visual C++
public:
property int Millisecond {
    int get ();
    void set (int value);
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Minute Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Minute Property
MySqlDateTime Structure See Also Send Feedback
Returns the minute portion of this datetime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Minute { get; set; }
Visual Basic (Declaration)
Public Property Minute As Integer
Visual C++
public:
property int Minute {
    int get ();
    void set (int value);
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Month Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Month Property
MySqlDateTime Structure See Also Send Feedback
Returns the month portion of this datetime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Month { get; set; }
Visual Basic (Declaration)
Public Property Month As Integer
Visual C++
public:
property int Month {
    int get ();
    void set (int value);
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Second Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Second Property
MySqlDateTime Structure See Also Send Feedback
Returns the second portion of this datetime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Second { get; set; }
Visual Basic (Declaration)
Public Property Second As Integer
Visual C++
public:
property int Second {
    int get ();
    void set (int value);
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Value Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Value Property
MySqlDateTime Structure See Also Send Feedback
Retrieves the value of this MySqlDateTime as a DateTime object.

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public DateTime Value { get; }
Visual Basic (Declaration)
Public ReadOnly Property Value As DateTime
Visual C++
public:
property DateTime Value {
    DateTime get ();
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


Year Property

[image]

MySQL Connector/Net
MySqlDateTime..::.Year Property
MySqlDateTime Structure See Also Send Feedback
Returns the year portion of this datetime

Namespace: MySql.Data.Types
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.0.4.0

Syntax

C#
public int Year { get; set; }
Visual Basic (Declaration)
Public Property Year As Integer
Visual C++
public:
property int Year {
    int get ();
    void set (int value);
}

See Also

MySqlDateTime Structure
MySql.Data.Types Namespace


MySql.Web.Common Namespace

[image]

MySQL Connector/Net
MySql.Web.Common Namespace
Send Feedback

Classes

Class | Description
SchemaManager |


SchemaManager Class

[image]

MySQL Connector/Net
SchemaManager Class
Members See Also Send Feedback

Namespace: MySql.Web.Common
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static class SchemaManager
Visual Basic (Declaration)
Public NotInheritable Class SchemaManager
Visual C++
public ref class SchemaManager abstract sealed

Inheritance Hierarchy

System..::.Object
MySql.Web.Common..::.SchemaManager

See Also

SchemaManager Members
MySql.Web.Common Namespace


SchemaManager Members

[image] [image]

MySQL Connector/Net
SchemaManager Members
SchemaManager Class Properties See Also Send Feedback

The SchemaManager type exposes the following members.

Properties

Name | Description
Version |

See Also

SchemaManager Class
MySql.Web.Common Namespace


SchemaManager Properties

[image] [image]

MySQL Connector/Net
SchemaManager Properties
SchemaManager Class See Also Send Feedback

The SchemaManager type exposes the following members.

Properties

Name | Description
Version |

See Also

SchemaManager Class
MySql.Web.Common Namespace


Version Property

[image]

MySQL Connector/Net
SchemaManager..::.Version Property
SchemaManager Class See Also Send Feedback

Namespace: MySql.Web.Common
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static int Version { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property Version As Integer
Visual C++
public:
static property int Version {
    int get ();
}

See Also

SchemaManager Class
MySql.Web.Common Namespace


MySql.Web.Profile Namespace

[image]

MySQL Connector/Net
MySql.Web.Profile Namespace
Send Feedback

Classes

Class | Description
MySQLProfileProvider |


MySQLProfileProvider Class

[image]

MySQL Connector/Net
MySQLProfileProvider Class
Members See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public class MySQLProfileProvider : ProfileProvider
Visual Basic (Declaration)
Public Class MySQLProfileProvider _
    Inherits ProfileProvider
Visual C++
public ref class MySQLProfileProvider : public ProfileProvider

Inheritance Hierarchy

System..::.Object
System.Configuration.Provider..::.ProviderBase
System.Configuration..::.SettingsProvider
System.Web.Profile..::.ProfileProvider
MySql.Web.Profile..::.MySQLProfileProvider

See Also

MySQLProfileProvider Members
MySql.Web.Profile Namespace


MySQLProfileProvider Members

[image] [image]

MySQL Connector/Net
MySQLProfileProvider Members
MySQLProfileProvider Class Constructors Methods Properties See Also Send Feedback

The MySQLProfileProvider type exposes the following members.

Constructors

Name | Description
MySQLProfileProvider |

Methods

Name | Description
DeleteInactiveProfiles | (Overrides ProfileProvider..::.DeleteInactiveProfiles(ProfileAuthenticationOption, DateTime).)
DeleteProfiles | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FindInactiveProfilesByUserName | (Overrides ProfileProvider..::.FindInactiveProfilesByUserName(ProfileAuthenticationOption, String, DateTime, Int32, Int32, Int32%).)
FindProfilesByUserName | (Overrides ProfileProvider..::.FindProfilesByUserName(ProfileAuthenticationOption, String, Int32, Int32, Int32%).)
GetAllInactiveProfiles | (Overrides ProfileProvider..::.GetAllInactiveProfiles(ProfileAuthenticationOption, DateTime, Int32, Int32, Int32%).)
GetAllProfiles | (Overrides ProfileProvider..::.GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32%).)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetNumberOfInactiveProfiles | (Overrides ProfileProvider..::.GetNumberOfInactiveProfiles(ProfileAuthenticationOption, DateTime).)
GetPropertyValues | (Overrides SettingsProvider..::.GetPropertyValues(SettingsContext, SettingsPropertyCollection).)
GetType | Gets the Type of the current instance. (Inherited from Object.)
Initialize | (Overrides ProviderBase..::.Initialize(String, NameValueCollection).)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
SetPropertyValues | (Overrides SettingsProvider..::.SetPropertyValues(SettingsContext, SettingsPropertyValueCollection).)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
ApplicationName | (Overrides SettingsProvider..::.ApplicationName.)
Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
Name | Gets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


MySQLProfileProvider Constructor

[image]

MySQL Connector/Net
MySQLProfileProvider Constructor
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public MySQLProfileProvider()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySQLProfileProvider()

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


MySQLProfileProvider Methods

[image] [image]

MySQL Connector/Net
MySQLProfileProvider Methods
MySQLProfileProvider Class See Also Send Feedback

The MySQLProfileProvider type exposes the following members.

Methods

Name | Description
DeleteInactiveProfiles | (Overrides ProfileProvider..::.DeleteInactiveProfiles(ProfileAuthenticationOption, DateTime).)
DeleteProfiles | Overloaded.
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FindInactiveProfilesByUserName | (Overrides ProfileProvider..::.FindInactiveProfilesByUserName(ProfileAuthenticationOption, String, DateTime, Int32, Int32, Int32%).)
FindProfilesByUserName | (Overrides ProfileProvider..::.FindProfilesByUserName(ProfileAuthenticationOption, String, Int32, Int32, Int32%).)
GetAllInactiveProfiles | (Overrides ProfileProvider..::.GetAllInactiveProfiles(ProfileAuthenticationOption, DateTime, Int32, Int32, Int32%).)
GetAllProfiles | (Overrides ProfileProvider..::.GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32%).)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetNumberOfInactiveProfiles | (Overrides ProfileProvider..::.GetNumberOfInactiveProfiles(ProfileAuthenticationOption, DateTime).)
GetPropertyValues | (Overrides SettingsProvider..::.GetPropertyValues(SettingsContext, SettingsPropertyCollection).)
GetType | Gets the Type of the current instance. (Inherited from Object.)
Initialize | (Overrides ProviderBase..::.Initialize(String, NameValueCollection).)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
SetPropertyValues | (Overrides SettingsProvider..::.SetPropertyValues(SettingsContext, SettingsPropertyValueCollection).)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


DeleteInactiveProfiles Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.DeleteInactiveProfiles Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int DeleteInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate
)
Visual Basic (Declaration)
Public Overrides Function DeleteInactiveProfiles ( _
    authenticationOption As ProfileAuthenticationOption, _
    userInactiveSinceDate As DateTime _
) As Integer
Visual C++
public:
virtual int DeleteInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate
) override

Parameters

authenticationOption
Type: System.Web.Profile..::.ProfileAuthenticationOption
userInactiveSinceDate
Type: System..::.DateTime

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


DeleteProfiles Method

[image] [image]

MySQL Connector/Net
MySQLProfileProvider..::.DeleteProfiles Method
MySQLProfileProvider Class See Also Send Feedback

Overload List

Name | Description
DeleteProfiles(array<String>[]()[]) | (Overrides ProfileProvider..::.DeleteProfiles(array<String>[]()[]).)
DeleteProfiles(ProfileInfoCollection) | (Overrides ProfileProvider..::.DeleteProfiles(ProfileInfoCollection).)

See Also

MySQLProfileProvider Class
MySQLProfileProvider Members
MySql.Web.Profile Namespace


DeleteProfiles Method (String[])

[image]

MySQL Connector/Net
MySQLProfileProvider..::.DeleteProfiles Method (array<String>[]()[])
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int DeleteProfiles(
    string[] usernames
)
Visual Basic (Declaration)
Public Overrides Function DeleteProfiles ( _
    usernames As String() _
) As Integer
Visual C++
public:
virtual int DeleteProfiles(
    array<String^>^ usernames
) override

Parameters

usernames
Type: array< System..::.String >[]()[]

See Also

MySQLProfileProvider Class
DeleteProfiles Overload
MySql.Web.Profile Namespace


DeleteProfiles Method (ProfileInfoCollection)

[image]

MySQL Connector/Net
MySQLProfileProvider..::.DeleteProfiles Method (ProfileInfoCollection)
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int DeleteProfiles(
    ProfileInfoCollection profiles
)
Visual Basic (Declaration)
Public Overrides Function DeleteProfiles ( _
    profiles As ProfileInfoCollection _
) As Integer
Visual C++
public:
virtual int DeleteProfiles(
    ProfileInfoCollection^ profiles
) override

Parameters

profiles
Type: System.Web.Profile..::.ProfileInfoCollection

See Also

MySQLProfileProvider Class
DeleteProfiles Overload
MySql.Web.Profile Namespace


FindInactiveProfilesByUserName Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.FindInactiveProfilesByUserName Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override ProfileInfoCollection FindInactiveProfilesByUserName(
    ProfileAuthenticationOption authenticationOption,
    string usernameToMatch,
    DateTime userInactiveSinceDate,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
Visual Basic (Declaration)
Public Overrides Function FindInactiveProfilesByUserName ( _
    authenticationOption As ProfileAuthenticationOption, _
    usernameToMatch As String, _
    userInactiveSinceDate As DateTime, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As ProfileInfoCollection
Visual C++
public:
virtual ProfileInfoCollection^ FindInactiveProfilesByUserName(
    ProfileAuthenticationOption authenticationOption,
    String^ usernameToMatch,
    DateTime userInactiveSinceDate,
    int pageIndex,
    int pageSize,
    [OutAttribute] int% totalRecords
) override

Parameters

authenticationOption
Type: System.Web.Profile..::.ProfileAuthenticationOption
usernameToMatch
Type: System..::.String
userInactiveSinceDate
Type: System..::.DateTime
pageIndex
Type: System..::.Int32
pageSize
Type: System..::.Int32
totalRecords
Type: System..::.Int32 %

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


FindProfilesByUserName Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.FindProfilesByUserName Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override ProfileInfoCollection FindProfilesByUserName(
    ProfileAuthenticationOption authenticationOption,
    string usernameToMatch,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
Visual Basic (Declaration)
Public Overrides Function FindProfilesByUserName ( _
    authenticationOption As ProfileAuthenticationOption, _
    usernameToMatch As String, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As ProfileInfoCollection
Visual C++
public:
virtual ProfileInfoCollection^ FindProfilesByUserName(
    ProfileAuthenticationOption authenticationOption,
    String^ usernameToMatch,
    int pageIndex,
    int pageSize,
    [OutAttribute] int% totalRecords
) override

Parameters

authenticationOption
Type: System.Web.Profile..::.ProfileAuthenticationOption
usernameToMatch
Type: System..::.String
pageIndex
Type: System..::.Int32
pageSize
Type: System..::.Int32
totalRecords
Type: System..::.Int32 %

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


GetAllInactiveProfiles Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.GetAllInactiveProfiles Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override ProfileInfoCollection GetAllInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
Visual Basic (Declaration)
Public Overrides Function GetAllInactiveProfiles ( _
    authenticationOption As ProfileAuthenticationOption, _
    userInactiveSinceDate As DateTime, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As ProfileInfoCollection
Visual C++
public:
virtual ProfileInfoCollection^ GetAllInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate,
    int pageIndex,
    int pageSize,
    [OutAttribute] int% totalRecords
) override

Parameters

authenticationOption
Type: System.Web.Profile..::.ProfileAuthenticationOption
userInactiveSinceDate
Type: System..::.DateTime
pageIndex
Type: System..::.Int32
pageSize
Type: System..::.Int32
totalRecords
Type: System..::.Int32 %

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


GetAllProfiles Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.GetAllProfiles Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override ProfileInfoCollection GetAllProfiles(
    ProfileAuthenticationOption authenticationOption,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
Visual Basic (Declaration)
Public Overrides Function GetAllProfiles ( _
    authenticationOption As ProfileAuthenticationOption, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As ProfileInfoCollection
Visual C++
public:
virtual ProfileInfoCollection^ GetAllProfiles(
    ProfileAuthenticationOption authenticationOption,
    int pageIndex,
    int pageSize,
    [OutAttribute] int% totalRecords
) override

Parameters

authenticationOption
Type: System.Web.Profile..::.ProfileAuthenticationOption
pageIndex
Type: System..::.Int32
pageSize
Type: System..::.Int32
totalRecords
Type: System..::.Int32 %

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


GetNumberOfInactiveProfiles Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.GetNumberOfInactiveProfiles Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int GetNumberOfInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate
)
Visual Basic (Declaration)
Public Overrides Function GetNumberOfInactiveProfiles ( _
    authenticationOption As ProfileAuthenticationOption, _
    userInactiveSinceDate As DateTime _
) As Integer
Visual C++
public:
virtual int GetNumberOfInactiveProfiles(
    ProfileAuthenticationOption authenticationOption,
    DateTime userInactiveSinceDate
) override

Parameters

authenticationOption
Type: System.Web.Profile..::.ProfileAuthenticationOption
userInactiveSinceDate
Type: System..::.DateTime

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


GetPropertyValues Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.GetPropertyValues Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override SettingsPropertyValueCollection GetPropertyValues(
    SettingsContext context,
    SettingsPropertyCollection collection
)
Visual Basic (Declaration)
Public Overrides Function GetPropertyValues ( _
    context As SettingsContext, _
    collection As SettingsPropertyCollection _
) As SettingsPropertyValueCollection
Visual C++
public:
virtual SettingsPropertyValueCollection^ GetPropertyValues(
    SettingsContext^ context,
    SettingsPropertyCollection^ collection
) override

Parameters

context
Type: System.Configuration..::.SettingsContext
collection
Type: System.Configuration..::.SettingsPropertyCollection

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


Initialize Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.Initialize Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void Initialize(
    string name,
    NameValueCollection config
)
Visual Basic (Declaration)
Public Overrides Sub Initialize ( _
    name As String, _
    config As NameValueCollection _
)
Visual C++
public:
virtual void Initialize(
    String^ name,
    NameValueCollection^ config
) override

Parameters

name
Type: System..::.String
config
Type: System.Collections.Specialized..::.NameValueCollection

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


SetPropertyValues Method

[image]

MySQL Connector/Net
MySQLProfileProvider..::.SetPropertyValues Method
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void SetPropertyValues(
    SettingsContext context,
    SettingsPropertyValueCollection collection
)
Visual Basic (Declaration)
Public Overrides Sub SetPropertyValues ( _
    context As SettingsContext, _
    collection As SettingsPropertyValueCollection _
)
Visual C++
public:
virtual void SetPropertyValues(
    SettingsContext^ context,
    SettingsPropertyValueCollection^ collection
) override

Parameters

context
Type: System.Configuration..::.SettingsContext
collection
Type: System.Configuration..::.SettingsPropertyValueCollection

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


MySQLProfileProvider Properties

[image] [image]

MySQL Connector/Net
MySQLProfileProvider Properties
MySQLProfileProvider Class See Also Send Feedback

The MySQLProfileProvider type exposes the following members.

Properties

Name | Description
ApplicationName | (Overrides SettingsProvider..::.ApplicationName.)
Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
Name | Gets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


ApplicationName Property

[image]

MySQL Connector/Net
MySQLProfileProvider..::.ApplicationName Property
MySQLProfileProvider Class See Also Send Feedback

Namespace: MySql.Web.Profile
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string ApplicationName { get; set; }
Visual Basic (Declaration)
Public Overrides Property ApplicationName As String
Visual C++
public:
virtual property String^ ApplicationName {
    String^ get () override;
    void set (String^ value) override;
}

See Also

MySQLProfileProvider Class
MySql.Web.Profile Namespace


MySql.Web.Properties Namespace

[image]

MySQL Connector/Net
MySql.Web.Properties Namespace
Send Feedback

Classes

Class | Description
Resources |


Resources Class

[image]

MySQL Connector/Net
Resources Class
Members See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public class Resources
Visual Basic (Declaration)
Public Class Resources
Visual C++
public ref class Resources

Inheritance Hierarchy

System..::.Object
MySql.Web.Properties..::.Resources

See Also

Resources Members
MySql.Web.Properties Namespace


Resources Members

[image] [image]

MySQL Connector/Net
Resources Members
Resources Class Methods Properties See Also Send Feedback

The Resources type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
CannotDeleteAPopulatedRole |
CannotRetrieveHashedPasswords |
CannotUnencodeHashedPwd |
ChangePasswordCanceled |
Culture |
ErrorInitOfMembershipProvider |
ErrorInitOfRoleProvider |
ErrorInitProfileProvider |
ErrorResettingPassword |
IllegalRoleName |
IllegalUserName |
IncorrectPasswordAnswer |
InvalidCharactersInUserName |
MissingOrWrongSchema |
MonoDoesNotSupportHash |
NewPasswordValidationFailed |
NotEnoughNonAlphaNumericInPwd |
PasswordAnswerInvalid |
PasswordNotLongEnough |
PasswordQuestionInvalid |
PasswordRequiredForReset |
PasswordResetCanceledNotValid |
PasswordResetNotEnabled |
PasswordRetrievalNotEnabled |
ProfileUpdateFailed |
ResourceManager |
RoleNameAlreadyExists |
RoleNameNotFound |
schema1 |
schema2 |
schema3 |
schema4 |
UnableToCreateApplication |
UnableToCreateUser |
UnableToLockOutUser |
UnableToRetrieveProfileData |
UnableToUpdateFailureCount |
UnsupportedPasswordFormat |
UserIsAlreadyInRole |
UserIsLockedOut |
UsernameNotFound |
UserNotInRole |
ValidatePasswordCanceled |

See Also

Resources Class
MySql.Web.Properties Namespace


Resources Methods

[image] [image]

MySQL Connector/Net
Resources Methods
Resources Class See Also Send Feedback

The Resources type exposes the following members.

Methods

Name | Description
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetType | Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

Resources Class
MySql.Web.Properties Namespace


Resources Properties

[image] [image]

MySQL Connector/Net
Resources Properties
Resources Class See Also Send Feedback

The Resources type exposes the following members.

Properties

Name | Description
CannotDeleteAPopulatedRole |
CannotRetrieveHashedPasswords |
CannotUnencodeHashedPwd |
ChangePasswordCanceled |
Culture |
ErrorInitOfMembershipProvider |
ErrorInitOfRoleProvider |
ErrorInitProfileProvider |
ErrorResettingPassword |
IllegalRoleName |
IllegalUserName |
IncorrectPasswordAnswer |
InvalidCharactersInUserName |
MissingOrWrongSchema |
MonoDoesNotSupportHash |
NewPasswordValidationFailed |
NotEnoughNonAlphaNumericInPwd |
PasswordAnswerInvalid |
PasswordNotLongEnough |
PasswordQuestionInvalid |
PasswordRequiredForReset |
PasswordResetCanceledNotValid |
PasswordResetNotEnabled |
PasswordRetrievalNotEnabled |
ProfileUpdateFailed |
ResourceManager |
RoleNameAlreadyExists |
RoleNameNotFound |
schema1 |
schema2 |
schema3 |
schema4 |
UnableToCreateApplication |
UnableToCreateUser |
UnableToLockOutUser |
UnableToRetrieveProfileData |
UnableToUpdateFailureCount |
UnsupportedPasswordFormat |
UserIsAlreadyInRole |
UserIsLockedOut |
UsernameNotFound |
UserNotInRole |
ValidatePasswordCanceled |

See Also

Resources Class
MySql.Web.Properties Namespace


CannotDeleteAPopulatedRole Property

[image]

MySQL Connector/Net
Resources..::.CannotDeleteAPopulatedRole Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string CannotDeleteAPopulatedRole { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CannotDeleteAPopulatedRole As String
Visual C++
public:
static property String^ CannotDeleteAPopulatedRole {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


CannotRetrieveHashedPasswords Property

[image]

MySQL Connector/Net
Resources..::.CannotRetrieveHashedPasswords Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string CannotRetrieveHashedPasswords { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CannotRetrieveHashedPasswords As String
Visual C++
public:
static property String^ CannotRetrieveHashedPasswords {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


CannotUnencodeHashedPwd Property

[image]

MySQL Connector/Net
Resources..::.CannotUnencodeHashedPwd Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string CannotUnencodeHashedPwd { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property CannotUnencodeHashedPwd As String
Visual C++
public:
static property String^ CannotUnencodeHashedPwd {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


ChangePasswordCanceled Property

[image]

MySQL Connector/Net
Resources..::.ChangePasswordCanceled Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string ChangePasswordCanceled { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ChangePasswordCanceled As String
Visual C++
public:
static property String^ ChangePasswordCanceled {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


Culture Property

[image]

MySQL Connector/Net
Resources..::.Culture Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static CultureInfo Culture { get; set; }
Visual Basic (Declaration)
Public Shared Property Culture As CultureInfo
Visual C++
public:
static property CultureInfo^ Culture {
    CultureInfo^ get ();
    void set (CultureInfo^ value);
}

See Also

Resources Class
MySql.Web.Properties Namespace


ErrorInitOfMembershipProvider Property

[image]

MySQL Connector/Net
Resources..::.ErrorInitOfMembershipProvider Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string ErrorInitOfMembershipProvider { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ErrorInitOfMembershipProvider As String
Visual C++
public:
static property String^ ErrorInitOfMembershipProvider {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


ErrorInitOfRoleProvider Property

[image]

MySQL Connector/Net
Resources..::.ErrorInitOfRoleProvider Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string ErrorInitOfRoleProvider { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ErrorInitOfRoleProvider As String
Visual C++
public:
static property String^ ErrorInitOfRoleProvider {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


ErrorInitProfileProvider Property

[image]

MySQL Connector/Net
Resources..::.ErrorInitProfileProvider Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string ErrorInitProfileProvider { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ErrorInitProfileProvider As String
Visual C++
public:
static property String^ ErrorInitProfileProvider {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


ErrorResettingPassword Property

[image]

MySQL Connector/Net
Resources..::.ErrorResettingPassword Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string ErrorResettingPassword { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ErrorResettingPassword As String
Visual C++
public:
static property String^ ErrorResettingPassword {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


IllegalRoleName Property

[image]

MySQL Connector/Net
Resources..::.IllegalRoleName Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string IllegalRoleName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property IllegalRoleName As String
Visual C++
public:
static property String^ IllegalRoleName {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


IllegalUserName Property

[image]

MySQL Connector/Net
Resources..::.IllegalUserName Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string IllegalUserName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property IllegalUserName As String
Visual C++
public:
static property String^ IllegalUserName {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


IncorrectPasswordAnswer Property

[image]

MySQL Connector/Net
Resources..::.IncorrectPasswordAnswer Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string IncorrectPasswordAnswer { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property IncorrectPasswordAnswer As String
Visual C++
public:
static property String^ IncorrectPasswordAnswer {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


InvalidCharactersInUserName Property

[image]

MySQL Connector/Net
Resources..::.InvalidCharactersInUserName Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string InvalidCharactersInUserName { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property InvalidCharactersInUserName As String
Visual C++
public:
static property String^ InvalidCharactersInUserName {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


MissingOrWrongSchema Property

[image]

MySQL Connector/Net
Resources..::.MissingOrWrongSchema Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string MissingOrWrongSchema { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property MissingOrWrongSchema As String
Visual C++
public:
static property String^ MissingOrWrongSchema {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


MonoDoesNotSupportHash Property

[image]

MySQL Connector/Net
Resources..::.MonoDoesNotSupportHash Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string MonoDoesNotSupportHash { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property MonoDoesNotSupportHash As String
Visual C++
public:
static property String^ MonoDoesNotSupportHash {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


NewPasswordValidationFailed Property

[image]

MySQL Connector/Net
Resources..::.NewPasswordValidationFailed Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string NewPasswordValidationFailed { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property NewPasswordValidationFailed As String
Visual C++
public:
static property String^ NewPasswordValidationFailed {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


NotEnoughNonAlphaNumericInPwd Property

[image]

MySQL Connector/Net
Resources..::.NotEnoughNonAlphaNumericInPwd Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string NotEnoughNonAlphaNumericInPwd { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property NotEnoughNonAlphaNumericInPwd As String
Visual C++
public:
static property String^ NotEnoughNonAlphaNumericInPwd {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


PasswordAnswerInvalid Property

[image]

MySQL Connector/Net
Resources..::.PasswordAnswerInvalid Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordAnswerInvalid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordAnswerInvalid As String
Visual C++
public:
static property String^ PasswordAnswerInvalid {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


PasswordNotLongEnough Property

[image]

MySQL Connector/Net
Resources..::.PasswordNotLongEnough Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordNotLongEnough { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordNotLongEnough As String
Visual C++
public:
static property String^ PasswordNotLongEnough {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


PasswordQuestionInvalid Property

[image]

MySQL Connector/Net
Resources..::.PasswordQuestionInvalid Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordQuestionInvalid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordQuestionInvalid As String
Visual C++
public:
static property String^ PasswordQuestionInvalid {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


PasswordRequiredForReset Property

[image]

MySQL Connector/Net
Resources..::.PasswordRequiredForReset Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordRequiredForReset { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordRequiredForReset As String
Visual C++
public:
static property String^ PasswordRequiredForReset {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


PasswordResetCanceledNotValid Property

[image]

MySQL Connector/Net
Resources..::.PasswordResetCanceledNotValid Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordResetCanceledNotValid { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordResetCanceledNotValid As String
Visual C++
public:
static property String^ PasswordResetCanceledNotValid {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


PasswordResetNotEnabled Property

[image]

MySQL Connector/Net
Resources..::.PasswordResetNotEnabled Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordResetNotEnabled { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordResetNotEnabled As String
Visual C++
public:
static property String^ PasswordResetNotEnabled {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


PasswordRetrievalNotEnabled Property

[image]

MySQL Connector/Net
Resources..::.PasswordRetrievalNotEnabled Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string PasswordRetrievalNotEnabled { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property PasswordRetrievalNotEnabled As String
Visual C++
public:
static property String^ PasswordRetrievalNotEnabled {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


ProfileUpdateFailed Property

[image]

MySQL Connector/Net
Resources..::.ProfileUpdateFailed Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string ProfileUpdateFailed { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ProfileUpdateFailed As String
Visual C++
public:
static property String^ ProfileUpdateFailed {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


ResourceManager Property

[image]

MySQL Connector/Net
Resources..::.ResourceManager Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static ResourceManager ResourceManager { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ResourceManager As ResourceManager
Visual C++
public:
static property ResourceManager^ ResourceManager {
    ResourceManager^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


RoleNameAlreadyExists Property

[image]

MySQL Connector/Net
Resources..::.RoleNameAlreadyExists Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string RoleNameAlreadyExists { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property RoleNameAlreadyExists As String
Visual C++
public:
static property String^ RoleNameAlreadyExists {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


RoleNameNotFound Property

[image]

MySQL Connector/Net
Resources..::.RoleNameNotFound Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string RoleNameNotFound { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property RoleNameNotFound As String
Visual C++
public:
static property String^ RoleNameNotFound {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


schema1 Property

[image]

MySQL Connector/Net
Resources..::.schema1 Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string schema1 { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property schema1 As String
Visual C++
public:
static property String^ schema1 {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


schema2 Property

[image]

MySQL Connector/Net
Resources..::.schema2 Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string schema2 { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property schema2 As String
Visual C++
public:
static property String^ schema2 {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


schema3 Property

[image]

MySQL Connector/Net
Resources..::.schema3 Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string schema3 { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property schema3 As String
Visual C++
public:
static property String^ schema3 {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


schema4 Property

[image]

MySQL Connector/Net
Resources..::.schema4 Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string schema4 { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property schema4 As String
Visual C++
public:
static property String^ schema4 {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UnableToCreateApplication Property

[image]

MySQL Connector/Net
Resources..::.UnableToCreateApplication Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToCreateApplication { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToCreateApplication As String
Visual C++
public:
static property String^ UnableToCreateApplication {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UnableToCreateUser Property

[image]

MySQL Connector/Net
Resources..::.UnableToCreateUser Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToCreateUser { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToCreateUser As String
Visual C++
public:
static property String^ UnableToCreateUser {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UnableToLockOutUser Property

[image]

MySQL Connector/Net
Resources..::.UnableToLockOutUser Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToLockOutUser { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToLockOutUser As String
Visual C++
public:
static property String^ UnableToLockOutUser {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UnableToRetrieveProfileData Property

[image]

MySQL Connector/Net
Resources..::.UnableToRetrieveProfileData Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToRetrieveProfileData { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToRetrieveProfileData As String
Visual C++
public:
static property String^ UnableToRetrieveProfileData {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UnableToUpdateFailureCount Property

[image]

MySQL Connector/Net
Resources..::.UnableToUpdateFailureCount Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UnableToUpdateFailureCount { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnableToUpdateFailureCount As String
Visual C++
public:
static property String^ UnableToUpdateFailureCount {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UnsupportedPasswordFormat Property

[image]

MySQL Connector/Net
Resources..::.UnsupportedPasswordFormat Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UnsupportedPasswordFormat { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UnsupportedPasswordFormat As String
Visual C++
public:
static property String^ UnsupportedPasswordFormat {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UserIsAlreadyInRole Property

[image]

MySQL Connector/Net
Resources..::.UserIsAlreadyInRole Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UserIsAlreadyInRole { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UserIsAlreadyInRole As String
Visual C++
public:
static property String^ UserIsAlreadyInRole {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UserIsLockedOut Property

[image]

MySQL Connector/Net
Resources..::.UserIsLockedOut Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UserIsLockedOut { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UserIsLockedOut As String
Visual C++
public:
static property String^ UserIsLockedOut {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UsernameNotFound Property

[image]

MySQL Connector/Net
Resources..::.UsernameNotFound Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UsernameNotFound { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UsernameNotFound As String
Visual C++
public:
static property String^ UsernameNotFound {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


UserNotInRole Property

[image]

MySQL Connector/Net
Resources..::.UserNotInRole Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string UserNotInRole { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property UserNotInRole As String
Visual C++
public:
static property String^ UserNotInRole {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


ValidatePasswordCanceled Property

[image]

MySQL Connector/Net
Resources..::.ValidatePasswordCanceled Property
Resources Class See Also Send Feedback

Namespace: MySql.Web.Properties
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public static string ValidatePasswordCanceled { get; }
Visual Basic (Declaration)
Public Shared ReadOnly Property ValidatePasswordCanceled As String
Visual C++
public:
static property String^ ValidatePasswordCanceled {
    String^ get ();
}

See Also

Resources Class
MySql.Web.Properties Namespace


MySql.Web.Security Namespace

[image]

MySQL Connector/Net
MySql.Web.Security Namespace
Send Feedback

Classes

Class | Description
MySQLMembershipProvider |
MySQLRoleProvider |


MySQLMembershipProvider Class

[image]

MySQL Connector/Net
MySQLMembershipProvider Class
Members See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySQLMembershipProvider : MembershipProvider
Visual Basic (Declaration)
Public NotInheritable Class MySQLMembershipProvider _
    Inherits MembershipProvider
Visual C++
public ref class MySQLMembershipProvider sealed : public MembershipProvider

Inheritance Hierarchy

System..::.Object
System.Configuration.Provider..::.ProviderBase
System.Web.Security..::.MembershipProvider
MySql.Web.Security..::.MySQLMembershipProvider

See Also

MySQLMembershipProvider Members
MySql.Web.Security Namespace


MySQLMembershipProvider Members

[image] [image]

MySQL Connector/Net
MySQLMembershipProvider Members
MySQLMembershipProvider Class Constructors Methods Properties Events See Also Send Feedback

The MySQLMembershipProvider type exposes the following members.

Constructors

Name | Description
MySQLMembershipProvider |

Methods

Name | Description
ChangePassword | (Overrides MembershipProvider..::.ChangePassword(String, String, String).)
ChangePasswordQuestionAndAnswer | (Overrides MembershipProvider..::.ChangePasswordQuestionAndAnswer(String, String, String, String).)
CreateUser | (Overrides MembershipProvider..::.CreateUser(String, String, String, String, String, Boolean, Object, MembershipCreateStatus%).)
DecryptPassword | Decrypts an encrypted password. (Inherited from MembershipProvider.)
DeleteUser | (Overrides MembershipProvider..::.DeleteUser(String, Boolean).)
EncryptPassword | Encrypts a password. (Inherited from MembershipProvider.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FindUsersByEmail | (Overrides MembershipProvider..::.FindUsersByEmail(String, Int32, Int32, Int32%).)
FindUsersByName | (Overrides MembershipProvider..::.FindUsersByName(String, Int32, Int32, Int32%).)
GetAllUsers | (Overrides MembershipProvider..::.GetAllUsers(Int32, Int32, Int32%).)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetNumberOfUsersOnline | (Overrides MembershipProvider..::.GetNumberOfUsersOnline()()().)
GetPassword | (Overrides MembershipProvider..::.GetPassword(String, String).)
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUser | Overloaded.
GetUserNameByEmail | (Overrides MembershipProvider..::.GetUserNameByEmail(String).)
Initialize | (Overrides ProviderBase..::.Initialize(String, NameValueCollection).)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
OnValidatingPassword | Raises the ValidatingPassword event if an event handler has been defined. (Inherited from MembershipProvider.)
ResetPassword | (Overrides MembershipProvider..::.ResetPassword(String, String).)
ToString | Returns a String that represents the current Object. (Inherited from Object.)
UnlockUser | (Overrides MembershipProvider..::.UnlockUser(String).)
UpdateUser | (Overrides MembershipProvider..::.UpdateUser(MembershipUser).)
ValidateUser | (Overrides MembershipProvider..::.ValidateUser(String, String).)

Properties

Name | Description
ApplicationName | (Overrides MembershipProvider..::.ApplicationName.)
Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
EnablePasswordReset | (Overrides MembershipProvider..::.EnablePasswordReset.)
EnablePasswordRetrieval | (Overrides MembershipProvider..::.EnablePasswordRetrieval.)
MaxInvalidPasswordAttempts | (Overrides MembershipProvider..::.MaxInvalidPasswordAttempts.)
MinRequiredNonAlphanumericCharacters | (Overrides MembershipProvider..::.MinRequiredNonAlphanumericCharacters.)
MinRequiredPasswordLength | (Overrides MembershipProvider..::.MinRequiredPasswordLength.)
Name | Gets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)
PasswordAttemptWindow | (Overrides MembershipProvider..::.PasswordAttemptWindow.)
PasswordFormat | (Overrides MembershipProvider..::.PasswordFormat.)
PasswordStrengthRegularExpression | (Overrides MembershipProvider..::.PasswordStrengthRegularExpression.)
RequiresQuestionAndAnswer | (Overrides MembershipProvider..::.RequiresQuestionAndAnswer.)
RequiresUniqueEmail | (Overrides MembershipProvider..::.RequiresUniqueEmail.)
WriteExceptionsToEventLog |

Events

Name | Description
ValidatingPassword | Occurs when a user is created, a password is changed, or a password is reset. (Inherited from MembershipProvider.)

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MySQLMembershipProvider Constructor

[image]

MySQL Connector/Net
MySQLMembershipProvider Constructor
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public MySQLMembershipProvider()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySQLMembershipProvider()

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MySQLMembershipProvider Methods

[image] [image]

MySQL Connector/Net
MySQLMembershipProvider Methods
MySQLMembershipProvider Class See Also Send Feedback

The MySQLMembershipProvider type exposes the following members.

Methods

Name | Description
ChangePassword | (Overrides MembershipProvider..::.ChangePassword(String, String, String).)
ChangePasswordQuestionAndAnswer | (Overrides MembershipProvider..::.ChangePasswordQuestionAndAnswer(String, String, String, String).)
CreateUser | (Overrides MembershipProvider..::.CreateUser(String, String, String, String, String, Boolean, Object, MembershipCreateStatus%).)
DecryptPassword | Decrypts an encrypted password. (Inherited from MembershipProvider.)
DeleteUser | (Overrides MembershipProvider..::.DeleteUser(String, Boolean).)
EncryptPassword | Encrypts a password. (Inherited from MembershipProvider.)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FindUsersByEmail | (Overrides MembershipProvider..::.FindUsersByEmail(String, Int32, Int32, Int32%).)
FindUsersByName | (Overrides MembershipProvider..::.FindUsersByName(String, Int32, Int32, Int32%).)
GetAllUsers | (Overrides MembershipProvider..::.GetAllUsers(Int32, Int32, Int32%).)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetNumberOfUsersOnline | (Overrides MembershipProvider..::.GetNumberOfUsersOnline()()().)
GetPassword | (Overrides MembershipProvider..::.GetPassword(String, String).)
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUser | Overloaded.
GetUserNameByEmail | (Overrides MembershipProvider..::.GetUserNameByEmail(String).)
Initialize | (Overrides ProviderBase..::.Initialize(String, NameValueCollection).)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
OnValidatingPassword | Raises the ValidatingPassword event if an event handler has been defined. (Inherited from MembershipProvider.)
ResetPassword | (Overrides MembershipProvider..::.ResetPassword(String, String).)
ToString | Returns a String that represents the current Object. (Inherited from Object.)
UnlockUser | (Overrides MembershipProvider..::.UnlockUser(String).)
UpdateUser | (Overrides MembershipProvider..::.UpdateUser(MembershipUser).)
ValidateUser | (Overrides MembershipProvider..::.ValidateUser(String, String).)

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


ChangePassword Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.ChangePassword Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool ChangePassword(
    string username,
    string oldPassword,
    string newPassword
)
Visual Basic (Declaration)
Public Overrides Function ChangePassword ( _
    username As String, _
    oldPassword As String, _
    newPassword As String _
) As Boolean
Visual C++
public:
virtual bool ChangePassword(
    String^ username,
    String^ oldPassword,
    String^ newPassword
) override

Parameters

username
Type: System..::.String
oldPassword
Type: System..::.String
newPassword
Type: System..::.String

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


ChangePasswordQuestionAndAnswer Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.ChangePasswordQuestionAndAnswer Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool ChangePasswordQuestionAndAnswer(
    string username,
    string password,
    string newPwdQuestion,
    string newPwdAnswer
)
Visual Basic (Declaration)
Public Overrides Function ChangePasswordQuestionAndAnswer ( _
    username As String, _
    password As String, _
    newPwdQuestion As String, _
    newPwdAnswer As String _
) As Boolean
Visual C++
public:
virtual bool ChangePasswordQuestionAndAnswer(
    String^ username,
    String^ password,
    String^ newPwdQuestion,
    String^ newPwdAnswer
) override

Parameters

username
Type: System..::.String
password
Type: System..::.String
newPwdQuestion
Type: System..::.String
newPwdAnswer
Type: System..::.String

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


CreateUser Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.CreateUser Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override MembershipUser CreateUser(
    string username,
    string password,
    string email,
    string passwordQuestion,
    string passwordAnswer,
    bool isApproved,
    Object providerUserKey,
    out MembershipCreateStatus status
)
Visual Basic (Declaration)
Public Overrides Function CreateUser ( _
    username As String, _
    password As String, _
    email As String, _
    passwordQuestion As String, _
    passwordAnswer As String, _
    isApproved As Boolean, _
    providerUserKey As Object, _
    <OutAttribute> ByRef status As MembershipCreateStatus _
) As MembershipUser
Visual C++
public:
virtual MembershipUser^ CreateUser(
    String^ username,
    String^ password,
    String^ email,
    String^ passwordQuestion,
    String^ passwordAnswer,
    bool isApproved,
    Object^ providerUserKey,
    [OutAttribute] MembershipCreateStatus% status
) override

Parameters

username
Type: System..::.String
password
Type: System..::.String
email
Type: System..::.String
passwordQuestion
Type: System..::.String
passwordAnswer
Type: System..::.String
isApproved
Type: System..::.Boolean
providerUserKey
Type: System..::.Object
status
Type: System.Web.Security..::.MembershipCreateStatus %

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


DeleteUser Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.DeleteUser Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool DeleteUser(
    string username,
    bool deleteAllRelatedData
)
Visual Basic (Declaration)
Public Overrides Function DeleteUser ( _
    username As String, _
    deleteAllRelatedData As Boolean _
) As Boolean
Visual C++
public:
virtual bool DeleteUser(
    String^ username,
    bool deleteAllRelatedData
) override

Parameters

username
Type: System..::.String
deleteAllRelatedData
Type: System..::.Boolean

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


FindUsersByEmail Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.FindUsersByEmail Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override MembershipUserCollection FindUsersByEmail(
    string emailToMatch,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
Visual Basic (Declaration)
Public Overrides Function FindUsersByEmail ( _
    emailToMatch As String, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As MembershipUserCollection
Visual C++
public:
virtual MembershipUserCollection^ FindUsersByEmail(
    String^ emailToMatch,
    int pageIndex,
    int pageSize,
    [OutAttribute] int% totalRecords
) override

Parameters

emailToMatch
Type: System..::.String
pageIndex
Type: System..::.Int32
pageSize
Type: System..::.Int32
totalRecords
Type: System..::.Int32 %

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


FindUsersByName Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.FindUsersByName Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override MembershipUserCollection FindUsersByName(
    string usernameToMatch,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
Visual Basic (Declaration)
Public Overrides Function FindUsersByName ( _
    usernameToMatch As String, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As MembershipUserCollection
Visual C++
public:
virtual MembershipUserCollection^ FindUsersByName(
    String^ usernameToMatch,
    int pageIndex,
    int pageSize,
    [OutAttribute] int% totalRecords
) override

Parameters

usernameToMatch
Type: System..::.String
pageIndex
Type: System..::.Int32
pageSize
Type: System..::.Int32
totalRecords
Type: System..::.Int32 %

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


GetAllUsers Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.GetAllUsers Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override MembershipUserCollection GetAllUsers(
    int pageIndex,
    int pageSize,
    out int totalRecords
)
Visual Basic (Declaration)
Public Overrides Function GetAllUsers ( _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As MembershipUserCollection
Visual C++
public:
virtual MembershipUserCollection^ GetAllUsers(
    int pageIndex,
    int pageSize,
    [OutAttribute] int% totalRecords
) override

Parameters

pageIndex
Type: System..::.Int32
pageSize
Type: System..::.Int32
totalRecords
Type: System..::.Int32 %

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


GetNumberOfUsersOnline Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.GetNumberOfUsersOnline Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int GetNumberOfUsersOnline()
Visual Basic (Declaration)
Public Overrides Function GetNumberOfUsersOnline As Integer
Visual C++
public:
virtual int GetNumberOfUsersOnline() override

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


GetPassword Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.GetPassword Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string GetPassword(
    string username,
    string answer
)
Visual Basic (Declaration)
Public Overrides Function GetPassword ( _
    username As String, _
    answer As String _
) As String
Visual C++
public:
virtual String^ GetPassword(
    String^ username,
    String^ answer
) override

Parameters

username
Type: System..::.String
answer
Type: System..::.String

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


GetUser Method

[image] [image]

MySQL Connector/Net
MySQLMembershipProvider..::.GetUser Method
MySQLMembershipProvider Class See Also Send Feedback

Overload List

Name | Description
GetUser(Object, Boolean) | (Overrides MembershipProvider..::.GetUser(Object, Boolean).)
GetUser(String, Boolean) | (Overrides MembershipProvider..::.GetUser(String, Boolean).)

See Also

MySQLMembershipProvider Class
MySQLMembershipProvider Members
MySql.Web.Security Namespace


GetUser Method (Object, Boolean)

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.GetUser Method (Object, Boolean)
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override MembershipUser GetUser(
    Object providerUserKey,
    bool userIsOnline
)
Visual Basic (Declaration)
Public Overrides Function GetUser ( _
    providerUserKey As Object, _
    userIsOnline As Boolean _
) As MembershipUser
Visual C++
public:
virtual MembershipUser^ GetUser(
    Object^ providerUserKey,
    bool userIsOnline
) override

Parameters

providerUserKey
Type: System..::.Object
userIsOnline
Type: System..::.Boolean

See Also

MySQLMembershipProvider Class
GetUser Overload
MySql.Web.Security Namespace


GetUser Method (String, Boolean)

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.GetUser Method (String, Boolean)
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override MembershipUser GetUser(
    string username,
    bool userIsOnline
)
Visual Basic (Declaration)
Public Overrides Function GetUser ( _
    username As String, _
    userIsOnline As Boolean _
) As MembershipUser
Visual C++
public:
virtual MembershipUser^ GetUser(
    String^ username,
    bool userIsOnline
) override

Parameters

username
Type: System..::.String
userIsOnline
Type: System..::.Boolean

See Also

MySQLMembershipProvider Class
GetUser Overload
MySql.Web.Security Namespace


GetUserNameByEmail Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.GetUserNameByEmail Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string GetUserNameByEmail(
    string email
)
Visual Basic (Declaration)
Public Overrides Function GetUserNameByEmail ( _
    email As String _
) As String
Visual C++
public:
virtual String^ GetUserNameByEmail(
    String^ email
) override

Parameters

email
Type: System..::.String

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


Initialize Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.Initialize Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void Initialize(
    string name,
    NameValueCollection config
)
Visual Basic (Declaration)
Public Overrides Sub Initialize ( _
    name As String, _
    config As NameValueCollection _
)
Visual C++
public:
virtual void Initialize(
    String^ name,
    NameValueCollection^ config
) override

Parameters

name
Type: System..::.String
config
Type: System.Collections.Specialized..::.NameValueCollection

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


ResetPassword Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.ResetPassword Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string ResetPassword(
    string username,
    string answer
)
Visual Basic (Declaration)
Public Overrides Function ResetPassword ( _
    username As String, _
    answer As String _
) As String
Visual C++
public:
virtual String^ ResetPassword(
    String^ username,
    String^ answer
) override

Parameters

username
Type: System..::.String
answer
Type: System..::.String

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


UnlockUser Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.UnlockUser Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool UnlockUser(
    string username
)
Visual Basic (Declaration)
Public Overrides Function UnlockUser ( _
    username As String _
) As Boolean
Visual C++
public:
virtual bool UnlockUser(
    String^ username
) override

Parameters

username
Type: System..::.String

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


UpdateUser Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.UpdateUser Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void UpdateUser(
    MembershipUser user
)
Visual Basic (Declaration)
Public Overrides Sub UpdateUser ( _
    user As MembershipUser _
)
Visual C++
public:
virtual void UpdateUser(
    MembershipUser^ user
) override

Parameters

user
Type: System.Web.Security..::.MembershipUser

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


ValidateUser Method

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.ValidateUser Method
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool ValidateUser(
    string username,
    string password
)
Visual Basic (Declaration)
Public Overrides Function ValidateUser ( _
    username As String, _
    password As String _
) As Boolean
Visual C++
public:
virtual bool ValidateUser(
    String^ username,
    String^ password
) override

Parameters

username
Type: System..::.String
password
Type: System..::.String

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MySQLMembershipProvider Properties

[image] [image]

MySQL Connector/Net
MySQLMembershipProvider Properties
MySQLMembershipProvider Class See Also Send Feedback

The MySQLMembershipProvider type exposes the following members.

Properties

Name | Description
ApplicationName | (Overrides MembershipProvider..::.ApplicationName.)
Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
EnablePasswordReset | (Overrides MembershipProvider..::.EnablePasswordReset.)
EnablePasswordRetrieval | (Overrides MembershipProvider..::.EnablePasswordRetrieval.)
MaxInvalidPasswordAttempts | (Overrides MembershipProvider..::.MaxInvalidPasswordAttempts.)
MinRequiredNonAlphanumericCharacters | (Overrides MembershipProvider..::.MinRequiredNonAlphanumericCharacters.)
MinRequiredPasswordLength | (Overrides MembershipProvider..::.MinRequiredPasswordLength.)
Name | Gets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)
PasswordAttemptWindow | (Overrides MembershipProvider..::.PasswordAttemptWindow.)
PasswordFormat | (Overrides MembershipProvider..::.PasswordFormat.)
PasswordStrengthRegularExpression | (Overrides MembershipProvider..::.PasswordStrengthRegularExpression.)
RequiresQuestionAndAnswer | (Overrides MembershipProvider..::.RequiresQuestionAndAnswer.)
RequiresUniqueEmail | (Overrides MembershipProvider..::.RequiresUniqueEmail.)
WriteExceptionsToEventLog |

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


ApplicationName Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.ApplicationName Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string ApplicationName { get; set; }
Visual Basic (Declaration)
Public Overrides Property ApplicationName As String
Visual C++
public:
virtual property String^ ApplicationName {
    String^ get () override;
    void set (String^ value) override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


EnablePasswordReset Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.EnablePasswordReset Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool EnablePasswordReset { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property EnablePasswordReset As Boolean
Visual C++
public:
virtual property bool EnablePasswordReset {
    bool get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


EnablePasswordRetrieval Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.EnablePasswordRetrieval Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool EnablePasswordRetrieval { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property EnablePasswordRetrieval As Boolean
Visual C++
public:
virtual property bool EnablePasswordRetrieval {
    bool get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MaxInvalidPasswordAttempts Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.MaxInvalidPasswordAttempts Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int MaxInvalidPasswordAttempts { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property MaxInvalidPasswordAttempts As Integer
Visual C++
public:
virtual property int MaxInvalidPasswordAttempts {
    int get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MinRequiredNonAlphanumericCharacters Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.MinRequiredNonAlphanumericCharacters Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int MinRequiredNonAlphanumericCharacters { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property MinRequiredNonAlphanumericCharacters As Integer
Visual C++
public:
virtual property int MinRequiredNonAlphanumericCharacters {
    int get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MinRequiredPasswordLength Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.MinRequiredPasswordLength Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int MinRequiredPasswordLength { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property MinRequiredPasswordLength As Integer
Visual C++
public:
virtual property int MinRequiredPasswordLength {
    int get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


PasswordAttemptWindow Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.PasswordAttemptWindow Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override int PasswordAttemptWindow { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property PasswordAttemptWindow As Integer
Visual C++
public:
virtual property int PasswordAttemptWindow {
    int get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


PasswordFormat Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.PasswordFormat Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override MembershipPasswordFormat PasswordFormat { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property PasswordFormat As MembershipPasswordFormat
Visual C++
public:
virtual property MembershipPasswordFormat PasswordFormat {
    MembershipPasswordFormat get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


PasswordStrengthRegularExpression Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.PasswordStrengthRegularExpression Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string PasswordStrengthRegularExpression { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property PasswordStrengthRegularExpression As String
Visual C++
public:
virtual property String^ PasswordStrengthRegularExpression {
    String^ get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


RequiresQuestionAndAnswer Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.RequiresQuestionAndAnswer Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool RequiresQuestionAndAnswer { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property RequiresQuestionAndAnswer As Boolean
Visual C++
public:
virtual property bool RequiresQuestionAndAnswer {
    bool get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


RequiresUniqueEmail Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.RequiresUniqueEmail Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool RequiresUniqueEmail { get; }
Visual Basic (Declaration)
Public Overrides ReadOnly Property RequiresUniqueEmail As Boolean
Visual C++
public:
virtual property bool RequiresUniqueEmail {
    bool get () override;
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


WriteExceptionsToEventLog Property

[image]

MySQL Connector/Net
MySQLMembershipProvider..::.WriteExceptionsToEventLog Property
MySQLMembershipProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public bool WriteExceptionsToEventLog { get; set; }
Visual Basic (Declaration)
Public Property WriteExceptionsToEventLog As Boolean
Visual C++
public:
property bool WriteExceptionsToEventLog {
    bool get ();
    void set (bool value);
}

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MySQLMembershipProvider Events

[image] [image]

MySQL Connector/Net
MySQLMembershipProvider Events
MySQLMembershipProvider Class See Also Send Feedback

The MySQLMembershipProvider type exposes the following members.

Events

Name | Description
ValidatingPassword | Occurs when a user is created, a password is changed, or a password is reset. (Inherited from MembershipProvider.)

See Also

MySQLMembershipProvider Class
MySql.Web.Security Namespace


MySQLRoleProvider Class

[image]

MySQL Connector/Net
MySQLRoleProvider Class
Members See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public sealed class MySQLRoleProvider : RoleProvider
Visual Basic (Declaration)
Public NotInheritable Class MySQLRoleProvider _
    Inherits RoleProvider
Visual C++
public ref class MySQLRoleProvider sealed : public RoleProvider

Inheritance Hierarchy

System..::.Object
System.Configuration.Provider..::.ProviderBase
System.Web.Security..::.RoleProvider
MySql.Web.Security..::.MySQLRoleProvider

See Also

MySQLRoleProvider Members
MySql.Web.Security Namespace


MySQLRoleProvider Members

[image] [image]

MySQL Connector/Net
MySQLRoleProvider Members
MySQLRoleProvider Class Constructors Methods Properties See Also Send Feedback

The MySQLRoleProvider type exposes the following members.

Constructors

Name | Description
MySQLRoleProvider |

Methods

Name | Description
AddUsersToRoles | (Overrides RoleProvider..::.AddUsersToRoles(array<String>[]()[], array<String>[]()[]).)
CreateRole | (Overrides RoleProvider..::.CreateRole(String).)
DeleteRole | (Overrides RoleProvider..::.DeleteRole(String, Boolean).)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FindUsersInRole | (Overrides RoleProvider..::.FindUsersInRole(String, String).)
GetAllRoles | (Overrides RoleProvider..::.GetAllRoles()()().)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetRolesForUser | (Overrides RoleProvider..::.GetRolesForUser(String).)
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUsersInRole | (Overrides RoleProvider..::.GetUsersInRole(String).)
Initialize | (Overrides ProviderBase..::.Initialize(String, NameValueCollection).)
IsUserInRole | (Overrides RoleProvider..::.IsUserInRole(String, String).)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
RemoveUsersFromRoles | (Overrides RoleProvider..::.RemoveUsersFromRoles(array<String>[]()[], array<String>[]()[]).)
RoleExists | (Overrides RoleProvider..::.RoleExists(String).)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

Properties

Name | Description
ApplicationName | (Overrides RoleProvider..::.ApplicationName.)
Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
Name | Gets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)
WriteExceptionsToEventLog |

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


MySQLRoleProvider Constructor

[image]

MySQL Connector/Net
MySQLRoleProvider Constructor
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public MySQLRoleProvider()
Visual Basic (Declaration)
Public Sub New
Visual C++
public:
MySQLRoleProvider()

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


MySQLRoleProvider Methods

[image] [image]

MySQL Connector/Net
MySQLRoleProvider Methods
MySQLRoleProvider Class See Also Send Feedback

The MySQLRoleProvider type exposes the following members.

Methods

Name | Description
AddUsersToRoles | (Overrides RoleProvider..::.AddUsersToRoles(array<String>[]()[], array<String>[]()[]).)
CreateRole | (Overrides RoleProvider..::.CreateRole(String).)
DeleteRole | (Overrides RoleProvider..::.DeleteRole(String, Boolean).)
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
FindUsersInRole | (Overrides RoleProvider..::.FindUsersInRole(String, String).)
GetAllRoles | (Overrides RoleProvider..::.GetAllRoles()()().)
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
GetRolesForUser | (Overrides RoleProvider..::.GetRolesForUser(String).)
GetType | Gets the Type of the current instance. (Inherited from Object.)
GetUsersInRole | (Overrides RoleProvider..::.GetUsersInRole(String).)
Initialize | (Overrides ProviderBase..::.Initialize(String, NameValueCollection).)
IsUserInRole | (Overrides RoleProvider..::.IsUserInRole(String, String).)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
RemoveUsersFromRoles | (Overrides RoleProvider..::.RemoveUsersFromRoles(array<String>[]()[], array<String>[]()[]).)
RoleExists | (Overrides RoleProvider..::.RoleExists(String).)
ToString | Returns a String that represents the current Object. (Inherited from Object.)

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


AddUsersToRoles Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.AddUsersToRoles Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void AddUsersToRoles(
    string[] usernames,
    string[] rolenames
)
Visual Basic (Declaration)
Public Overrides Sub AddUsersToRoles ( _
    usernames As String(), _
    rolenames As String() _
)
Visual C++
public:
virtual void AddUsersToRoles(
    array<String^>^ usernames,
    array<String^>^ rolenames
) override

Parameters

usernames
Type: array< System..::.String >[]()[]
rolenames
Type: array< System..::.String >[]()[]

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


CreateRole Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.CreateRole Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void CreateRole(
    string rolename
)
Visual Basic (Declaration)
Public Overrides Sub CreateRole ( _
    rolename As String _
)
Visual C++
public:
virtual void CreateRole(
    String^ rolename
) override

Parameters

rolename
Type: System..::.String

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


DeleteRole Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.DeleteRole Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool DeleteRole(
    string rolename,
    bool throwOnPopulatedRole
)
Visual Basic (Declaration)
Public Overrides Function DeleteRole ( _
    rolename As String, _
    throwOnPopulatedRole As Boolean _
) As Boolean
Visual C++
public:
virtual bool DeleteRole(
    String^ rolename,
    bool throwOnPopulatedRole
) override

Parameters

rolename
Type: System..::.String
throwOnPopulatedRole
Type: System..::.Boolean

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


FindUsersInRole Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.FindUsersInRole Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string[] FindUsersInRole(
    string rolename,
    string usernameToMatch
)
Visual Basic (Declaration)
Public Overrides Function FindUsersInRole ( _
    rolename As String, _
    usernameToMatch As String _
) As String()
Visual C++
public:
virtual array<String^>^ FindUsersInRole(
    String^ rolename,
    String^ usernameToMatch
) override

Parameters

rolename
Type: System..::.String
usernameToMatch
Type: System..::.String

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


GetAllRoles Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.GetAllRoles Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string[] GetAllRoles()
Visual Basic (Declaration)
Public Overrides Function GetAllRoles As String()
Visual C++
public:
virtual array<String^>^ GetAllRoles() override

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


GetRolesForUser Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.GetRolesForUser Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string[] GetRolesForUser(
    string username
)
Visual Basic (Declaration)
Public Overrides Function GetRolesForUser ( _
    username As String _
) As String()
Visual C++
public:
virtual array<String^>^ GetRolesForUser(
    String^ username
) override

Parameters

username
Type: System..::.String

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


GetUsersInRole Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.GetUsersInRole Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string[] GetUsersInRole(
    string rolename
)
Visual Basic (Declaration)
Public Overrides Function GetUsersInRole ( _
    rolename As String _
) As String()
Visual C++
public:
virtual array<String^>^ GetUsersInRole(
    String^ rolename
) override

Parameters

rolename
Type: System..::.String

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


Initialize Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.Initialize Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void Initialize(
    string name,
    NameValueCollection config
)
Visual Basic (Declaration)
Public Overrides Sub Initialize ( _
    name As String, _
    config As NameValueCollection _
)
Visual C++
public:
virtual void Initialize(
    String^ name,
    NameValueCollection^ config
) override

Parameters

name
Type: System..::.String
config
Type: System.Collections.Specialized..::.NameValueCollection

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


IsUserInRole Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.IsUserInRole Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool IsUserInRole(
    string username,
    string rolename
)
Visual Basic (Declaration)
Public Overrides Function IsUserInRole ( _
    username As String, _
    rolename As String _
) As Boolean
Visual C++
public:
virtual bool IsUserInRole(
    String^ username,
    String^ rolename
) override

Parameters

username
Type: System..::.String
rolename
Type: System..::.String

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


RemoveUsersFromRoles Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.RemoveUsersFromRoles Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override void RemoveUsersFromRoles(
    string[] usernames,
    string[] rolenames
)
Visual Basic (Declaration)
Public Overrides Sub RemoveUsersFromRoles ( _
    usernames As String(), _
    rolenames As String() _
)
Visual C++
public:
virtual void RemoveUsersFromRoles(
    array<String^>^ usernames,
    array<String^>^ rolenames
) override

Parameters

usernames
Type: array< System..::.String >[]()[]
rolenames
Type: array< System..::.String >[]()[]

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


RoleExists Method

[image]

MySQL Connector/Net
MySQLRoleProvider..::.RoleExists Method
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override bool RoleExists(
    string rolename
)
Visual Basic (Declaration)
Public Overrides Function RoleExists ( _
    rolename As String _
) As Boolean
Visual C++
public:
virtual bool RoleExists(
    String^ rolename
) override

Parameters

rolename
Type: System..::.String

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


MySQLRoleProvider Properties

[image] [image]

MySQL Connector/Net
MySQLRoleProvider Properties
MySQLRoleProvider Class See Also Send Feedback

The MySQLRoleProvider type exposes the following members.

Properties

Name | Description
ApplicationName | (Overrides RoleProvider..::.ApplicationName.)
Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Inherited from ProviderBase.)
Name | Gets the friendly name used to refer to the provider during configuration. (Inherited from ProviderBase.)
WriteExceptionsToEventLog |

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


ApplicationName Property

[image]

MySQL Connector/Net
MySQLRoleProvider..::.ApplicationName Property
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public override string ApplicationName { get; set; }
Visual Basic (Declaration)
Public Overrides Property ApplicationName As String
Visual C++
public:
virtual property String^ ApplicationName {
    String^ get () override;
    void set (String^ value) override;
}

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace


WriteExceptionsToEventLog Property

[image]

MySQL Connector/Net
MySQLRoleProvider..::.WriteExceptionsToEventLog Property
MySQLRoleProvider Class See Also Send Feedback

Namespace: MySql.Web.Security
Assembly: MySql.Web (in MySql.Web.dll) Version: 6.0.4.0

Syntax

C#
public bool WriteExceptionsToEventLog { get; set; }
Visual Basic (Declaration)
Public Property WriteExceptionsToEventLog As Boolean
Visual C++
public:
property bool WriteExceptionsToEventLog {
    bool get ();
    void set (bool value);
}

See Also

MySQLRoleProvider Class
MySql.Web.Security Namespace