On Monday, November 27, 2017 at 1:32:57 AM UTC-8, saiyam agarwal wrote:
>
> require 'odbc' # gem 'ruby-odbc'
>  require 'sequel' # gem 'sequel'
>  begin
>  db = Sequel.odbc('testodbc1', user: 'admin', password: 'password')
>  puts 'SELECT * FROM ITEM LIMIT 10'
>  db.fetch('SELECT * FROM ITEM LIMIT 10') do |row|
>  puts row
>  end
>  rescue = e
>  puts 'An error occurred'
>  puts "Error code: #{e.inspect}"
>  ensure
>  # disconnect from server
>  db.disconnect if db
>  end
>
> Data Service Name(DSN) are stored in odbc.ini file
>
> [ODBC Data Sources]
>
> testodbc1 = SnowflakeDSIIDriver
>
>
> [testodbc1]
>
> Driver      = <PATH>/lib/libSnowflake.so
>
> Description =
>
> server      = abcd.snowflakecomputing.com
>
> role        = sysadmin
>
> database    = adminDB
>
> warehouse   = LOAD_WH
>
> I am able to connect by configuring the parameters in odbc.ini file. But I 
> am not able to connect database by ODBC connection string(through passing 
> all parameters in :drvconnect). Can you help me out now?.
>
> Thanks. Your help would be truly appreciated.
>

I've already told you twice before that you need to first figure out how to 
get connection using ruby-odbc directly (without using Sequel), as 
otherwise it's probably an issue with ruby-odbc and not Sequel.  It may be 
hard to believe, but nothing has changed in this regard in the few days 
since I last told you that. If you can't get a connection using ruby-odbc 
directly, then unfortunately I won't be able to help you get it working 
with Sequel.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to