Ruby TinyTds Hang on Result.each line

I have the following code:

def self.GetValuesFromDB(dataServer,database,sqlString)
    mprids = Array.new
    dbResult = Helper.CallDB(dataServer,database,sqlString)

    client = TinyTds::Client.new(:dataserver => dataServer, :database => database, :timeout => 900)

    dbResult = client.execute(sqlString)


    dbResults.each do |result| # hangs on this line for some SP calls
        mprids.push(result[0])
    end

    client.close
    return mprids
  end

      

it sometimes hangs at this line:

dbResults.each do | result | # hangs at this line for some SP calls

depending on which SP I am calling. This is weird because the SP call I am calling returns the same datatype column, so

Any ideas?

+3


source to share





All Articles