G
Giorgio Gentilil
Hello, i'm having a very strange problem,
while every man in this planet could make a parameters procedure from an access database works ......... guess, i'm not.
The code lines are the next....
a.. con.Parameters.Add("NumLocal", OleDb.OleDbType.SmallInt).Value = Application("Local") // Is the short way but the long way also fails
b.. con.Parameters.Add("FechaDocs", OleDb.OleDbType.DBTimeStamp).Value = Fecha // Is the short way but the long way also fails
c.. con.CommandText = "Execute ContarVentas"
d.. DB.open()
e.. NumFilas = con.ExecuteScalar
f.. DB.close()
And the SQL Query is....
a.. PARAMETERS NumLocal Short, FechaDocs DateTime;
SELECT Count(*) AS Expr1
FROM Venta
WHERE (((Venta.Local)=NumLocal) AND ((Venta.Fecha)=FechaDocs));
And the Error is....
a.. Message "El parámetro NumLocal no tiene un valor predeterminado." String
(Literal Translation is: The parameter NumLocal don't have a default value // Error Code In English is: Too few Parameters)
b.. Source "Microsoft JET Database Engine" String
c.. ErrorCode -2147217904 Integer
d.. StackTrace " at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteScalar()
at fstgo.Import.MoverRegistros() in c:\inetpub\wwwroot\fstgo\Import.aspx.vb:line 131
at fstgo.Import.CargarDB() in c:\inetpub\wwwroot\fstgo\Import.aspx.vb:line 89
at fstgo.Import.cmdSend_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\fstgo\Import.aspx.vb:line 71" String
What is Wrong?????
while every man in this planet could make a parameters procedure from an access database works ......... guess, i'm not.
The code lines are the next....
a.. con.Parameters.Add("NumLocal", OleDb.OleDbType.SmallInt).Value = Application("Local") // Is the short way but the long way also fails
b.. con.Parameters.Add("FechaDocs", OleDb.OleDbType.DBTimeStamp).Value = Fecha // Is the short way but the long way also fails
c.. con.CommandText = "Execute ContarVentas"
d.. DB.open()
e.. NumFilas = con.ExecuteScalar
f.. DB.close()
And the SQL Query is....
a.. PARAMETERS NumLocal Short, FechaDocs DateTime;
SELECT Count(*) AS Expr1
FROM Venta
WHERE (((Venta.Local)=NumLocal) AND ((Venta.Fecha)=FechaDocs));
And the Error is....
a.. Message "El parámetro NumLocal no tiene un valor predeterminado." String
(Literal Translation is: The parameter NumLocal don't have a default value // Error Code In English is: Too few Parameters)
b.. Source "Microsoft JET Database Engine" String
c.. ErrorCode -2147217904 Integer
d.. StackTrace " at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteScalar()
at fstgo.Import.MoverRegistros() in c:\inetpub\wwwroot\fstgo\Import.aspx.vb:line 131
at fstgo.Import.CargarDB() in c:\inetpub\wwwroot\fstgo\Import.aspx.vb:line 89
at fstgo.Import.cmdSend_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\fstgo\Import.aspx.vb:line 71" String
What is Wrong?????