use Win32::OLE; $ConnStr = "DSN=dsn_name;UID=abcd;PWD=password;APP=test;WSID=Mycomp;DATABASE=db_name"; $Conn = Win32::OLE->new('ADODB.Connection'); $Conn->Open($ConnStr); #Get record set results from store procedure $oSP = Win32::OLE->new("ADODB.Command"); $RS = Win32::OLE->new("ADODB.Recordset"); $oSP->{'CommandText'} = "exec dbo.sp_reportBytes '%','%','%','%', '2009-1-1', '2010-1-1', 'Admin', '530', NULL;"; $oSP->{'CommandType'} = 4; $oSP->{'ActiveConnection'} = $Conn; $oSP->{'CommandTimeout'} = 1200000; $oSP->{'@Param1'} = $Param1; $RS = $oSP->Execute(); while (! $RS->EOF) { $value = $RS->Fields(1)->value; print "$value\n"; $RS->MoveNext; }