Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/12/2011, 07:03
yeyowave
 
Fecha de Ingreso: febrero-2010
Mensajes: 157
Antigüedad: 14 años, 2 meses
Puntos: 5
Respuesta: error en DROP TABLE IF EXISTS

si que en vez de ejecutar todo en una consulta, lo divido en varias y asi funciona

consulta 1
sql = "DROP TABLE IF EXISTS `categoria`;"
Cmd.CommandText=sql
Cmd.Execute


consulta 2
sql = "CREATE TABLE IF NOT EXISTS `categoria` ("&_
" `id` int(11) NOT NULL,"&_
" `idmenu` int(11) NOT NULL,"&_
" `nombre` text character set utf8 collate utf8_spanish_ci NOT NULL"&_
") ENGINE=InnoDB DEFAULT CHARSET=latin1;"
Cmd.CommandText=sql
Cmd.Execute