TimeOut Expired Active-X Script | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

TimeOut Expired Active-X Script

I am getting following error, when I am executing an ActiveX script(VB) for SQL Server 2000. <br /><br /><br />Error on Line 69<br />) (Microsoft OLE DB Provider for ODBC Drivers (80040e31): [Microsoft][ODBC SQL Server Driver]Timeout expired)<br />Step Error code: 80040428<br />Step Error Help File<img src=’/community/emoticons/emotion-7.gif’ alt=’:s’ />qldts80.hlp<br />Step Error Help Context ID:0<br /><br />I am using a Connection Object and using a string to hold the query and then executing this query as-<br /><br />Conn.Execute(SQL)<br /><br />There are no problems in opening the connection but timeout expires sometimes when I execute the query like this.<br /><br />Can someone please guide me regarding the possible causes for this issue.<br />Thanks
Check how long SQL query stored in variable takes in QA.
If taking more time then, you could look for explicitly setting timeout property to infinite.
Thanks, I will set the CommandTimeout property to ‘0’ and re-execute the step if I get the error in future. I have tried and found it working in a dummy pakage. Can creating a stored procedure instead of this query cause to boost the performance? Thank you once again.
It is worth creating stored procedure from many aspects instead of firing SQL from vb .