-
Ambiguous column name during filter
I am trying to filter the following SQL command using a filter drop down:
Mydb.dbSQL="SELECT Clients.ClientID, Clients.ClientName, ClientOrders.OrderID FROM Clients INNER JOIN ClientOrders ON Clients.ClientID = ClientOrders.ClientID"
MyDb.dbFilterDropFlds="(;|)Clients.ClientID||| |SELECT Clients.ClientId, Clients.ClientName FROM Clients;"
Mydb.dbFilterFlds="OrderID, Clients.ClientID"
Mydb.AspDBEP
And I get this error:
----------------------------------------
Error # = 80040E14(-2147217900)
Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Ambiguous column name 'ClientID'.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 37000
Native Error = 209
----------------------------------------
So using Mydb.dbDebug=5 I see this:
----------------------------------------
Get_RS_get_Count, SQL=SELECT Clients.ClientID, Clients.ClientName, ClientOrders.OrderID FROM Clients, ClientOrders WHERE ( ClientID = 1) AND Clients.ClientID = ClientOrders.ClientID
----------------------------------------
And it shows CLIENTID=1, not Clients.ClientID like I want it to. How can I set the filter to show Clients.ClientID and not just ClientID, which IS ambiguous.
I'm using version 2.2003EP
Thanks,
Pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|