To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here

HOME News MS SQL Oracle DB2 Access MySQL PHP Scripts Books Links DBA Talk


Go Back   Database Journal Forums > Miscellaneous > Database Programming

Database Programming Discussion on all database programming topics, including ASP-db, ASP.NET, ASP and PHP.

Reply Post New Thread
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-21-2000, 01:02 PM
Pete Grivas
Guest
 
Posts: n/a
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||||SEL ECT 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
Reply With Quote
  #2  
Old 01-24-2000, 01:41 AM
John
Guest
 
Posts: n/a
Ambiguous column name during filter (reply)


Hi Pete,

There were some problems with the table owner not being maintained. But they
were supposedly all corrected. Here's what I'd like you to do:

1) Reproduce the problem with the SQL PUBS database
2) If successful, contact us at (248) 350-9177 and report it.
3) We'll test it and verify if the latest version fixes it or not.
4) Either way, we'll fix it and send you an update with the fix at no charge.

Thanks,
John


------------
Pete Grivas at 1/21/00 2:02:30 PM

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||||SEL ECT 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
Reply With Quote
  #3  
Old 04-22-2009, 09:26 PM
Frank Frank is offline
Super Moderator
 
Join Date: Oct 2002
Posts: 929
Looks like a SQL JOIN syntax issue. Go to your SQL query and put in the SQL to debug. ASP-db is a pass thru tool. It submit the SQL via the DB Connector. You are using ODBC which is very old, OLEDB is also too old. You should be using native connector like SQLClient.

Frank
Reply With Quote
Reply Post New Thread

Bookmarks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:29 PM.


DatabaseJournal Recent Articles


 » Top 10 Security Tips for MySQL

 » Oracle Database: Flashback Vs. Recovery

 » Redmond exploits MySQL uncertainty

 » Oracle Launches Oracle Global Trade Manage...

 » SQL Server 2008 RTM Support Ends April 13,...

Search Database Journal:
 







Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.