62 changed files with 12836 additions and 1169 deletions
@ -1,10 +1,10 @@
@@ -1,10 +1,10 @@
|
||||
๏ปฟ<?xml version="1.0" encoding="utf-8"?> |
||||
<packages> |
||||
<package id="CommandLineParser" version="1.9.71" targetFramework="net452" /> |
||||
<package id="EntityFramework" version="6.1.3" targetFramework="net452" /> |
||||
<package id="EntityFramework" version="6.2.0" targetFramework="net462" /> |
||||
<package id="GitVersionTask" version="3.6.5" targetFramework="net462" developmentDependency="true" /> |
||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net452" /> |
||||
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net452" /> |
||||
<package id="nClam" version="2.0.6.0" targetFramework="net462" /> |
||||
<package id="Newtonsoft.Json" version="10.0.1" targetFramework="net462" /> |
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net462" /> |
||||
</packages> |
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,934 @@
@@ -0,0 +1,934 @@
|
||||
<docs> |
||||
<ClassSummary> |
||||
<summary>Represents a SQL statement to execute against a MySQL database. This class cannot be inherited.</summary> |
||||
<remarks> |
||||
<B>MySqlCommand</B> features the following methods for executing commands at a MySQL database: |
||||
<list type="table"> |
||||
<listheader> |
||||
<term>Item</term> |
||||
<term>Description</term> |
||||
</listheader> |
||||
<item> |
||||
<term> |
||||
<a href="MySql.Data.MySqlClient.MySqlCommand.ExecuteReader_overloads.html">ExecuteReader</a> |
||||
</term> |
||||
<description>Executes commands that return rows.</description> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<a href="MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery.html">ExecuteNonQuery</a> |
||||
</term> |
||||
<description>Executes commands such as SQL INSERT, DELETE, and UPDATE statements.</description> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<a href="MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar.html">ExecuteScalar</a> |
||||
</term> |
||||
<description>Retrieves a single value (for example, an aggregate value) from a database.</description> |
||||
</item> |
||||
</list> |
||||
|
||||
You can reset the <B>CommandText</B> property and reuse the <B>MySqlCommand</B> |
||||
object. However, you must close the <A |
||||
href="MySql.Data.MySqlClient.MySqlDataReader.html">MySqlDataReader</A> |
||||
before you can execute a new or previous command. |
||||
|
||||
If a <A href="MySql.Data.MySqlClient.MySqlException.html">MySqlException</A> is |
||||
generated by the method executing a <B>MySqlCommand</B>, the <A |
||||
href="MySql.Data.MySqlClient.MySqlConnection.html">MySqlConnection</A> |
||||
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. |
||||
</note> |
||||
</remarks> |
||||
|
||||
<example> |
||||
The following example creates a <A href="frlrfsystemdatasqlclientsqlcommandclasstopic.htm">MySqlCommand</A> and |
||||
a <B>MySqlConnection</B>. The <B>MySqlConnection</B> is opened and set as the <A |
||||
href="frlrfsystemdatasqlclientsqlcommandclassconnectiontopic.htm">Connection</A> |
||||
for the <B>MySqlCommand</B>. The example then calls <A |
||||
href="frlrfsystemdatasqlclientsqlcommandclassexecutenonquerytopic.htm">ExecuteNonQuery</A>, |
||||
and closes the connection. To accomplish this, the <B>ExecuteNonQuery</B> is |
||||
passed a connection string and a query string that is a SQL INSERT |
||||
statement. |
||||
<code lang="vbnet"> |
||||
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 |
||||
</code> |
||||
<code lang="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(); |
||||
} |
||||
</code> |
||||
</example> |
||||
</ClassSummary> |
||||
|
||||
|
||||
|
||||
<ctor1> |
||||
<overloads> |
||||
<summary> |
||||
Initializes a new instance of the MySqlCommand class. |
||||
</summary> |
||||
<example> |
||||
The following example creates a MySqlCommand and sets some of its properties. |
||||
<para></para> |
||||
<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. |
||||
</note> |
||||
|
||||
<code lang="vbnet"> |
||||
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 |
||||
</code> |
||||
<code lang="C#"> |
||||
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; |
||||
} |
||||
</code> |
||||
<code lang="C++"> |
||||
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; |
||||
}; |
||||
</code> |
||||
</example> |
||||
</overloads> |
||||
|
||||
|
||||
<summary> |
||||
Initializes a new instance of the MySqlCommand class. |
||||
</summary> |
||||
<remarks> |
||||
The base constructor initializes all fields to their default values. The |
||||
following table shows initial property values for an instance of <see cref="MySqlCommand"/>. |
||||
<list type="table"> |
||||
<listheader> |
||||
<term>Properties</term> |
||||
<term>Initial Value</term> |
||||
</listheader> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandText"/> |
||||
</term> |
||||
<term>empty string ("")</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandTimeout"/> |
||||
</term> |
||||
<term>0</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandType"/> |
||||
</term> |
||||
<term>CommandType.Text</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="Connection"/> |
||||
</term> |
||||
<term>Null</term> |
||||
</item> |
||||
</list> |
||||
<para> |
||||
You can change the value for any of these properties through a separate call to |
||||
the property. |
||||
</para> |
||||
</remarks> |
||||
<example> |
||||
The following example creates a <see cref="MySqlCommand"/> and |
||||
sets some of its properties. |
||||
|
||||
<code lang="vbnet"> |
||||
Public Sub CreateMySqlCommand() |
||||
Dim myCommand As New MySqlCommand() |
||||
myCommand.CommandType = CommandType.Text |
||||
End Sub |
||||
</code> |
||||
<code lang="C#"> |
||||
public void CreateMySqlCommand() |
||||
{ |
||||
MySqlCommand myCommand = new MySqlCommand(); |
||||
myCommand.CommandType = CommandType.Text; |
||||
} |
||||
</code> |
||||
</example> |
||||
</ctor1> |
||||
|
||||
<ctor2> |
||||
<summary> |
||||
Initializes a new instance of the <see cref="MySqlCommand"/> class with the text of the query. |
||||
</summary> |
||||
<param name="cmdText">The text of the query.</param> |
||||
<remarks> |
||||
When an instance of <see cref="MySqlCommand"/> is created, |
||||
the following read/write properties are set to initial values. |
||||
|
||||
<list type="table"> |
||||
<listheader> |
||||
<term>Properties</term> |
||||
<term>Initial Value</term> |
||||
</listheader> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandText"/> |
||||
</term> |
||||
<term> |
||||
<i>cmdText</i> |
||||
</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandTimeout"/> |
||||
</term> |
||||
<term>0</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandType"/> |
||||
</term> |
||||
<term>CommandType.Text</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="Connection"/> |
||||
</term> |
||||
<term>Null</term> |
||||
</item> |
||||
</list> |
||||
<para> |
||||
You can change the value for any of these properties through a separate call to |
||||
the property. |
||||
</para> |
||||
</remarks> |
||||
<example> |
||||
The following example creates a <see cref="MySqlCommand"/> and |
||||
sets some of its properties. |
||||
|
||||
<code lang="vbnet"> |
||||
Public Sub CreateMySqlCommand() |
||||
Dim sql as String = "SELECT * FROM mytable" |
||||
Dim myCommand As New MySqlCommand(sql) |
||||
myCommand.CommandType = CommandType.Text |
||||
End Sub |
||||
</code> |
||||
<code lang="C#"> |
||||
public void CreateMySqlCommand() |
||||
{ |
||||
string sql = "SELECT * FROM mytable"; |
||||
MySqlCommand myCommand = new MySqlCommand(sql); |
||||
myCommand.CommandType = CommandType.Text; |
||||
} |
||||
</code> |
||||
</example> |
||||
</ctor2> |
||||
|
||||
<ctor3> |
||||
<summary> |
||||
Initializes a new instance of the <see cref="MySqlCommand"/> class |
||||
with the text of the query and a <see cref="MySqlConnection"/>. |
||||
</summary> |
||||
<param name="cmdText">The text of the query.</param> |
||||
<param name="connection"> |
||||
A <see cref="MySqlConnection"/> that represents the |
||||
connection to an instance of SQL Server. |
||||
</param> |
||||
<remarks> |
||||
When an instance of <see cref="MySqlCommand"/> is created, |
||||
the following read/write properties are set to initial values. |
||||
|
||||
<list type="table"> |
||||
<listheader> |
||||
<term>Properties</term> |
||||
<term>Initial Value</term> |
||||
</listheader> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandText"/> |
||||
</term> |
||||
<term> |
||||
<i>cmdText</i> |
||||
</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandTimeout"/> |
||||
</term> |
||||
<term>0</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandType"/> |
||||
</term> |
||||
<term>CommandType.Text</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="Connection"/> |
||||
</term> |
||||
<term> |
||||
<i>connection</i> |
||||
</term> |
||||
</item> |
||||
</list> |
||||
<para> |
||||
You can change the value for any of these properties through a separate call to |
||||
the property. |
||||
</para> |
||||
</remarks> |
||||
<example> |
||||
The following example creates a <see cref="MySqlCommand"/> and |
||||
sets some of its properties. |
||||
|
||||
<code lang="vbnet"> |
||||
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 |
||||
</code> |
||||
<code lang="C#"> |
||||
public void CreateMySqlCommand() |
||||
{ |
||||
MySqlConnection conn = new MySqlConnection("server=myserver") |
||||
string sql = "SELECT * FROM mytable"; |
||||
MySqlCommand myCommand = new MySqlCommand(sql, conn); |
||||
myCommand.CommandType = CommandType.Text; |
||||
} |
||||
</code> |
||||
</example> |
||||
|
||||
|
||||
</ctor3> |
||||
|
||||
<ctor4> |
||||
<summary> |
||||
Initializes a new instance of the <see cref="MySqlCommand"/> class |
||||
with the text of the query, a <see cref="MySqlConnection"/>, and the |
||||
<see cref="MySqlTransaction"/>. |
||||
</summary> |
||||
|
||||
<param name="cmdText">The text of the query.</param> |
||||
<param name="connection"> |
||||
A <see cref="MySqlConnection"/> that represents the |
||||
connection to an instance of SQL Server. |
||||
</param> |
||||
<param name="transaction"> |
||||
The <see cref="MySqlTransaction"/> in which the <see cref="MySqlCommand"/> executes. |
||||
</param> |
||||
<remarks> |
||||
When an instance of <see cref="MySqlCommand"/> is created, |
||||
the following read/write properties are set to initial values. |
||||
|
||||
<list type="table"> |
||||
<listheader> |
||||
<term>Properties</term> |
||||
<term>Initial Value</term> |
||||
</listheader> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandText"/> |
||||
</term> |
||||
<term> |
||||
<i>cmdText</i> |
||||
</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandTimeout"/> |
||||
</term> |
||||
<term>0</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="CommandType"/> |
||||
</term> |
||||
<term>CommandType.Text</term> |
||||
</item> |
||||
<item> |
||||
<term> |
||||
<see cref="Connection"/> |
||||
</term> |
||||
<term> |
||||
<i>connection</i> |
||||
</term> |
||||
</item> |
||||
</list> |
||||
<para> |
||||
You can change the value for any of these properties through a separate call to |
||||
the property. |
||||
</para> |
||||
</remarks> |
||||
<example> |
||||
The following example creates a <see cref="MySqlCommand"/> and |
||||
sets some of its properties. |
||||
|
||||
<code lang="vbnet"> |
||||
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 |
||||
</code> |
||||
<code lang="C#"> |
||||
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; |
||||
} |
||||
</code> |
||||
</example> |
||||
|
||||
</ctor4> |
||||
|
||||
|
||||
|
||||
|
||||
<ExecuteNonQuery> |
||||
<summary> |
||||
Executes a SQL statement against the connection and returns the number of rows affected. |
||||
</summary> |
||||
<returns>Number of rows affected</returns> |
||||
<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. |
||||
</remarks> |
||||
<example> |
||||
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. |
||||
<code lang="vbnet"> |
||||
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 |
||||
</code> |
||||
<code lang="C#"> |
||||
public void CreateMySqlCommand(string myExecuteQuery, MySqlConnection myConnection) |
||||
{ |
||||
MySqlCommand myCommand = new MySqlCommand(myExecuteQuery, myConnection); |
||||
myCommand.Connection.Open(); |
||||
myCommand.ExecuteNonQuery(); |
||||
myConnection.Close(); |
||||
} |
||||
</code> |
||||
</example> |
||||
</ExecuteNonQuery> |
||||
|
||||
<ExecuteReader1> |
||||
<summary> |
||||
Sends the <see cref="CommandText"/> to the <see cref="MySqlConnection">Connection</see>, |
||||
and builds a <see cref="MySqlDataReader"/> using one of the <see cref="CommandBehavior"/> values. |
||||
</summary> |
||||
<param name="behavior"> |
||||
One of the <see cref="CommandBehavior"/> values. |
||||
</param> |