MySQL Forums
Forum List  »  Spanish

Problema al crear tabla temporal
Posted by: Frank Cruz
Date: June 16, 2017 05:08PM

Estoy creando una tabla temporal para generar algunas consultas, estoy trabajando con los form en vb.net 2015 y MySql el código es el siguiente:

ConsultaSql = "CREATE TEMPORARY TABLE PRUEBA AS (Select *, @rownum:=@rownum + 1 AS posicion FROM articulos Order by Codigo_Articulo asc)"
' crear adaptador
Using DataAdapter1 As New MySqlCommand(ConsultaSql, Conexion_a_la_Base)
Conexion_a_la_Base.Open()
DataAdapter1.ExecuteNonQuery()

La consulta la he probado en el workbench y funciona perfecto pero a la hora de querer crear la tabla en el vb.net no, cuando llego a la línea del executeNonQuery me sale un único mensaje:

"Fatal error encountered during command execution".

Dónde está el error?

Options: ReplyQuote


Subject
Views
Written By
Posted
Problema al crear tabla temporal
307
June 16, 2017 05:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.