Calling Access based Modules from Vb.Net

  • Thread starter Thread starter Nikhil
  • Start date Start date
N

Nikhil

Hi,
I have defined a module called "Utility Functions" in MS-Access. In
that module, I have defined a function called NullToZero.
I used this function in one of my stored Queries in Access. This works
fine when I run the query in Access itself.
Now, when I call the query from Visual Basic through an OleDbCommand
and an OleDbConnection, I get the exception: "undefined function in
expression"
Is there a special way to call Modules in Access from Visual Basic?
If I call the query from Visual Basic without NullToZero, it works
fine. But, I require that the values updated by my stored query writes
0 instead of Null values. Is there a way out? Or do I have to run the
query and then record by record update null values to 0?
Please let me know. Thanks!
 
Sorry, not going to happen, you will need to come up with another solution.

If it was SQL server, I woud use the COALESCE function.

When you query a MDB file using DotNet, you are using the Jet SQL engine.

Access need not even be installed on the system being used, therefore Visual
Basic for Applications may not be available, therefore the modules, macros
and forms are totally ignored by OleDbCommand.
 
Back
Top