Ken Ismert
KIsmert at texassystems.com
Tue Jul 5 12:38:16 CDT 2005
Yes, they will fail. This is not unique to .NET. Simply put, if you open a Jet database using DAO, ADO, or ADO.NET, any queries that reference VBA functions like DateAdd will fail. Your earlier thinking was correct: to get DateAdd to work in a query, you would need Access installed on the machine, and would have to open it via automation. The Access application instance would then provide the VBA environment required to make sense of VBA function calls. .NET won't interpret the function calls, nor can you substitute .NET functions. This is because your ADO calls are going to a separate Jet server instance, which has no knowledge of the context in which it is called. In short, you are limited to native Jet SQL for your queries. This includes the aggregate functions like Sum and Avg, mathematical operators and string concatenation, and the expressions Between, In and Like. You may also be able to extend your reach by using the ODBC Scalar functions, although I haven't tried this. -Ken -----Original Message----- From: Griffiths, Richard [mailto:R.Griffiths at bury.gov.uk] Sent: Tuesday, July 05, 2005 8:21 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] A2K and .Net Do you know if my queries (stored procedures) that use say dateadd (ie hard coded into the query) will fail?