You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.5 KiB
45 lines
1.5 KiB
<MyDocs>
|
|
<MyMembers name="Class">
|
|
<remarks>
|
|
Parameter names are not case sensitive.
|
|
</remarks>
|
|
|
|
<example>
|
|
The following example creates multiple instances of <B>MySqlParameter</B> through the
|
|
<see cref="MySqlParameterCollection"/> collection within the <see cref="MySqlDataAdapter"/>.
|
|
These parameters are used to select data from the data source and place the data
|
|
in the <see cref="DataSet"/>. This example assumes that a <B>DataSet</B> and a
|
|
<B>MySqlDataAdapter</B> have already been created with the appropriate schema, commands,
|
|
and connection.
|
|
<code lang="vbnet">
|
|
Public Sub 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)
|
|
End Sub 'AddSqlParameters
|
|
</code>
|
|
<code lang="C#">
|
|
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);
|
|
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
|
|
</MyMembers>
|
|
|
|
|
|
|
|
</MyDocs> |