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!!
