Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> db = TinyTds::Client.new :username => 'USER', :password => 'PASSWORD', :dataserver => 'SERVER', :database => 'DB', :encoding => 'UTF-8'
- => #<TinyTds::Client:0x101174a88>
- >> db.encoding
- => nil
- >> r = db.execute "insert into awards (title) values ('Japanese')"
- => #<TinyTds::Result:0x101167810>
- >> r.each
- => []
- >> r = db.execute "insert into awards (title) values ('Japanese 日本語です')"
- => #<TinyTds::Result:0x101155188>
- >> r.each
- => []
- >> r = db.execute "select * from awards where id = 28"=> #<TinyTds::Result:0x10114d258>
- >> r.each
- => [{"label"=>nil, "created_at"=>nil, "title"=>"Japanese ?????", "updated_at"=>nil, "id"=>28, "has_scores"=>false, "description"=>nil, "award_type_id"=>nil}]
- >> r.first['title']
- => "Japanese ?????"
- >> $KCODE
- => "UTF8"
Add Comment
Please, Sign In to add comment