
06/09/2009, 04:18
|
| | Fecha de Ingreso: febrero-2008 Ubicación: Madrid
Mensajes: 474
Antigüedad: 17 años Puntos: 1 | |
Error código consulta Utilizao SQlite y visual studio 05 .net
Tengo la siguiente consulta:
Código:
Public Function todosLosContactosBasico() As System.Data.DataSet Implements InterfaceContactos.todosLosContactosBasico
Dim ds As New DataSet
Dim mycommand As SQLiteCommand = New SQLiteCommand(conexion)
mycommand.CommandText = "Select numeroDeContacto, nombre, apellido1, apellido2, movil, telefono, telefonoTrabajo, email, direccion, mapa, grupo, sexo from contactos order by 2,3,4"
Dim reader As SQLiteDataReader = mycommand.ExecuteReader()
ds.Load(reader, LoadOption.OverwriteChanges, "table")
Return ds
End Function
Al ejecutarlo me da error en:
Código:
Dim reader As SQLiteDataReader = mycommand.ExecuteReader()
El error es: No connection associated with this command
¿Cómo lo puedo arreglar?
Muchas gracias. |