(SOFT) SOFT (2010 год)

ADO.NET обвязка для работы с MySQL в ASP.NET-сайтах под Windows.

usb flash Эта хорошо зарекомендовавшая себя на протяжении многих лет обвязка вокруг MySql.Data.dll предназначена для сокрытия деталей запросов в базу MySQL. Она позволяет в основном коде ASP.NET-сайта обращаться в базу MySQL примерно вот в таком стиле (передавая процедуре AddMail сразу три параметра ToAddr, MailSubject и Body в одной строке вместе со значениями параметров):


   1:          Dim SendedMailID As Integer
   2:          Dim AddMail As New ExecMySQL_RDR("ToAddr", ToAddr, "MailSubject", Subject, "Body", Body)
   3:          Dim DR1 As MySql.Data.MySqlClient.MySqlDataReader = AddMail.ExecMySQL("AddMail", Data.CommandType.StoredProcedure)
   4:          If DR1.Read Then
   5:              SendedMailID = DR1("MailId")
   6:          End If

Количество параметров может быть до тридцати, строка коннекта вычитывается из Web-конфига сайта. В журнале Windows выполянются записи об ошибках SQL-запросов.


   1:  'Выполнение CMD с тридцатью параметрами и возвращением Reader
   2:  Imports Microsoft.VisualBasic
   3:  Imports MySql.Data.MySqlClient
   4:   
   5:  <ComponentModel.Description("для WEB на HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog требует FULL Control для учетной записи ASP.NET и NETWORK SERVICE")> _
   6:  Public Class ExecMySQL_RDR
   7:      'имя строки подключения в WEB-конфиг по умолчанию для этой процедуры
   8:      Dim WebConfig_ConnectionStringsName As String = "MySQLConnectionString"
   9:      Dim CN As MySqlConnection, PRM(29) As MySqlParameter
  10:      Dim CMD As New MySqlCommand
  11:   
  12:      Public Property SqlCN() As MySqlConnection
  13:          Get
  14:              Return CN
  15:          End Get
  16:          Set(ByVal value As MySqlConnection)
  17:              CN = SqlCN
  18:          End Set
  19:      End Property
  20:   
  21:      Public ReadOnly Property SqlCMD() As MySqlCommand
  22:          Get
  23:              SqlCMD = CMD
  24:          End Get
  25:      End Property
  26:   
  27:      ''' <summary>
  28:      ''' Вернуть SqlDataReader с результатами выполнения команды, указав только команду
  29:      ''' </summary>
  30:      Public Function ExecMySQL(ByVal CommandName As String) As MySqlDataReader
  31:          Return ExecMySQL(CommandName, System.Data.CommandType.StoredProcedure, System.Configuration.ConfigurationManager.ConnectionStrings(WebConfig_ConnectionStringsName).ConnectionString.ToString, System.Data.CommandBehavior.Default, 5000)
  32:      End Function
  33:   
  34:      ''' <summary>
  35:      ''' Вернуть SqlDataReader с результатами выполнения команды, указав только команду и ее тип
  36:      ''' </summary>
  37:      Public Function ExecMySQL(ByVal CommandName As String, ByVal CommandType As System.Data.CommandType) As MySqlDataReader
  38:          Return ExecMySQL(CommandName, CommandType, System.Configuration.ConfigurationManager.ConnectionStrings(WebConfig_ConnectionStringsName).ConnectionString.ToString, System.Data.CommandBehavior.Default, 5000)
  39:      End Function
  40:   
  41:      ''' <summary>
  42:      ''' Вернуть SqlDataReader с результатами выполнения команды, указав только команду, ее тип и особенности ее исполнения
  43:      ''' </summary>
  44:      Public Function ExecMySQL(ByVal CommandName As String, ByVal CommandType As System.Data.CommandType, ByVal ReaderBehavior As System.Data.CommandBehavior) As MySqlDataReader
  45:          Return ExecMySQL(CommandName, CommandType, System.Configuration.ConfigurationManager.ConnectionStrings(WebConfig_ConnectionStringsName).ConnectionString.ToString, ReaderBehavior, 5000)
  46:      End Function
  47:   
  48:      ''' <summary>
  49:      ''' Вернуть SqlDataReader с результатами выполнения команды, указав только команду, ее тип, особенности ее исполнения и таймаут
  50:      ''' </summary>
  51:      Public Function ExecMySQL(ByVal CommandName As String, ByVal CommandType As System.Data.CommandType, ByVal ReaderBehavior As System.Data.CommandBehavior, ByVal Timeout As Integer) As MySqlDataReader
  52:          Return ExecMySQL(CommandName, CommandType, System.Configuration.ConfigurationManager.ConnectionStrings(WebConfig_ConnectionStringsName).ConnectionString.ToString, ReaderBehavior, Timeout)
  53:      End Function
  54:   
  55:      ''' <summary>
  56:      ''' Вернуть SqlDataReader с результатами выполнения команды, указав только команду, ее тип, особенности ее исполнения, таймаут и явно указав строку подключения к SQL
  57:      ''' </summary>
  58:      Public Function ExecMySQL(ByVal CommandName As String, ByVal CommandType As System.Data.CommandType, ByVal ReaderBehavior As System.Data.CommandBehavior, ByVal Timeout As Integer, ByVal DirectConnectionString As String) As MySqlDataReader
  59:          Return ExecMySQL(CommandName, CommandType, DirectConnectionString, ReaderBehavior, Timeout)
  60:      End Function
  61:   
  62:      Private Function ExecMySQL(ByVal CommandName As String, ByVal CommandType As System.Data.CommandType, ByVal ConnectionStringName As String, ByVal ReaderBehavior As System.Data.CommandBehavior, ByVal Timeout As Integer) As MySqlDataReader
  63:          Dim LogMSG As New System.Text.StringBuilder
  64:          CN = New MySqlConnection(ConnectionStringName)
  65:          Try
  66:              CN.Open()
  67:          Catch ex As Exception
  68:              LogMSG.Append("Database connection is not open. ConnectionString=""" & ConnectionStringName & """" & vbCrLf)
  69:              If Not (ex.StackTrace Is Nothing) Then
  70:                  LogMSG.AppendLine(ex.StackTrace)
  71:              End If
  72:              Dim Encoder As New Text.ASCIIEncoding
  73:              If System.Web.HttpContext.Current Is Nothing Then
  74:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1)
  75:              Else
  76:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1, Encoder.GetBytes(System.Web.HttpContext.Current.Request.Url.PathAndQuery))
  77:              End If
  78:              Me.Close()
  79:              Throw New Exception("Database connection is not open.", ex)
  80:              Exit Function
  81:          End Try
  82:          '
  83:          If CMD Is Nothing Then
  84:              LogMSG.Append("Error in Business Layer Logic. CMD object is nothing." & vbCrLf)
  85:              If Not (Environment.StackTrace Is Nothing) Then
  86:                  LogMSG.AppendLine(Environment.StackTrace)
  87:              End If
  88:              Dim Encoder As New Text.ASCIIEncoding
  89:              If System.Web.HttpContext.Current Is Nothing Then
  90:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1)
  91:              Else
  92:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1, Encoder.GetBytes(System.Web.HttpContext.Current.Request.Url.PathAndQuery))
  93:              End If
  94:              Me.Close()
  95:              Throw New Exception("Error in Business Layer Logic. CMD object is nothing.")
  96:              Exit Function
  97:          End If
  98:          '
  99:          CMD.Connection = CN
 100:          CMD.CommandText = CommandName
 101:          CMD.CommandType = CommandType
 102:          '
 103:          Try
 104:              ExecMySQL = CMD.ExecuteReader(ReaderBehavior)
 105:          Catch ex As Exception
 106:              'для WEB на HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog требует FULL Control для учетной записи ASP.NET и NETWORK SERVICE
 107:              LogMSG.Append("Error in SQL command <" & CMD.CommandText & ">" & vbCrLf & ex.Message & vbCrLf)
 108:              If Not (ex.InnerException Is Nothing) Then
 109:                  LogMSG.AppendLine(ex.InnerException.ToString)
 110:                  LogMSG.AppendLine()
 111:              End If
 112:              If Not (ex.StackTrace Is Nothing) Then
 113:                  LogMSG.AppendLine(ex.StackTrace)
 114:              End If
 115:              Dim Encoder As New Text.ASCIIEncoding
 116:              If System.Web.HttpContext.Current Is Nothing Then
 117:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1)
 118:              Else
 119:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1, Encoder.GetBytes(System.Web.HttpContext.Current.Request.Url.PathAndQuery))
 120:              End If
 121:              Dim CmdText As String = CMD.CommandText
 122:              Me.Close()
 123:              Throw New Exception("Error in SQL command <" & CmdText & ">", ex)
 124:          End Try
 125:      End Function
 126:   
 127:      ''' <summary>
 128:      ''' исполнение команды в текущем коннекте - типа множественных инсертов
 129:      ''' </summary>
 130:      Public Function ExecMySQL_continue(ByVal CN As MySql.Data.MySqlClient.MySqlConnection, ByVal CommandName As String, ByVal CommandType As System.Data.CommandType, ByVal ReaderBehavior As System.Data.CommandBehavior, ByVal Timeout As Integer) As MySqlDataReader
 131:          Dim LogMSG As New System.Text.StringBuilder
 132:          If CN.State <> Data.ConnectionState.Open Then
 133:              LogMSG.Append("Database connection is not open. ConnectionString=""" & CN.ConnectionString & """" & vbCrLf)
 134:              Dim Encoder As New Text.ASCIIEncoding
 135:              If System.Web.HttpContext.Current Is Nothing Then
 136:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1)
 137:              Else
 138:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1, Encoder.GetBytes(System.Web.HttpContext.Current.Request.Url.PathAndQuery))
 139:              End If
 140:              Me.Close()
 141:              Throw New Exception("Database connection is not open." & CN.ConnectionString)
 142:              Exit Function
 143:          End If
 144:          '
 145:          If CMD Is Nothing Then
 146:              LogMSG.Append("Error in Business Layer Logic. CMD object is nothing." & vbCrLf)
 147:              If Not (Environment.StackTrace Is Nothing) Then
 148:                  LogMSG.AppendLine(Environment.StackTrace)
 149:              End If
 150:              Dim Encoder As New Text.ASCIIEncoding
 151:              If System.Web.HttpContext.Current Is Nothing Then
 152:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1)
 153:              Else
 154:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1, Encoder.GetBytes(System.Web.HttpContext.Current.Request.Url.PathAndQuery))
 155:              End If
 156:              Me.Close()
 157:              Throw New Exception("Error in Business Layer Logic. CMD object is nothing.")
 158:              Exit Function
 159:          End If
 160:          '
 161:          CMD.Connection = CN
 162:          CMD.CommandText = CommandName
 163:          CMD.CommandType = CommandType
 164:          '
 165:          Try
 166:              ExecMySQL_continue = CMD.ExecuteReader(ReaderBehavior)
 167:          Catch ex As Exception
 168:              'для WEB на HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog требует FULL Control для учетной записи ASP.NET и NETWORK SERVICE
 169:              LogMSG.Append("Error in SQL command <" & CMD.CommandText & ">" & vbCrLf & ex.Message & vbCrLf)
 170:              If Not (ex.InnerException Is Nothing) Then
 171:                  LogMSG.AppendLine(ex.InnerException.ToString)
 172:                  LogMSG.AppendLine()
 173:              End If
 174:              If Not (ex.StackTrace Is Nothing) Then
 175:                  LogMSG.AppendLine(ex.StackTrace)
 176:              End If
 177:              Dim Encoder As New Text.ASCIIEncoding
 178:              If System.Web.HttpContext.Current Is Nothing Then
 179:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1)
 180:              Else
 181:                  System.Diagnostics.EventLog.WriteEntry("DataLevel", LogMSG.ToString, Diagnostics.EventLogEntryType.Error, 500, 1, Encoder.GetBytes(System.Web.HttpContext.Current.Request.Url.PathAndQuery))
 182:              End If
 183:              Dim CmdText As String = CMD.CommandText
 184:              Me.Close()
 185:              Throw New Exception("Error in SQL command <" & CmdText & ">", ex)
 186:          End Try
 187:      End Function
 188:   
 189:      ''' <summary>
 190:      ''' Закрыть коннект, закрыть ридер, закрыть объект команды и очистить все параметры
 191:      ''' </summary>
 192:      Public Sub Close()
 193:          CN.Close() 'иначе ридер просто закроется
 194:          CMD = Nothing
 195:          CN = Nothing
 196:          For i As Integer = 0 To PRM.Length - 1
 197:              If Not (PRM(i) Is Nothing) Then PRM(i) = Nothing
 198:          Next
 199:      End Sub
 200:   
 201:      Public Sub New()
 202:      End Sub
 203:   
 204:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object)
 205:          PRM(0) = New MySqlParameter(ParmName0, ParmValue0)
 206:          CMD.Parameters.Add(PRM(0))
 207:      End Sub
 208:   
 209:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object)
 210:          Call Me.New(ParmName0, ParmValue0)
 211:          PRM(1) = New MySqlParameter(ParmName1, ParmValue1)
 212:          CMD.Parameters.Add(PRM(1))
 213:      End Sub
 214:   
 215:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object)
 216:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1)
 217:          PRM(2) = New MySqlParameter(ParmName2, ParmValue2)
 218:          CMD.Parameters.Add(PRM(2))
 219:      End Sub
 220:   
 221:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object)
 222:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2)
 223:          PRM(3) = New MySqlParameter(ParmName3, ParmValue3)
 224:          CMD.Parameters.Add(PRM(3))
 225:      End Sub
 226:   
 227:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object)
 228:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3)
 229:          PRM(4) = New MySqlParameter(ParmName4, ParmValue4)
 230:          CMD.Parameters.Add(PRM(4))
 231:      End Sub
 232:   
 233:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object)
 234:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4)
 235:          PRM(5) = New MySqlParameter(ParmName5, ParmValue5)
 236:          CMD.Parameters.Add(PRM(5))
 237:      End Sub
 238:   
 239:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object)
 240:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5)
 241:          PRM(6) = New MySqlParameter(ParmName6, ParmValue6)
 242:          CMD.Parameters.Add(PRM(6))
 243:      End Sub
 244:   
 245:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object)
 246:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6)
 247:          PRM(7) = New MySqlParameter(ParmName7, ParmValue7)
 248:          CMD.Parameters.Add(PRM(7))
 249:      End Sub
 250:   
 251:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object)
 252:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7)
 253:          PRM(8) = New MySqlParameter(ParmName8, ParmValue8)
 254:          CMD.Parameters.Add(PRM(8))
 255:      End Sub
 256:   
 257:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object)
 258:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8)
 259:          PRM(9) = New MySqlParameter(ParmName9, ParmValue9)
 260:          CMD.Parameters.Add(PRM(9))
 261:      End Sub
 262:   
 263:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object)
 264:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9)
 265:          PRM(10) = New MySqlParameter(ParmName10, ParmValue10)
 266:          CMD.Parameters.Add(PRM(10))
 267:      End Sub
 268:   
 269:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object)
 270:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10)
 271:          PRM(11) = New MySqlParameter(ParmName11, ParmValue11)
 272:          CMD.Parameters.Add(PRM(11))
 273:      End Sub
 274:   
 275:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object)
 276:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11)
 277:          PRM(12) = New MySqlParameter(ParmName12, ParmValue12)
 278:          CMD.Parameters.Add(PRM(12))
 279:      End Sub
 280:   
 281:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object)
 282:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12)
 283:          PRM(13) = New MySqlParameter(ParmName13, ParmValue13)
 284:          CMD.Parameters.Add(PRM(13))
 285:      End Sub
 286:   
 287:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object)
 288:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13)
 289:          PRM(14) = New MySqlParameter(ParmName14, ParmValue14)
 290:          CMD.Parameters.Add(PRM(14))
 291:      End Sub
 292:   
 293:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object)
 294:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14)
 295:          PRM(15) = New MySqlParameter(ParmName15, ParmValue15)
 296:          CMD.Parameters.Add(PRM(15))
 297:      End Sub
 298:   
 299:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object)
 300:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15)
 301:          PRM(16) = New MySqlParameter(ParmName16, ParmValue16)
 302:          CMD.Parameters.Add(PRM(16))
 303:      End Sub
 304:   
 305:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object)
 306:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16)
 307:          PRM(17) = New MySqlParameter(ParmName17, ParmValue17)
 308:          CMD.Parameters.Add(PRM(17))
 309:      End Sub
 310:   
 311:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object)
 312:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17)
 313:          PRM(18) = New MySqlParameter(ParmName18, ParmValue18)
 314:          CMD.Parameters.Add(PRM(18))
 315:      End Sub
 316:   
 317:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object)
 318:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18)
 319:          PRM(19) = New MySqlParameter(ParmName19, ParmValue19)
 320:          CMD.Parameters.Add(PRM(19))
 321:      End Sub
 322:   
 323:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object)
 324:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19)
 325:          PRM(20) = New MySqlParameter(ParmName20, ParmValue20)
 326:          CMD.Parameters.Add(PRM(20))
 327:      End Sub
 328:   
 329:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object)
 330:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20)
 331:          PRM(21) = New MySqlParameter(ParmName21, ParmValue21)
 332:          CMD.Parameters.Add(PRM(21))
 333:      End Sub
 334:   
 335:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object)
 336:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21)
 337:          PRM(22) = New MySqlParameter(ParmName22, ParmValue22)
 338:          CMD.Parameters.Add(PRM(22))
 339:      End Sub
 340:   
 341:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object, ByVal ParmName23 As String, ByVal ParmValue23 As Object)
 342:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21, ParmName22, ParmValue22)
 343:          PRM(23) = New MySqlParameter(ParmName23, ParmValue23)
 344:          CMD.Parameters.Add(PRM(23))
 345:      End Sub
 346:   
 347:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object, ByVal ParmName23 As String, ByVal ParmValue23 As Object, ByVal ParmName24 As String, ByVal ParmValue24 As Object)
 348:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21, ParmName22, ParmValue22, ParmName23, ParmValue23)
 349:          PRM(24) = New MySqlParameter(ParmName24, ParmValue24)
 350:          CMD.Parameters.Add(PRM(24))
 351:      End Sub
 352:   
 353:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object, ByVal ParmName23 As String, ByVal ParmValue23 As Object, ByVal ParmName24 As String, ByVal ParmValue24 As Object, ByVal ParmName25 As String, ByVal ParmValue25 As Object)
 354:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21, ParmName22, ParmValue22, ParmName23, ParmValue23, ParmName24, ParmValue24)
 355:          PRM(25) = New MySqlParameter(ParmName25, ParmValue25)
 356:          CMD.Parameters.Add(PRM(25))
 357:      End Sub
 358:   
 359:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object, ByVal ParmName23 As String, ByVal ParmValue23 As Object, ByVal ParmName24 As String, ByVal ParmValue24 As Object, ByVal ParmName25 As String, ByVal ParmValue25 As Object, ByVal ParmName26 As String, ByVal ParmValue26 As Object)
 360:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21, ParmName22, ParmValue22, ParmName23, ParmValue23, ParmName24, ParmValue24, ParmName25, ParmValue25)
 361:          PRM(26) = New MySqlParameter(ParmName26, ParmValue26)
 362:          CMD.Parameters.Add(PRM(26))
 363:      End Sub
 364:   
 365:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object, ByVal ParmName23 As String, ByVal ParmValue23 As Object, ByVal ParmName24 As String, ByVal ParmValue24 As Object, ByVal ParmName25 As String, ByVal ParmValue25 As Object, ByVal ParmName26 As String, ByVal ParmValue26 As Object, ByVal ParmName27 As String, ByVal ParmValue27 As Object)
 366:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21, ParmName22, ParmValue22, ParmName23, ParmValue23, ParmName24, ParmValue24, ParmName25, ParmValue25, ParmName26, ParmValue26)
 367:          PRM(27) = New MySqlParameter(ParmName27, ParmValue27)
 368:          CMD.Parameters.Add(PRM(27))
 369:      End Sub
 370:   
 371:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object, ByVal ParmName23 As String, ByVal ParmValue23 As Object, ByVal ParmName24 As String, ByVal ParmValue24 As Object, ByVal ParmName25 As String, ByVal ParmValue25 As Object, ByVal ParmName26 As String, ByVal ParmValue26 As Object, ByVal ParmName27 As String, ByVal ParmValue27 As Object, ByVal ParmName28 As String, ByVal ParmValue28 As Object)
 372:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21, ParmName22, ParmValue22, ParmName23, ParmValue23, ParmName24, ParmValue24, ParmName25, ParmValue25, ParmName26, ParmValue26, ParmName27, ParmValue27)
 373:          PRM(28) = New MySqlParameter(ParmName28, ParmValue28)
 374:          CMD.Parameters.Add(PRM(28))
 375:      End Sub
 376:   
 377:      Public Sub New(ByVal ParmName0 As String, ByVal ParmValue0 As Object, ByVal ParmName1 As String, ByVal ParmValue1 As Object, ByVal ParmName2 As String, ByVal ParmValue2 As Object, ByVal ParmName3 As String, ByVal ParmValue3 As Object, ByVal ParmName4 As String, ByVal ParmValue4 As Object, ByVal ParmName5 As String, ByVal ParmValue5 As Object, ByVal ParmName6 As String, ByVal ParmValue6 As Object, ByVal ParmName7 As String, ByVal ParmValue7 As Object, ByVal ParmName8 As String, ByVal ParmValue8 As Object, ByVal ParmName9 As String, ByVal ParmValue9 As Object, ByVal ParmName10 As String, ByVal ParmValue10 As Object, ByVal ParmName11 As String, ByVal ParmValue11 As Object, ByVal ParmName12 As String, ByVal ParmValue12 As Object, ByVal ParmName13 As String, ByVal ParmValue13 As Object, ByVal ParmName14 As String, ByVal ParmValue14 As Object, ByVal ParmName15 As String, ByVal ParmValue15 As Object, ByVal ParmName16 As String, ByVal ParmValue16 As Object, ByVal ParmName17 As String, ByVal ParmValue17 As Object, ByVal ParmName18 As String, ByVal ParmValue18 As Object, ByVal ParmName19 As String, ByVal ParmValue19 As Object, ByVal ParmName20 As String, ByVal ParmValue20 As Object, ByVal ParmName21 As String, ByVal ParmValue21 As Object, ByVal ParmName22 As String, ByVal ParmValue22 As Object, ByVal ParmName23 As String, ByVal ParmValue23 As Object, ByVal ParmName24 As String, ByVal ParmValue24 As Object, ByVal ParmName25 As String, ByVal ParmValue25 As Object, ByVal ParmName26 As String, ByVal ParmValue26 As Object, ByVal ParmName27 As String, ByVal ParmValue27 As Object, ByVal ParmName28 As String, ByVal ParmValue28 As Object, ByVal ParmName29 As String, ByVal ParmValue29 As Object)
 378:          Call Me.New(ParmName0, ParmValue0, ParmName1, ParmValue1, ParmName2, ParmValue2, ParmName3, ParmValue3, ParmName4, ParmValue4, ParmName5, ParmValue5, ParmName6, ParmValue6, ParmName7, ParmValue7, ParmName8, ParmValue8, ParmName9, ParmValue9, ParmName10, ParmValue10, ParmName11, ParmValue11, ParmName12, ParmValue12, ParmName13, ParmValue13, ParmName14, ParmValue14, ParmName15, ParmValue15, ParmName16, ParmValue16, ParmName17, ParmValue17, ParmName18, ParmValue18, ParmName19, ParmValue19, ParmName20, ParmValue20, ParmName21, ParmValue21, ParmName22, ParmValue22, ParmName23, ParmValue23, ParmName24, ParmValue24, ParmName25, ParmValue25, ParmName26, ParmValue26, ParmName27, ParmValue27, ParmName28, ParmValue28)
 379:          PRM(29) = New MySqlParameter(ParmName29, ParmValue29)
 380:          CMD.Parameters.Add(PRM(29))
 381:      End Sub
 382:   
 383:  End Class

Пример использования этой библиотеки вы можете увидеть на страничке Избавляемся от базы стандартных пользователей ASP.NET на MS SQL - пример ASP.NET сайта на MySQL. Вот еще один простенький примерчик вызова этой обвязки - хандлер для разгрузки базы вдмином сайта в Excel. Здесь, как вы видите, три вида разгрузки. В отличии от примера с юзерами - тут все считывается в таблы (причем с игнором нарушения контрейнсов), а потом CSV выгружается в поток браузера.


   1:  <%@ WebHandler Language="VB" Class="Download_DB" %>
   2:   
   3:  Imports System
   4:  Imports System.Web
   5:   
   6:  Public Class Download_DB : Implements IHttpHandler, IRequiresSessionState
   7:      
   8:      Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
   9:          If HttpContext.Current.User.Identity.IsAuthenticated Then
  10:              If context.Current.Request.QueryString("i") IsNot Nothing Then
  11:                  Try
  12:                      Dim IsAdmin As Boolean = False
  13:                      Dim GetUsers As New ExecMySQL_RDR("Email", HttpContext.Current.User.Identity.Name)
  14:                      Dim DR1 As MySql.Data.MySqlClient.MySqlDataReader = GetUsers.ExecMySQL("SELECT IsAdmin FROM aspnet_users Where Email=@Email;", Data.CommandType.Text)
  15:                      If DR1.Read Then
  16:                          If Not IsDBNull(DR1(0)) Then
  17:                              IsAdmin = DR1(0)
  18:                          End If
  19:                      End If
  20:                      GetUsers.Close()
  21:                      If Not IsAdmin Then
  22:                          context.Response.ContentType = "text/plain"
  23:                          context.Response.Write("No right")
  24:                          Exit Sub
  25:                      End If
  26:                  Catch ex As Exception
  27:                      context.Response.ContentType = "text/plain"
  28:                      context.Response.Write(ex.Message)
  29:                      Exit Sub
  30:                  End Try
  31:                  'здесь уже точно админ сайта
  32:                  Dim DT1 As New Data.DataTable
  33:                  Dim ResponseFileName As String = ""
  34:                  Dim ResponseStream As New Text.StringBuilder
  35:                  Try
  36:                      Select Case context.Current.Request.QueryString("i")
  37:                          Case 1
  38:                              Dim GetMusic As New ExecMySQL_RDR()
  39:                              Dim DR1 As MySql.Data.MySqlClient.MySqlDataReader = GetMusic.ExecMySQL("SELECT * From all_audio;", Data.CommandType.Text)
  40:                              Try
  41:                                  DT1.Load(DR1)
  42:                              Catch e As System.Data.ConstraintException
  43:                                  'пофиг
  44:                              End Try
  45:                              GetMusic.Close()
  46:                              ResponseFileName = "Music_" & Now.ToString.Replace(" ", "_").Replace(".", "_").Replace(":", "_") & ".csv"
  47:                          Case 2
  48:                              Dim GetUser As New ExecMySQL_RDR()
  49:                              Dim DR1 As MySql.Data.MySqlClient.MySqlDataReader = GetUser.ExecMySQL("SELECT * FROM aspnet_users;", Data.CommandType.Text)
  50:                              Try
  51:                                  DT1.Load(DR1)
  52:                              Catch e As System.Data.ConstraintException
  53:                                  'пофиг
  54:                              End Try
  55:                              GetUser.Close()
  56:                              ResponseFileName = "User_" & Now.ToString.Replace(" ", "_").Replace(".", "_").Replace(":", "_") & ".csv"
  57:                          Case 3
  58:                              Dim GetPayment As New ExecMySQL_RDR()
  59:                              Dim DR1 As MySql.Data.MySqlClient.MySqlDataReader = GetPayment.ExecMySQL("SELECT * FROM Payment;", Data.CommandType.Text)
  60:                              Try
  61:                                  DT1.Load(DR1)
  62:                              Catch e As System.Data.ConstraintException
  63:                                  'пофиг
  64:                              End Try
  65:                              GetPayment.Close()
  66:                              ResponseFileName = "Payment_" & Now.ToString.Replace(" ", "_").Replace(".", "_").Replace(":", "_") & ".csv"
  67:                      End Select
  68:                      '
  69:                      For i As Integer = 0 To DT1.Rows.Count - 1
  70:                          For j As Integer = 0 To DT1.Columns.Count - 1
  71:                              If Not IsDBNull(DT1.Rows(i)(j)) Then
  72:                                  ResponseStream.Append(DT1.Rows(i)(j))
  73:                              End If
  74:                              ResponseStream.Append(";")
  75:                          Next
  76:                          ResponseStream.Append(vbCrLf)
  77:                      Next
  78:                      '
  79:                      context.Response.ContentType = "text/csv" '"attachment"
  80:                      context.Response.Charset = "utf-8"
  81:                      context.Response.AppendHeader("content-disposition", "attachment; filename=" & ResponseFileName)
  82:                      context.Response.Write(ResponseStream.ToString)
  83:                      '
  84:                  Catch ex As Exception
  85:                      context.Response.ContentType = "text/plain"
  86:                      context.Response.Write(ex.Message)
  87:                  End Try
  88:            
  89:              End If
  90:          Else
  91:              context.Response.ContentType = "text/plain"
  92:              context.Response.Write("Session experied")
  93:          End If
  94:      End Sub
  95:   
  96:      Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
  97:          Get
  98:              Return False
  99:          End Get
 100:      End Property
 101:   
 102:  End Class

Обратите внимание, что враппер ExecMySQL_RDR, в отличие от множества других, опубликованных у меня на сайте - не предназначен для работы в MONO. Это программа для Windows. Еще один пример ее использования вы можете посмотреть на страничке Как сделать SOAP/WSDL-вебсервис на ASP.NET/MONO для вызова его из FLEX.

Обратите также внимание на ключ рееста, на который вы должны поставить разрешение на Web-сервере.



Comments ( )
Link to this page: //www.vb-net.com/ExecMySQL_RDR/index.htm
< THANKS ME>