The following example creates multiple instances of that are exposed as a collection through the object within . This code example assumes that an instance of was created properly. Public Sub AddQueryAttributes() ' ... ' create MySqlCommand ' ... myCommand.Attributes.SetAttribute("queryAttribute", "value of the query attribute") myCommand.Attributes.SetAttribute("queryAttribute2", DateTime.Now) End Sub public void AddQueryAttributes() { // ... // create MySqlCommand // ... myCommand.Attributes.SetAttribute("queryAttribute", "value of the query attribute"); myCommand.Attributes.SetAttribute("queryAttribute2", DateTime.Now); }