Monday

read data from SQL sevrer with Ruby/WIN32OLE way



def read_sp(sp_text,sr,db,pwd)
conn = WIN32OLE.new('ADODB.Connection')
conn.Open("driver={SQL Server};Uid=sa;server=#{sr};pwd=#{pwd};database=#{db};")
rset = WIN32OLE.new('ADODB.Recordset')
rset.ActiveConnection = conn
rset.Open(sp_text)
s = ""
while not rset.EOF do
for i in (0..rset.Fields.Count - 1) do
s += rset.Fields.Item(i).Value.to_s.strip
end
rset.MoveNext
end
return s;

end



more...

No comments:

here is powershell script on how to get list of files from changesets associated with one tfs task

$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...