This topic is locked

Detail query incorrectly assumes join IDs are #s

1/19/2005 10:32:13 AM
ASPRunner.NET General questions
T
Talis author

I found another issue that should be easy to fix. Using the Northwind database in SQL Server, I tried creating an application based solely on Customer and Orders. I did so with debug on and found that when I click on the orders link to view all of the orders for this customer, I get this error:
Error: Invalid column name 'ALFKI'.
Here is the query from debug:
SQL = select [OrderID], [OrderDate], [RequiredDate], [ShippedDate], [ShipVia], [Freight], [ShipName], [ShipAddress], [ShipCity], [ShipRegion], [ShipPostalCode], [ShipCountry] From [dbo].[Orders] where 2=2 and [CustomerID]=ALFKIORDER BY [OrderDate] ASC
While an alphabetic ID is unusual, it is not uncommon, especially for lookups. Fortunately, you can determine what the data type is from INFORMATION_SCHEMA. And you can infer whetner or not to use strings from there.
Hope this helps,

  • Doug

admin 1/24/2005

Doug,
please download ASPRunner.NET 2.0 where this problem is resolved.