473,396 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calling Access based Modules from Vb.Net

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!

Apr 19 '06 #1
1 1999
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.
"Nikhil" <nk******@gmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
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!

Apr 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Steven Bethard | last post by:
So when I'm writing a class and I define an __init__ method, I sometimes haven't called object.__init__, e.g.: class C(object): def __init__(self, x): self.x = x instead of class...
5
by: Pekka Niiranen | last post by:
Hi there, I have two scripts. The first "main.py" sets some variables and then imports another called "gen.py". The idea is to provide "main.py" that defines some paths, variables etc. without...
1
by: kayakerjess | last post by:
Hi, I have an Access Data Project (.adp) that I am trying to open and execute from Python. I am using the win32com.client, and I have successfully opened the application, but I'm getting an...
1
by: Matt Alanzo | last post by:
On another newsgroup an Access knowledgable party posted: >You should be able to connect an Access ADP to an existing SQLExpress >database running in SQLS 2000 compatibility mode. The only thing...
1
by: gaosul | last post by:
I am non-programming scientist and I am using a Program called Easyarticles from Synaptosoft Inc., which is based the database program Access. Unfortunately, the owner of this company has...
6
by: ronwer | last post by:
Hello, The title doesn't completely cover the question I have, but it's a bit more complicated problem we have. We are using a database, based on Acces, but developed by a third party...
10
by: Bugs | last post by:
Hi I have distributed an mdb file that works fine on my PC using Access 2003, but when a copy I sent to someone running Access2003 he gets the error message "missing the intranet or the...
55
by: AnandaSim | last post by:
I just had a google through this NG but have not seen mention of Erik Rucker's blog entry and the new Jet: http://blogs.msdn.com/access/archive/2005/10/05/477549.aspx mentioned by Mike...
35
by: robert d via AccessMonster.com | last post by:
I was asked to provide a proposal. I provided a proposal on my application and the prospective client likes what I have but is wary of it having been developed in Access. I don't understand this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.