I am trying to get data out from MSSQL and for some unknown reasons to
me that some of these data is showing "nil" under Ruby/Sequel.
However, when I use MS Access to connect to the same MSSQL database, I
could see the data just fine.
In short, the data is there but somehow Sequel fail to get them??
Your comments are most appreciated. Thank you
db_config.yaml
---
:adapter: ado
:database: DST
:host: 192.168.X.YYY
:user: user
:password: pword
db_param = File.open("db_config.yaml") { |yf| YAML::load(yf) }
DB = Sequel.connect(db_param)
benefits = DB[:GRP_RID_HIST_VIEW].first
pp DB.schema(:GRP_RID_HIST_VIEW)
pp benefits
The result
[[:group_id,
{:db_type=>"varchar",
:max_chars=>20,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:string,
:ruby_default=>nil}],
[:eff_dates,
{:db_type=>"datetime",
:max_chars=>nil,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:datetime,
:ruby_default=>nil}],
[:grp_benefits,
{:db_type=>"text",
:max_chars=>2147483647,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:string,
:ruby_default=>nil}],
....
...
[:ben_plan_comm,
{:db_type=>"text",
:max_chars=>2147483647,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:string,
:ruby_default=>nil}],
[:temp_ben_flg,
{:db_type=>"varchar",
:max_chars=>1,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:string,
:ruby_default=>nil}],
[:temp_ben_flg2,
{:db_type=>"varchar",
:max_chars=>1,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:string,
:ruby_default=>nil}],
[:temp_ben_plan_flg,
{:db_type=>"varchar",
:max_chars=>1,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:string,
:ruby_default=>nil}],
[:ben_types,
{:db_type=>"varchar",
:max_chars=>5,
:default=>nil,
:allow_null=>true,
:column_size=>nil,
:scale=>nil,
:type=>:string,
:ruby_default=>nil}]]
]
{:group_id=>"SP2530*N000",
<--- this is fine
:eff_dates=>2009-01-01 00:00:00 -0800, <---
this is fine
:grp_benefits=>nil,
<--- this is where the problem begins
:grp_mm_ben=>nil,
<--- and continue to get "nil"...
...
...
:ben_plan_comm=>
"\\ ilouie 16:56:08 04
OCT, <-- suddenly data start
showing correctly again
:temp_ben_flg=>"1",
<--- this is fine
:temp_ben_flg2=>"1",
<--- this is fine
:temp_ben_plan_flg=>"1",
<--- this is fine
:ben_types=>""}
<--- this is fine
}
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.