Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Ruby Programming Language

DBI question - DBD-ADO query is timing out


Hey guys, I have a tiny DBI question. I'm using DBD-ADO to talk to
sqlserver and have a query that's timing out. Does anyone know how I
might extend the timeout?

- donald

> Hey guys, I have a tiny DBI question. I'm using DBD-ADO to
> talk to sqlserver and have a query that's timing out. Does
> anyone know how I might extend the timeout?

Never mind, I found a solution. If working from an ActiveRecord
connection:

connection.instance_variable_get(:@connection).handle.
  instance_variable_get(:@handle).setproperty('CommandTimeout', 3600)

Sure would be nice if something this useful could be manipulated more
elegantly. Perhaps something to add to the todo list for DBI2 if and
when Kirk gets that project off the ground.

Actually, on that note, I just ran into another problem with DBD-ADO,
specifically with the autocommit mode. When it's on, it only commits
after a statement is executed if it thinks it's a read operation. One
problem is, the algorithm fails to treat SELECT INTO statements as write
operations. I would think one would want to commit after all operations
anyway if one's in autocommit mode; it would seem you don't really care
about getting a consistent view of the database in that case.

- donald

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc