[Wtr-general] can you help why ODBC connection failure worked one time and not working no
Charley Baker
charley.baker at gmail.com
Thu May 3 16:14:43 EDT 2007
I'm not familiar with any ODBC library. You should use DBI if you want to go
this route which in turn has an ODBC driver.
http://www.kitebird.com/articles/ruby-dbi.html
-Charley
On 5/3/07, Venkata <forum-watir-users at openqa.org> wrote:
>
> helo all,
>
> I am trying to connect to SQL server through ODBC.
>
> Steps
> 1) I alreday have ODBC available.
> 2) Created a DSN and tested with Test connection there.
> 3) verified C:\IRBmain> Require 'ODBC' > true.
>
> 4) I created a scripts according to the examples.
>
>
> require 'watir'
> require 'ODBC'
> include 'watir'
> require 'Driver'
>
> #~ # Connect to the Databse
> conn = ODBC::connect('Myvalue','user','password')
>
> #~ # get the from the table
> h = conn.run("SELECT * FROM tableName where ssn = 'ssn'")
>
>
> #~ # get the ecah field value and prints to the log.
> h.each do |row|
> puts row
> end
>
>
> it worked and retrieved the values one time.
>
> Now it is not idetifying the ODBC anymore. i am getting Load error.
>
> ruby DBconnect.rb
> c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/ODBC.so: 127: The specified
> procedure could not be found.
> - Init_ODBC (LoadError)
> c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/ODBC.so from
> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
> from DBconnect.rb:2
>
>
>
>
> Please can you help me.
>
> do i have to disconnect? if it is please tell me how May be
>
> ODBC::disconnect ?
>
> Thanks,
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070503/ef3ac283/attachment.html
More information about the Wtr-general
mailing list