Okay, here's the situation.
When I try to execute this query,"SELECT CONCAT(LEFT(es401,2),'', LPAD(TRIM(LEADING '0' FROM SUBSTRING(es401,4)),6, ' ')) AS CLAVE, es404 AS PRIMERO, es405 AS ULTIMO FROM est04 AS MENSAJES ORDER BY CLAVE ASC", to fill a Datatable, it shows me a "MySQL Exception Error: Fatal error encountered attempting to read the resultset."
I hope someone can help me with this situation.
By the way, I'm programming in VB.NET 4.0 Framework.
Greetings.
CODE:
Dim strQryMSGS As String = ""
Dim strConnMSql As String = "server=localhost;User Id=Din;password=abc;Persist Security Info=True;database=estacion"
Dim connMSql As New MySqlConnection(strConnMSql)
Dim cmdMsgs As New MySqlCommand(strQryMSGS, connMSql)
Dim daMSql As New MySqlDataAdapter(cmdMsgs)
Dim tableMSql As New DataTable
strQryMSGS = "SELECT CONCAT(LEFT(es401,2),'', LPAD(TRIM(LEADING '0' FROM SUBSTRING(es401,4)),6, ' ')) AS CLAVE, es404 AS PRIMERO, es405 AS ULTIMO FROM est04 AS MENSAJES ORDER BY CLAVE ASC"
cmdMsgs = New MySqlCommand(strQryMSGS, connMSql)
daMSql = New MySqlDataAdapter(cmdMsgs)
tableMSql = New DataTable
daMSql.Fill(tableMSql)
When I try to execute this query,"SELECT CONCAT(LEFT(es401,2),'', LPAD(TRIM(LEADING '0' FROM SUBSTRING(es401,4)),6, ' ')) AS CLAVE, es404 AS PRIMERO, es405 AS ULTIMO FROM est04 AS MENSAJES ORDER BY CLAVE ASC", to fill a Datatable, it shows me a "MySQL Exception Error: Fatal error encountered attempting to read the resultset."
I hope someone can help me with this situation.
By the way, I'm programming in VB.NET 4.0 Framework.
Greetings.
CODE:
Dim strQryMSGS As String = ""
Dim strConnMSql As String = "server=localhost;User Id=Din;password=abc;Persist Security Info=True;database=estacion"
Dim connMSql As New MySqlConnection(strConnMSql)
Dim cmdMsgs As New MySqlCommand(strQryMSGS, connMSql)
Dim daMSql As New MySqlDataAdapter(cmdMsgs)
Dim tableMSql As New DataTable
strQryMSGS = "SELECT CONCAT(LEFT(es401,2),'', LPAD(TRIM(LEADING '0' FROM SUBSTRING(es401,4)),6, ' ')) AS CLAVE, es404 AS PRIMERO, es405 AS ULTIMO FROM est04 AS MENSAJES ORDER BY CLAVE ASC"
cmdMsgs = New MySqlCommand(strQryMSGS, connMSql)
daMSql = New MySqlDataAdapter(cmdMsgs)
tableMSql = New DataTable
daMSql.Fill(tableMSql)