Hi, I have query that i have setup in ms access and it works fine, pulls out the data that we require.
SELECT VEDEPTS.NAME, VESTOCK.NAME, VEBARCODES.BARCODE, VESUPPSTOCK.CATNO, VEBRANCHSTOCK.QUANTITY, VESUPPS.NAME, [RETAIL_NET]+[RETAIL_VAT] AS RRP, VESTOCK.QTY_ONORDER
FROM (((VEDEPTS INNER JOIN (VEBARCODES INNER JOIN VESTOCK ON VEBARCODES.STOCKID = VESTOCK.STOCKID) ON VEDEPTS.DEPTID = VESTOCK.DEPTID) INNER JOIN VEBRANCHSTOCK ON VESTOCK.STOCKID = VEBRANCHSTOCK.STOCKID) INNER JOIN VESUPPSTOCK ON VESTOCK.STOCKID = VESUPPSTOCK.STOCKID) INNER JOIN VESUPPS ON VESUPPSTOCK.SUPPID = VESUPPS.SUPPID
WHERE (((VEDEPTS.NAME) Like "001*" Or (VEDEPTS.NAME) Like "005*" Or (VEDEPTS.NAME) Like "006*" Or (VEDEPTS.NAME) Like "007*" Or (VEDEPTS.NAME) Like "008*" Or (VEDEPTS.NAME) Like "012*" Or (VEDEPTS.NAME) Like "024*" Or (VEDEPTS.NAME) Like "025*" Or (VEDEPTS.NAME) Like "018*" Or (VEDEPTS.NAME) Like "019*") AND ((VEBRANCHSTOCK.QUANTITY)<0) AND ((VEBRANCHSTOCK.BRANCHID)=1))
ORDER BY VEDEPTS.NAME;
when i try use the same bit of code from access in an asp i get the following error message:
Server error: Unable to retrieve schema information from the query:
SELECT VEDEPTS.NAME, VESTOCK.NAME, VEBARCODES.BARCODE, VESUPPSTOCK.CATNO, VEBRANCHSTOCK.QUANTITY, VESUPPS.NAME, [RETAIL_NET]+[RETAIL_VAT] AS RRP, VESTOCK.QTY_ONORDER FROM (((VEDEPTS INNER JOIN (VEBARCODES INNER JOIN VESTOCK ON VEBARCODES.STOCKID = VESTOCK.STOCKID) ON VEDEPTS.DEPTID = VESTOCK.DEPTID) INNER JOIN VEBRANCHSTOCK ON VESTOCK.STOCKID
The following error message comes from the database driver software; it may appear in a different language depending on how the driver is configured.
-------------------------------------------------------
[ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 113
[
Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)
It seems that square bracket is the isse "[" but am not sure what or how to get the results without it. Again it works fine in access with the square brakcets.
What i am doing to get round this now is to generate snp reports and the users are then printing those of from a network share. i would idealy like to publish to asp page and then let users generate up to date data when required.
Any help most appreciated.
Many Thanks
Yurov Ardyy
SELECT VEDEPTS.NAME, VESTOCK.NAME, VEBARCODES.BARCODE, VESUPPSTOCK.CATNO, VEBRANCHSTOCK.QUANTITY, VESUPPS.NAME, [RETAIL_NET]+[RETAIL_VAT] AS RRP, VESTOCK.QTY_ONORDER
FROM (((VEDEPTS INNER JOIN (VEBARCODES INNER JOIN VESTOCK ON VEBARCODES.STOCKID = VESTOCK.STOCKID) ON VEDEPTS.DEPTID = VESTOCK.DEPTID) INNER JOIN VEBRANCHSTOCK ON VESTOCK.STOCKID = VEBRANCHSTOCK.STOCKID) INNER JOIN VESUPPSTOCK ON VESTOCK.STOCKID = VESUPPSTOCK.STOCKID) INNER JOIN VESUPPS ON VESUPPSTOCK.SUPPID = VESUPPS.SUPPID
WHERE (((VEDEPTS.NAME) Like "001*" Or (VEDEPTS.NAME) Like "005*" Or (VEDEPTS.NAME) Like "006*" Or (VEDEPTS.NAME) Like "007*" Or (VEDEPTS.NAME) Like "008*" Or (VEDEPTS.NAME) Like "012*" Or (VEDEPTS.NAME) Like "024*" Or (VEDEPTS.NAME) Like "025*" Or (VEDEPTS.NAME) Like "018*" Or (VEDEPTS.NAME) Like "019*") AND ((VEBRANCHSTOCK.QUANTITY)<0) AND ((VEBRANCHSTOCK.BRANCHID)=1))
ORDER BY VEDEPTS.NAME;
when i try use the same bit of code from access in an asp i get the following error message:
Server error: Unable to retrieve schema information from the query:
SELECT VEDEPTS.NAME, VESTOCK.NAME, VEBARCODES.BARCODE, VESUPPSTOCK.CATNO, VEBRANCHSTOCK.QUANTITY, VESUPPS.NAME, [RETAIL_NET]+[RETAIL_VAT] AS RRP, VESTOCK.QTY_ONORDER FROM (((VEDEPTS INNER JOIN (VEBARCODES INNER JOIN VESTOCK ON VEBARCODES.STOCKID = VESTOCK.STOCKID) ON VEDEPTS.DEPTID = VESTOCK.DEPTID) INNER JOIN VEBRANCHSTOCK ON VESTOCK.STOCKID
The following error message comes from the database driver software; it may appear in a different language depending on how the driver is configured.
-------------------------------------------------------
[ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 113
[
Source: Microsoft OLE DB Provider for ODBC Drivers
Number: -2147467259 (0x80004005)
It seems that square bracket is the isse "[" but am not sure what or how to get the results without it. Again it works fine in access with the square brakcets.
What i am doing to get round this now is to generate snp reports and the users are then printing those of from a network share. i would idealy like to publish to asp page and then let users generate up to date data when required.
Any help most appreciated.
Many Thanks
Yurov Ardyy