Can you try this function
Public Function getSP2DataTable(ByVal spName As String, ByVal paramName() As String, ByVal paramValue() As String)
On Error GoTo ErrorHappening
Dim rtnDT As New DataTable
Dim StartTime As Date = TimeOfDay
Dim endTime As Date
Using tmpDT As New DataTable
Using myDB As New MySql.Data.MySqlClient.MySqlConnection(ConString)
myDB.Open()
Using myCMD As New MySql.Data.MySqlClient.MySqlCommand(spName, myDB)
myCMD.CommandType = CommandType.StoredProcedure
For i As Byte = 0 To paramName.GetUpperBound(0)
myCMD.Parameters.AddWithValue(paramName(i), paramValue(i))
Next
Dim myResult As IAsyncResult = myCMD.BeginExecuteReader
Using myDataSet As New DataSet
Using myAdapter As New MySql.Data.MySqlClient.MySqlDataAdapter(myCMD)
myAdapter.Fill(myDataSet)
rtnDT = myDataSet.Tables(0)
End Using
End Using
endTime = TimeOfDay
frmMain.scriptTime.Text = "Last procedure name [" & spName & "] was executed in " & DateDiff(DateInterval.Second, StartTime, endTime) & " Second(s)."
myDB.Dispose()
myCMD.Dispose()
End Using
End Using
Return rtnDT
End Using
ErrorHappening:
errorInfo()
End Function
I was used the DataSet instread of DataReader.
Sorry for less English typing skill.