Hi, I don't have Win32 stuff to actually run this, but your code looks pretty good except for 1 thing. You seem to be calling Win32::SqlServer::sql_init every 10 seconds. I wonder
if that leaking? Can you pull the sql_init out of that sub, and just do it once? Then just feed it the $batch in the GetData sub?