PDA

View Full Version : ShipRush ADO



osman
07-15-2007, 03:48 PM
Hi

I'm setting up ShipRush USPS for Endicia with ADO to attach it with my client's shopping cart(AspDotNetStoreFront / MSSQL2005).

I must have changed a setting or a key, I'm not sure, it begun throwing errors:


---------------------------
Error
---------------------------
Incorrect syntax near the keyword 'AND'

SELECT OrderNumber AS RecordID, ShippingFirstName + ' ' + ShippingLastName AS ContactName, ShippingCompany AS CompanyName,
ShippingAddress1 AS Address1, ShippingAddress2 AS Address2, ShippingSuite AS Address3, ShippingCity AS City, ShippingState AS State,
ShippingZip AS ZIP, ShippingCountry AS Country, ShippingPhone AS Phone, Email, ShippingTrackingNumber, OrderWeight AS PackageWeight
FROM dbo.Orders
WHERE ordernumber =
AND (ShippingTrackingNumber IS NOT NULL) AND (LEFT(CAST(ShippingMethod AS nvarchar), 4) = 'USPS')

---------------------------
OK
---------------------------


Obviously it can't merge %SEARCHPARAM% on the fly.

What do you I might have changed? How can I fix this?


Thanks,

SYSOPS
07-16-2007, 06:29 AM
Have you tried to run the query itself in SQL (no ShipRush involved)? I'm not a SQL expert, but I would think this snippet is lacking something:
WHERE ordernumber =
AND (ShippingTrackingNumber IS NOT NULL)

I don't see a place to have anything = to the ordernumber (no value or a value holder), so the query is balking at the AND portion of your statement.

SYSOPS

SYSOPR
07-16-2007, 10:49 AM
The problem is:

WHERE ordernumber =

There should be something after the =

Are you giving it a value in the UI?

Another option is to mod the source query so it is to this effect:


WHERE ordernumber LIKE '%SEARCHPARAM%%'

(Note the trailing double %, that is intentional)