ODBC and NZ

qwerty29
qwerty29 used Ask the Experts™
on
I connect to an Acces DB via an ODBC connection. When I try to send a sql-statement like

SELECT nz(Max(TNR),0)+1 FROM tau_Taucher;

to the DB i receive this

Undefinierte Funktion 'nz' in Ausdruck

engl.: undifened function 'nz' in expression

My software ist written in JAVA. I use WIndows 2000 and the Access ODBC Driver 4.00.6200.00.

Did someone know what went wrong?

Bye

Arndt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The NZ() is a part of Access not JET the database engine, try

SELECT Iif(IsNull(Max(TNR),0,Max(TNR))+1 FROM tau_Taucher

Cheers, Andrew

Commented:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - Answered by: TextReport  
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial