2. Error Message (Include screenshot of error)
Form Load Call
There is no error message, however, a trace run shows for some reason it is calling the below select statement when opening the form. Can you check if we had placed this is for some reason?
SELECT lbs_po_hd.po_no,
lbs_po_hd.status,
lbs_po_hd.vendor_code,
lbs_po_hd.ship_to_loc,
lbs_po_hd.attention_name,
lbs_po_hd.attention_phone,
lbs_po_hd.currency_code,
lbs_po_hd.po_notes,
lbs_po_hd.tax_code,
lbs_po_hd.total_gross,
lbs_po_hd.total_tax,
lbs_po_hd.po_amount,
lbs_po_hd.who_entered,
lbs_po_hd.po_date,
lbs_po_hd.approve_by,
lbs_po_hd.approve_date,
lbs_po_hd.approve_comments,
lbs_po_hd.void_by,
lbs_po_hd.void_date,
lbs_po_hd.company_id,
lbs_po_hd.approver_code
FROM lbs_po_hd (nolock)
WHERE lbs_po_hd.company_id = '1001' AND
lbs_po_hd.po_no <> ' '
ORDER by lbs_po_hd.po_no desc
Search Screen Load Call
There is no error message, however, a trace run shows that we are doing an entire select on the lbs_po_hd table as below
SELECT lbs_po_hd.po_no,
lbs_po_hd.status,
lbs_po_hd.vendor_code,
lbs_po_hd.ship_to_loc,
lbs_po_hd.attention_name,
lbs_po_hd.attention_phone,
lbs_po_hd.currency_code,
lbs_po_hd.po_notes,
lbs_po_hd.tax_code,
lbs_po_hd.total_gross,
lbs_po_hd.total_tax,
lbs_po_hd.po_amount,
lbs_po_hd.who_entered,
lbs_po_hd.po_date,
lbs_po_hd.approve_by,
lbs_po_hd.approve_date,
lbs_po_hd.approve_comments,
lbs_po_hd.void_by,
lbs_po_hd.void_date,
lbs_vendor_vw.vendor_name,
lbs_po_hd.approver_code,
lbs_po_hd.company_id
FROM (oj lbs_po_hd (nolock)LEFT OUTER JOIN lbs_vendor_vw (nolock) ON lbs_po_hd.vendor_code = lbs_vendor_vw.vendor_code AND lbs_po_hd.company_id = lbs_vendor_vw.company_id)
WHERE (lbs_po_hd.po_no +
cast(CONVERT(VARCHAR(10),lbs_po_hd.po_date,103) as varchar(80)) +
lbs_po_hd.vendor_code +
lbs_vendor_vw.vendor_name +
lbs_po_hd.status
like '%'+''+'%')
ORDER by lbs_po_hd.po_no desc
3. Changes Required
- Remove the select ob lbs_po_hd table when opening the Purchase Order Screen
- PO Search Screen - load top 500 or 1000. This screen has a search facility which users can use to search and filter
You can run the profiler on any LinkSOFT DB to see the above trace.