Kaup, Chester
Chester_Kaup at kindermorgan.com
Wed Apr 28 11:12:44 CDT 2010
It is not a hard coded query. The SQL string is built in VBA. It thus appears that the querytimeout command does not work. Tried changing value to 500 with no change. Maybe the ODBCTimeout property? -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W Colby Sent: Wednesday, April 28, 2010 10:49 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Query Timeout Problem You can set the timeout directly in the query properties. Open the query in design view. Right click the top pane or otherwise open the properties dialog. Look for ODBC timeout. I have no idea if 0 is a valid value in this property. 0 means wait forever. John W. Colby www.ColbyConsulting.com Kaup, Chester wrote: > I have a query that uses three SQL server tables linked by ODBC. The query runs OK in the query grid with the query timeout set to 0. When I try to run the SQL statement in VBA it returns an ODBC connect failure message indicating to me that it time out. Here is some of the code. Maybe I am setting the timeout wrong? > > Dim MyDb As DAO.Database > Set MyDb = CurrentDb() > MyDb.QueryTimeout = 0 > > strSQL = "some query statements" > > Set RS3 = MyDb.OpenRecordset(strSql) > > > > Chester Kaup > > Engineering Technician > > Kinder Morgan CO2 Company, LLP > > Office (432) 688-3797 > > FAX (432) 688-3799 > > > > > > No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com