Redshelf
asked on
SQL Query retuns the strange error.
hi,
I am having a strange problem. I a musign ASP.net and SQL server. I am receving the following error in my page when tryign to get resutls(view suppliers orders) from database.
": System.Data.SqlClient.SqlE xception: The multi-part identifier "o.created" could not be bound."
the strange thing is this does not happen all the time and not on all the machine. when i looked in to the function whrere the query is there is no column name like "o.created" used in query. i double checked the i am looking into the right source file.
when you close the internet explorere and open the applicaltion again adn go to the same page it will work fine.
Any idea what is wrong. thsi happens only on one machine. thsi works fine on other users machine.
I am having a strange problem. I a musign ASP.net and SQL server. I am receving the following error in my page when tryign to get resutls(view suppliers orders) from database.
": System.Data.SqlClient.SqlE
the strange thing is this does not happen all the time and not on all the machine. when i looked in to the function whrere the query is there is no column name like "o.created" used in query. i double checked the i am looking into the right source file.
when you close the internet explorere and open the applicaltion again adn go to the same page it will work fine.
Any idea what is wrong. thsi happens only on one machine. thsi works fine on other users machine.
its a common error in SQL Server Query.
P.S.: Please make sure your spelling written are correct.Its very difficult to read.
Thanks
P.S.: Please make sure your spelling written are correct.Its very difficult to read.
Thanks
ASKER
hi there,
this is the query i am using.
"SELECT orderItems.*, orders.created, orders.status, orders.memberid, orders.dateRequired, orders.paymentDate FROM orderItems, orders, suppliers WHERE orderItems.orderID = orders.orderID AND orderitems.supplierID = suppliers.supplierid AND orders.companyID=@companyI D AND (orderItems.supplierID LIKE '%' + @supplierID + '%' OR suppliers.alphasearch LIKE '%' + @supplierID + '%').
Sorry for the spelling mistakes. I was being panic about the error.
regards
this is the query i am using.
"SELECT orderItems.*, orders.created, orders.status, orders.memberid, orders.dateRequired, orders.paymentDate FROM orderItems, orders, suppliers WHERE orderItems.orderID = orders.orderID AND orderitems.supplierID = suppliers.supplierid AND orders.companyID=@companyI
Sorry for the spelling mistakes. I was being panic about the error.
regards
that query cannot raise the error, because "o.created" means you have a table name or alias that reads "o"...
which is not in the query.
please review ...
which is not in the query.
please review ...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well, we have pushed you to review the code/query :)
glad you found the issue
glad you found the issue
ASKER
thanks angell..
if it does not happen all the time, it means that the query is build differently ...
please post the SQL when it happens