Knowledgebase
[QODBC-Desktop] Troubleshooting - VB Demo is crashing when using nonexisting column name in left outer join query
Posted by Jack - QODBC Support on 24 November 2016 11:23 AM

Troubleshooting - VB Demo is crashing when using nonexisting column name in left outer join query

Problem Description:

I am executing below query in VB Demo. But VB Demo is crashing at the time of execution. I have checked the same query in MS Access & noticed that I accidentally type wrong column name in the join query. But MS Access does not crash only VB Demo is crashing.

SELECT
PriceLevel.Name,
PriceLevelPerItem.Name,
PriceLevelPerItem.PriceLevelPerItemItemRefFullName,
PriceLevelPerItem.PriceLevelPerItemCustomPrice
FROM PriceLevel
LEFT OUTER JOIN PriceLevelPerItem left outer join item ON PriceLevel.ListID = PriceLevelPerItem.ListID on PriceLevelPerItem.ItemRefListID=item.listid
WHERE
(PriceLevelPerItem.PriceLevelPerItemItemRefListID=item.listid or PriceLevelPerItem.PriceLevelPerItemItemRefListID is null) and item.FullName = 'Installation Labor'

 

Solution:

There is no space before "FROM" and before "LEFT" in your query due to this VB Demo crashing. Please add a space before "FROM" and before "LEFT" in query & test again VB Demo will not crash. Also, correct wrong column name in query & test again.

SELECT
PriceLevel.Name,
PriceLevelPerItem.Name,
PriceLevelPerItem.PriceLevelPerItemItemRefFullName,
PriceLevelPerItem.PriceLevelPerItemCustomPrice FROM PriceLevel
LEFT OUTER JOIN PriceLevelPerItem left outer join item ON PriceLevel.ListID = PriceLevelPerItem.ListID on PriceLevelPerItem.PriceLevelPerItemItemRefListID=item.listid
WHERE
(PriceLevelPerItem.PriceLevelPerItemItemRefListID=item.listid or PriceLevelPerItem.PriceLevelPerItemItemRefListID is null) and item.FullName = 'Installation Labor'

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).