Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nz function

Status
Not open for further replies.

tuzojazz

Programmer
Dec 26, 2005
58
MX
Hi:

I'm programming an aspx in visual basic.net code in notepad.

From my aspx I'm trying to make a query to a database that is in access but I get a
System.Data.OleDb.OleDbException saying Nz function is not defined.

The query is something like this

SELECT Nz(SUM(Total),0)
FROM CargoD
WHERE Folio=4224


When I try the query in access it works but from my aspx not.

What could be wrong?
What can I do?

Thanks!
 
What could be wrong?
Answer: You're using Access as a database

What can I do?
Answer: Switch to SQL server or mySQL

Just buggin' ;)

It looks like the OleDb driver doesn't support the Nz function. I found this post that may be helpful to you:

To follow up once again to myself for anyone interested, it turns out
that .asp does not understand the Nz statement so when I would try to
connect via frontpage, it went belly up. The solution was to remove the
Nz statements and replace with the following example.

If(IsNull(qry_invoicefrovendorwtrhours!Total_cost) ,0,qry_invoicefrovendorwtrhours!Total_cost)

Found at
-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top