Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/08/2005, 02:39
oriopitufa
 
Fecha de Ingreso: julio-2005
Mensajes: 103
Antigüedad: 19 años, 7 meses
Puntos: 0
Exclamación Error al ejecutar consulta sobre BD

Estoy realizando una aplicación en VB.NET que ejecuta consultas sobre una BD Access.
Primero realizo una consulta mediante un DataAdapter, y a continuación intento realizar la siguiente consulta:


...
Dim fech As Date
fech = New Date(2004, 7, 26)
Dim lin As Integer = 3
Dim estado As String="Funcionando"
Dim st As String
st = "select hora from Maquina where Fecha=fech and Linea='" & lin & "' and Estado<> '" & estado & " ' order by hour asc"
comando = New OleDbCommand(st, objSQLConnect)
lee = comando.ExecuteReader()
lee.Read()
...
lee.Close()


Pero no consigo realizarla, me da el siguiente error:

No se han especificado valores para algunos de los parámetros requeridos. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(Comma ndBehavior behavior) at System.Data.OleDb.OleDbCommand.ExecuteReader()

Alguien me puede explicar a que se debe?? No consigo detectar el error!!