Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2007

Tip: Looking for answers? Try searching our database.

Nz function from .NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pbaugh@recoilsoft.com - 26 Nov 2007 14:38 GMT
Folks,
I've got a query that's something like :
SELECT Nz(Materials.MaterialCost, 0) FROM Materials

This works fine in Access but when I call from my .NET app, it
complains of "Unknown function Nz"

Any ideas on how I might rectify this??

Many thanks
Pete
Jeff Boyce - 26 Nov 2007 14:57 GMT
I don't know enough about .NET to tell you which function in .NET is
equivalent to the Null-to-Zero function in Access.  Since you are working in
.NET, you'd probably need to use a function .NET knows.

Or, I'll guess you could just create a query in Access that returns what
you've written below, then call the QUERY as a data source from .NET.

Signature

Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

> Folks,
> I've got a query that's something like :
[quoted text clipped - 7 lines]
> Many thanks
> Pete
John Spencer - 26 Nov 2007 16:45 GMT
Try using the immediate IIF function instead.

SELECT IIF(MaterialCost is Null,0,MaterialCost) FROM Materials

NZ is a VBA function.  IIF is available in jet sql
Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> Folks,
> I've got a query that's something like :
[quoted text clipped - 7 lines]
> Many thanks
> Pete
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.