Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get '/all_users/' do
- conn = TinyTds::Client.new(username:'nicole', password:'pass', dataserver:'Nikki-PCMydatabase', database:'Thedatabase')
- recordsArray = "{"clientList":["
- clientArray = Array.new
- sql = 'select * from dbo.ServerUsers'
- records = conn.execute(sql) do |record|
- client = AndroidtableClientsSearch.new(record[0],record[1],record[2],record[3], record[4])
- clientArray<<client.to_s
- end
- recordsArray<<clientArray.join(',')
- recordsArray<<"]}"
- recordsArray
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement