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.
31 lines
1.1 KiB
31 lines
1.1 KiB
1 month ago
|
<docs>
|
||
|
<ClassSummary>
|
||
|
<example>
|
||
|
The following example creates multiple instances of <see cref="MySqlAttribute"/>
|
||
|
that are exposed as a collection through the <see cref="MySqlAttributeCollection"/>
|
||
|
object within <see cref="MySqlCommand"/>. This code example assumes that an instance
|
||
|
of <see cref="MySqlCommand"/> was created
|
||
|
properly.
|
||
|
<code lang="vbnet">
|
||
|
Public Sub AddQueryAttributes()
|
||
|
' ...
|
||
|
' create MySqlCommand
|
||
|
' ...
|
||
|
myCommand.Attributes.SetAttribute("queryAttribute", "value of the query attribute")
|
||
|
myCommand.Attributes.SetAttribute("queryAttribute2", DateTime.Now)
|
||
|
End Sub
|
||
|
</code>
|
||
|
<code lang="C#">
|
||
|
public void AddQueryAttributes()
|
||
|
{
|
||
|
// ...
|
||
|
// create MySqlCommand
|
||
|
// ...
|
||
|
|
||
|
myCommand.Attributes.SetAttribute("queryAttribute", "value of the query attribute");
|
||
|
myCommand.Attributes.SetAttribute("queryAttribute2", DateTime.Now);
|
||
|
}
|
||
|
</code>
|
||
|
</example>
|
||
|
</ClassSummary>
|
||
|
</docs>
|