Error :[ ODBC Sql Server Driver] Timeout expired
Posted on 2001-08-01
When i run following sql statement in SQL Query Analyzer, the statement is valid . But when i run the statement in VB source code, an error :" [ODBC SQL server Driver] Timeout expired" will appear in certain time.
Is there any setting to increase the Time from ODBC or VB? Pls advise.
The following is the statement and vb source code that i use :
sSql = "Select min(wots_code) wots_code from schedule c" + _ " where c.unit_id = '" + mv_unitid + "'" + _
" and c.wo_code like ('" + lot_id + "')" + _
" and c.wots_code in (SELECT DISTINCT a.wots_code FROM ver_ctrl a, user_det b " + _
" WHERE a.unit_id='" + mv_unitid + "'" + _
" AND a.user_id=b.login_id " + _
" AND b.user_grp='" + gv_UserGrp + "')" + _
" and c.user_id = '" & mv_userid & "' and (c.sch_type = 'x' or c.sch_type = 'r')"
adoStaticWotno.Open sSql, adoFcsConnection