MySQL Forums
Forum List  »  Microsoft Access

Connecting to MS Access from PHP ..got 'NZ' error
Posted by: Shahriar Rahman
Date: October 27, 2010 06:45AM

Hello , this is Shahriar.

i am trying to connect and retrieve data from 'MS Access "Query"(not table)' ..but got the following error


Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft OLE DB Provider for ODBC Drivers<br/><b>Description:</b> [Microsoft][ODBC Microsoft Access Driver] Undefined function 'NZ' in expression



the query is as following


SELECT tblMMFabrics.FabricNumber, tblMMFabrics.FabricPattern, tblMMFabrics.FabricColor, IIf(Max(Val(IIf(IsNull([VeniceAvailableQty]),0,[VeniceAvailableQty])))>Max(Val(IIf(IsNull([VeniceTBRQty]),0,[VeniceTBRQty]))) And Max(Val(IIf(IsNull([VeniceAvailableQty]),0,[VeniceAvailableQty])))>Max(Val(IIf(IsNull([QTY]),0,[QTY]))),Max(Val(IIf(IsNull([VeniceAvailableQty]),0,[VeniceAvailableQty]))),IIf(Max(Val(IIf(IsNull([VeniceTBRQty]),0,[VeniceTBRQty])))>Max(Val(IIf(IsNull([VeniceAvailableQty]),0,[VeniceAvailableQty]))) And Max(Val(IIf(IsNull([VeniceTBRQty]),0,[VeniceTBRQty])))>Max(Val(IIf(IsNull([QTY]),0,[QTY]))),Max(Val(IIf(IsNull([VeniceTBRQty]),0,[VeniceTBRQty]))),Max(Val(IIf(IsNull([QTY]),0,[QTY]))))) AS Stock, tblMMFabrics.FabricRepeat, tblMMFabrics.FabricWidth, tblMMFabrics.FabricCTR, FabricClassifications.[Design Type], FabricClassifications.Color
FROM (tblMMFabrics INNER JOIN (((tblMMMaterials LEFT JOIN tblMMMaterialCategories ON tblMMMaterials.CategoryID=tblMMMaterialCategories.CategoryID) LEFT JOIN qryOnReserve ON tblMMMaterials.MaterialID=qryOnReserve.ReserveMaterialID) LEFT JOIN qryInStock_sub ON tblMMMaterials.MaterialID=qryInStock_sub.MaterialID) ON tblMMFabrics.FabricNumber=tblMMMaterials.FabricNumber) INNER JOIN FabricClassifications ON tblMMFabrics.FabricNumber=FabricClassifications.FabricNumber
WHERE (((tblMMFabrics.FabricNumber)>5000))
GROUP BY tblMMFabrics.FabricNumber, tblMMFabrics.FabricPattern, tblMMFabrics.FabricColor, tblMMFabrics.FabricRepeat, tblMMFabrics.FabricWidth, tblMMFabrics.FabricCTR, FabricClassifications.[Design Type], FabricClassifications.Color;


i know it is too complex....

plz, i need help



Edited 1 time(s). Last edit at 10/27/2010 06:47AM by Shahriar Rahman.

Options: ReplyQuote


Subject
Views
Written By
Posted
Connecting to MS Access from PHP ..got 'NZ' error
2583
October 27, 2010 06:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.