The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
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.

MySqlParameter.xml 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <MyDocs>
  2. <MyMembers name="Class">
  3. <remarks>
  4. Parameter names are not case sensitive.
  5. </remarks>
  6. <example>
  7. The following example creates multiple instances of <B>MySqlParameter</B> through the
  8. <see cref="MySqlParameterCollection"/> collection within the <see cref="MySqlDataAdapter"/>.
  9. These parameters are used to select data from the data source and place the data
  10. in the <see cref="DataSet"/>. This example assumes that a <B>DataSet</B> and a
  11. <B>MySqlDataAdapter</B> have already been created with the appropriate schema, commands,
  12. and connection.
  13. <code lang="vbnet">
  14. Public Sub AddSqlParameters()
  15. ' ...
  16. ' create myDataSet and myDataAdapter
  17. ' ...
  18. myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters"
  19. myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239
  20. myDataAdapter.Fill(myDataSet)
  21. End Sub 'AddSqlParameters
  22. </code>
  23. <code lang="C#">
  24. public void AddSqlParameters()
  25. {
  26. // ...
  27. // create myDataSet and myDataAdapter
  28. // ...
  29. myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters";
  30. myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239;
  31. myDataAdapter.Fill(myDataSet);
  32. }
  33. </code>
  34. </example>
  35. </MyMembers>
  36. </MyDocs>