Question Locked

Select statment in a VB code

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Select statement is timing out inside VB program code thereby resulting to ODBC failure. However the select command is correct and the same select command is working using query analyzer from the SQL

3 replies

by dbhota

Kindly post your code and let me check that to provide u the better solution.

by tim.oyelowo

qdf.SQL = "select DISTINCT AR_IVC_NO, CUST_ID, IVC_TOTAL, IVC_DATE from AR_POSTPRINTINVCDTL where LTRIM(CUST_ID) = '" & mcustid & "'"
qdf.SQL = qdf.SQL + " AND (IVC_DATE >= '" & YR & "' AND IVC_DATE < '" & ST & "') AND (SOURCE = 0 OR ITEM_TYPE = 'M') "

Set mre3 = qdf.OpenRecordset()

This discussion is closed to new replies.