Functions w/n Stored Procedures in Access Database on ASP.net
am 15.06.2005 16:25:06 von davidHi everyone.
I have read every page that Google returns on this topic, but can't find
anything that resolves my problem.
Basically, I have an Access Database that does a number of different
calculations. One of these calculations is rather complex, and could not be
implemented properly using just nested IIF statements or anything similar, so
was coded using VBA (in the VBE) as a function. This calculation is included
in a query in the database, which calculates a value based on the passed
parameters (a "parameter query"), with the function itself being called as
simply [Accrued]: CalcAccrd(Date,Coupon,Settlement,Maturity, etc..).
This works just fine in Access, with great resuts (i.e. gives right #s).
However, when I try and run this stored query (procedure?) in ASP.net -
ultimately where I had hoped it would reside - I get the error message at the
bottom of this question. In short, it does not recognize the function I try
to pass to it as existing when run from ASP.net.
Any help would be most appreciated. I have tried everything I can think of...
Thanks!
David
ASP.net Error Message
--------------------------
System.Data.OleDb.OleDbException: Undefined function 'JustATest' in
expression. at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandli ng(Int32 hr) at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleRe sult(tagDBPARAMS
dbParams, Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavio r behavior,
Object& executeResult) at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(Command Behavior
behavior, String method) at
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at
System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.Execut eReader(CommandBehavior
behavior) at System.Data.Common.DbDataAdapter.FillFromCommand(Object data,
Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet
dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand
command, CommandBehavior behavior) at
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at
ASP.plquery_aspx.BindData(String sFilter) in ...