G
Giorgio Gentilil
Hello, i'm having a very strange problem,
while every person in this planet could make a parameters procedure from an
access database works ......... guess, i'm not.
The code lines are the next....
con.Parameters.Add("NumLocal", OleDb.OleDbType.SmallInt).Value =
Application("Local") // Is the short way but the long way also fails
con.Parameters.Add("FechaDocs", OleDb.OleDbType.DBTimeStamp).Value = Fecha
// Is the short way but the long way also fails
con.CommandText = "Execute ContarVentas"
DB.open()
NumFilas = con.ExecuteScalar
DB.close()
And the SQL Query is....
PARAMETERS NumLocal Short, FechaDocs DateTime;
SELECT Count(*) AS Expr1
FROM Venta
WHERE (((Venta.Local)=NumLocal) AND ((Venta.Fecha)=FechaDocs));
And the Error is....
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)
Source "Microsoft JET Database Engine" String
ErrorCode -2147217904 Integer
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 person in this planet could make a parameters procedure from an
access database works ......... guess, i'm not.
The code lines are the next....
con.Parameters.Add("NumLocal", OleDb.OleDbType.SmallInt).Value =
Application("Local") // Is the short way but the long way also fails
con.Parameters.Add("FechaDocs", OleDb.OleDbType.DBTimeStamp).Value = Fecha
// Is the short way but the long way also fails
con.CommandText = "Execute ContarVentas"
DB.open()
NumFilas = con.ExecuteScalar
DB.close()
And the SQL Query is....
PARAMETERS NumLocal Short, FechaDocs DateTime;
SELECT Count(*) AS Expr1
FROM Venta
WHERE (((Venta.Local)=NumLocal) AND ((Venta.Fecha)=FechaDocs));
And the Error is....
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)
Source "Microsoft JET Database Engine" String
ErrorCode -2147217904 Integer
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?????