Ruby TinyTds挂在Result.each行

时间:2013-02-01 19:57:05

标签: ruby sql-server tiny-tds

我有以下代码:

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

它有时会挂在这一行:

dbResults.each do | result | #挂在此行上进行一些SP调用

取决于我拨打的SP。这很奇怪,因为我调用的SP都返回相同的数据类型列,所以

有什么想法吗?

0 个答案:

没有答案