[wtr-general] Re: Ruby/Oracle connectivity

2009-07-30 Thread Marcus Simpson
Take Ruby out of the picture to make sure it is not your Oracle client.

Run sqlplus to ensure that you are connecting properly and the path is
well-defined.

On Wed, Jul 22, 2009 at 7:23 AM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 I have upgraded to 2.0.2 by using
 http://rubyforge.org/frs/download.php/56929/ruby-*oci8*-1.0.6-x86-mswin...http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem.
 and then:

 C:\rubygem install ruby-oci8-2.0.2-x86-mswin32-60.gem
 Successfully installed ruby-oci8-2.0.2-x86-mswin32-60
 1 gem installed
 Installing ri documentation for ruby-oci8-2.0.2-x86-mswin32-60...
 Installing RDoc documentation for ruby-oci8-2.0.2-x86-mswin32-60...

 but still it throws OCI Library Initialization
 Error (OCIError)

 Thnx
 D G


 On Wed, Jul 22, 2009 at 5:42 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dhiraj,

 As per your previous mail, you are having an older version of oci8 i.e
 1.0.6.Pls upgrade it to 2.0.2  try.

 Srinivas


 On Wed, Jul 22, 2009 at 5:31 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Attached is the screen shot, where it shows that ruby-oci8-1.0.6-mswin32
 is installed properly.


 On Wed, Jul 22, 2009 at 5:27 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 It works for me :). Check the version of ruby-oci8 that you are using.
 My ruby-oci8 version is 2.0.2. May be its not installed properly. Just 
 check
 on irb by doing a require 'oci8'. If it returns true then its installed
 properly else its not.

 Srinivas.


 On Wed, Jul 22, 2009 at 5:04 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:


 No fruit, still the same issue. (attached is the shot for the same)

 Regards
 Dheeraj Gambhir


 On Wed, Jul 22, 2009 at 4:35 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi,
 Try the following :

 require 'oci8'
 OCI8.new(mlbread, mlbread, Test).exec('select * from
 bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end

 Srinivas


 On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Sir,

 My code is:
 require 'oci8'
 OCI8.new('mlbread', 'mlbread', '
 172.16.100.110:1521/Test').exec('selecthttp://172.16.100.110:1521/Test%27%29.exec%28%27select*
  from bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end


 My TNS Entry is:
 Test =
   (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT =
 1521))
 )
 (CONNECT_DATA =
   (SID = mlbd)
   (SERVER = DEDICATED)
 )
   )

 But i m still getting this error:
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1


 Thanks
 D G


 On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dheeraj,

 Check the entry in your tnsnames.ora file. It should be something
 like this :

 *SOMENAME* =
 (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
 )
 (CONNECT_DATA =
   (SERVICE_NAME = someDBName)
 )
   )


 Now, just enter the *SOMENAME *as in your tnsname.ora file in your
 connection string  try:

 require 'oci8'
 OCI8.new(UserName,Password,*SOMENAME*).exec(some
 query...)

 Let me know if you face any issues.

 Srinivas.


 On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar
 to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 

[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread Dheeraj Gambhir

Guys,

I am putting this thing again and again, so you can guess that i need
it badly.So, Please help me if you can.

I am using:
Ruby 1.8.6
Oracle 9i
Windows XP
and i am done with ruby ruby-oci8-0[1].1.13-mswin.rb

But when i run this code to check whether i am able to connect to the
Oracle
database server or not:

ruby -r oci8 -e OCI8.new('mlbread', 'mlbread', 'MLBD').exec('select *
from bam_order.ec_invoice where order-id2316027') do |r| puts r.join
(' | '); end

Here mlbread=username, mlbread=password and MLBD=schema name

It gives me the following error:

C:\rubyruby -r oci8 -e OCI8.new('mlbread', 'mlbread', 'MLBD').exec
('select * f
rom bam_order.ec_invoice where order-id2316027') do |r| puts r.join('
| '); end

c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
Initialization
Error (OCIError)
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
**

For this code:

require 'dbi'
puts DBI.available_drivers
dbh = DBI.connect('DBI:OCI8:MLBD', 'mlbread', 'mlbread')
rs = dbh.prepare('select * from bam_order.ec_invoice where
order_id=139920;')
rs.execute
while rsRow = rs.fetch do
   p rsRow
   #Alternative output: puts rsRow
   #Alternative output: pp rsRow
end
rs.finish
dbh.disconnect

Error is:

C:\Program Files\Watir\examplesruby oracletest.rb
c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:329:in `load_driver': Unable to
load drive
r 'OCI8' (DBI::InterfaceError)
from c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:227:in
`_get_full_driver'
from c:/ruby/lib/ruby/site_ruby/1.8/dbi.rb:213:in `connect'
from oracletest.rb:5

**

For this code:

require 'oci8'
require 'dbi'

connection = OCI8.new( 'mlbread', 'mlbread', 'MLBD')
cursor = connection.exec('select * from bam_order.ec_invoice where
order_id=139920;')
while r = cursor.fetch()
puts r.join(',')
end
cursor.close
connection.logoff

puts and now using DBI

puts DBI.available_drivers
db = DBI.connect('DBI:OCI8:MLBD', 'mlbread', 'mlbread')
sql = select * from bam_order.ec_invoice where order_id=139920;

dbh.select_all(sql) do | row |
p row
end

Error is:

C:\Program Files\Watir\examplesruby oracletest1.rb
c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
Initialization
Error (OCIError)
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `ge
m_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `re
quire'
from oracletest1.rb:1

Please help me and let me know where i am wrong.

Regards
D G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread Tony

Hi Dheeraj,

Had never connected to oracle db.
Did the below and was able to connect to the db.
1. Downloaded ruby-oci from 
http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem.
This downloads as tar file.
2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to
ruby-oci8-1.0.6-x86-mswin32-60.gem
3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
4. Downloaded Oracle instant Basic client (45mb) from
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
5. Extract it to C:\Oracle\instantclient_11_1
6. Added C:\Oracle\instantclient_11_1 to the path variable.

dbtest.rb
require 'oci8'
OCI8.new('username', 'password', 'hostname:port/SID').exec
('select * from temp_cancel_subs') do |r|
  puts r.join(',')
end

This worked for me. I had to connect to oracle 10g

Thanks,
Tony
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread Željko Filipin
On Wed, Jul 22, 2009 at 12:02 AM, Jared Quinert ja...@kilmore.info wrote:
 Is there a need for a ruby-testing group?

If you create one, I will join it.

Željko
--
http://watirpodcast.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread Dheeraj Gambhir
Any help/solution?

On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
 5. Extract it to C:\Oracle\instantclient_11_1
 6. Added C:\Oracle\instantclient_11_1 to the path variable.

 dbtest.rb
 require 'oci8'
 OCI8.new('username', 'password', 'hostname:port/SID').exec
 ('select * from temp_cancel_subs') do |r|
  puts r.join(',')
 end

 This worked for me. I had to connect to oracle 10g

 Thanks,
 Tony
 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread srinivas subramanian
Hi Dheeraj,

Check the entry in your tnsnames.ora file. It should be something like this
:

*SOMENAME* =
(DESCRIPTION =
(ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
)
(CONNECT_DATA =
  (SERVICE_NAME = someDBName)
)
  )


Now, just enter the *SOMENAME *as in your tnsname.ora file in your
connection string  try:

require 'oci8'
OCI8.new(UserName,Password,*SOMENAME*).exec(some query...)

Let me know if you face any issues.

Srinivas.

On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
 5. Extract it to C:\Oracle\instantclient_11_1
 6. Added C:\Oracle\instantclient_11_1 to the path variable.

 dbtest.rb
 require 'oci8'
 OCI8.new('username', 'password', 'hostname:port/SID').exec
 ('select * from temp_cancel_subs') do |r|
  puts r.join(',')
 end

 This worked for me. I had to connect to oracle 10g

 Thanks,
 Tony




 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread Dheeraj Gambhir
Sir,

My code is:
require 'oci8'
OCI8.new('mlbread', 'mlbread', '172.16.100.110:1521/Test').exec('select *
from bam_order.ec_invoice where order_id = 139920') do |r|
puts r.join(',')
end


My TNS Entry is:
Test =
  (DESCRIPTION =
(ADDRESS_LIST =
  (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT = 1521))
)
(CONNECT_DATA =
  (SID = mlbd)
  (SERVER = DEDICATED)
)
  )

But i m still getting this error:
C:\testwatirruby testcon.rb
c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
Initialization
Error (OCIError)
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`ge
m_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`re
quire'
from testcon.rb:1


Thanks
D G

On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
winningsau...@gmail.com wrote:

 Hi Dheeraj,

 Check the entry in your tnsnames.ora file. It should be something like this
 :

 *SOMENAME* =
 (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
 )
 (CONNECT_DATA =
   (SERVICE_NAME = someDBName)
 )
   )


 Now, just enter the *SOMENAME *as in your tnsname.ora file in your
 connection string  try:

 require 'oci8'
 OCI8.new(UserName,Password,*SOMENAME*).exec(some query...)

 Let me know if you face any issues.

 Srinivas.


 On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
 5. Extract it to C:\Oracle\instantclient_11_1
 6. Added C:\Oracle\instantclient_11_1 to the path variable.

 dbtest.rb
 require 'oci8'
 OCI8.new('username', 'password', 'hostname:port/SID').exec
 ('select * from temp_cancel_subs') do |r|
  puts r.join(',')
 end

 This worked for me. I had to connect to oracle 10g

 Thanks,
 Tony







 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread srinivas subramanian
Hi,
Try the following :

require 'oci8'
OCI8.new(mlbread, mlbread, Test).exec('select * from
bam_order.ec_invoice where order_id = 139920') do |r|
puts r.join(',')
end

Srinivas

On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 Sir,

 My code is:
 require 'oci8'
 OCI8.new('mlbread', 'mlbread', 
 '172.16.100.110:1521/Test').exec('selecthttp://172.16.100.110:1521/Test%27%29.exec%28%27select*
  from bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end


 My TNS Entry is:
 Test =
   (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT = 1521))
 )
 (CONNECT_DATA =
   (SID = mlbd)
   (SERVER = DEDICATED)
 )
   )

 But i m still getting this error:
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1


 Thanks
 D G


 On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dheeraj,

 Check the entry in your tnsnames.ora file. It should be something like
 this :

 *SOMENAME* =
 (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
 )
 (CONNECT_DATA =
   (SERVICE_NAME = someDBName)
 )
   )


 Now, just enter the *SOMENAME *as in your tnsname.ora file in your
 connection string  try:

 require 'oci8'
 OCI8.new(UserName,Password,*SOMENAME*).exec(some query...)

 Let me know if you face any issues.

 Srinivas.


 On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
 5. Extract it to C:\Oracle\instantclient_11_1
 6. Added C:\Oracle\instantclient_11_1 to the path variable.

 dbtest.rb
 require 'oci8'
 OCI8.new('username', 'password', 'hostname:port/SID').exec
 ('select * from temp_cancel_subs') do |r|
  puts r.join(',')
 end

 This worked for me. I had to connect to oracle 10g

 Thanks,
 Tony










 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread srinivas subramanian
Hi Dhiraj,

As per your previous mail, you are having an older version of oci8 i.e
1.0.6.Pls upgrade it to 2.0.2  try.

Srinivas

On Wed, Jul 22, 2009 at 5:31 PM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 Attached is the screen shot, where it shows that ruby-oci8-1.0.6-mswin32 is
 installed properly.


 On Wed, Jul 22, 2009 at 5:27 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 It works for me :). Check the version of ruby-oci8 that you are using. My
 ruby-oci8 version is 2.0.2. May be its not installed properly. Just check on
 irb by doing a require 'oci8'. If it returns true then its installed
 properly else its not.

 Srinivas.


 On Wed, Jul 22, 2009 at 5:04 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:


 No fruit, still the same issue. (attached is the shot for the same)

 Regards
 Dheeraj Gambhir


 On Wed, Jul 22, 2009 at 4:35 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi,
 Try the following :

 require 'oci8'
 OCI8.new(mlbread, mlbread, Test).exec('select * from
 bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end

 Srinivas


 On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Sir,

 My code is:
 require 'oci8'
 OCI8.new('mlbread', 'mlbread', '
 172.16.100.110:1521/Test').exec('selecthttp://172.16.100.110:1521/Test%27%29.exec%28%27select*
  from bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end


 My TNS Entry is:
 Test =
   (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT = 1521))
 )
 (CONNECT_DATA =
   (SID = mlbd)
   (SERVER = DEDICATED)
 )
   )

 But i m still getting this error:
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1


 Thanks
 D G


 On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dheeraj,

 Check the entry in your tnsnames.ora file. It should be something like
 this :

 *SOMENAME* =
 (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
 )
 (CONNECT_DATA =
   (SERVICE_NAME = someDBName)
 )
   )


 Now, just enter the *SOMENAME *as in your tnsname.ora file in your
 connection string  try:

 require 'oci8'
 OCI8.new(UserName,Password,*SOMENAME*).exec(some query...)

 Let me know if you face any issues.

 Srinivas.


 On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
 5. Extract it to C:\Oracle\instantclient_11_1
 6. Added C:\Oracle\instantclient_11_1 to the path variable.

 dbtest.rb
 require 'oci8'
 OCI8.new('username', 'password',
 'hostname:port/SID').exec
 ('select * from temp_cancel_subs') do |r|
  puts r.join(',')
 end

 This worked for me. I had to connect to oracle 10g

 Thanks,
 Tony






















 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread Dheeraj Gambhir
I have upgraded to 2.0.2 by using
http://rubyforge.org/frs/download.php/56929/ruby-*oci8*-1.0.6-x86-mswin...http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem.
and then:

C:\rubygem install ruby-oci8-2.0.2-x86-mswin32-60.gem
Successfully installed ruby-oci8-2.0.2-x86-mswin32-60
1 gem installed
Installing ri documentation for ruby-oci8-2.0.2-x86-mswin32-60...
Installing RDoc documentation for ruby-oci8-2.0.2-x86-mswin32-60...

but still it throws OCI Library Initialization
Error (OCIError)

Thnx
D G

On Wed, Jul 22, 2009 at 5:42 PM, srinivas subramanian 
winningsau...@gmail.com wrote:

 Hi Dhiraj,

 As per your previous mail, you are having an older version of oci8 i.e
 1.0.6.Pls upgrade it to 2.0.2  try.

 Srinivas


 On Wed, Jul 22, 2009 at 5:31 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Attached is the screen shot, where it shows that ruby-oci8-1.0.6-mswin32
 is installed properly.


 On Wed, Jul 22, 2009 at 5:27 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 It works for me :). Check the version of ruby-oci8 that you are using. My
 ruby-oci8 version is 2.0.2. May be its not installed properly. Just check on
 irb by doing a require 'oci8'. If it returns true then its installed
 properly else its not.

 Srinivas.


 On Wed, Jul 22, 2009 at 5:04 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:


 No fruit, still the same issue. (attached is the shot for the same)

 Regards
 Dheeraj Gambhir


 On Wed, Jul 22, 2009 at 4:35 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi,
 Try the following :

 require 'oci8'
 OCI8.new(mlbread, mlbread, Test).exec('select * from
 bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end

 Srinivas


 On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Sir,

 My code is:
 require 'oci8'
 OCI8.new('mlbread', 'mlbread', '
 172.16.100.110:1521/Test').exec('selecthttp://172.16.100.110:1521/Test%27%29.exec%28%27select*
  from bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end


 My TNS Entry is:
 Test =
   (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT = 1521))
 )
 (CONNECT_DATA =
   (SID = mlbd)
   (SERVER = DEDICATED)
 )
   )

 But i m still getting this error:
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1


 Thanks
 D G


 On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dheeraj,

 Check the entry in your tnsnames.ora file. It should be something
 like this :

 *SOMENAME* =
 (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
 )
 (CONNECT_DATA =
   (SERVICE_NAME = someDBName)
 )
   )


 Now, just enter the *SOMENAME *as in your tnsname.ora file in your
 connection string  try:

 require 'oci8'
 OCI8.new(UserName,Password,*SOMENAME*).exec(some query...)

 Let me know if you face any issues.

 Srinivas.


 On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
 5. Extract it to C:\Oracle\instantclient_11_1
 6. Added C:\Oracle\instantclient_11_1 to the path variable.

 dbtest.rb
 require 'oci8'
 OCI8.new('username', 'password',
 'hostname:port/SID').exec
 ('select * from temp_cancel_subs') do 

[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread srinivas subramanian
Well, in that case, i'm not sure why its not working for you. Because for me
it works perfectly fine.

Srinivas

On Wed, Jul 22, 2009 at 5:53 PM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:

 I have upgraded to 2.0.2 by using
 http://rubyforge.org/frs/download.php/56929/ruby-*oci8*-1.0.6-x86-mswin...http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem.
 and then:

 C:\rubygem install ruby-oci8-2.0.2-x86-mswin32-60.gem
 Successfully installed ruby-oci8-2.0.2-x86-mswin32-60
 1 gem installed
 Installing ri documentation for ruby-oci8-2.0.2-x86-mswin32-60...
 Installing RDoc documentation for ruby-oci8-2.0.2-x86-mswin32-60...

 but still it throws OCI Library Initialization
 Error (OCIError)

 Thnx
 D G


 On Wed, Jul 22, 2009 at 5:42 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dhiraj,

 As per your previous mail, you are having an older version of oci8 i.e
 1.0.6.Pls upgrade it to 2.0.2  try.

 Srinivas


 On Wed, Jul 22, 2009 at 5:31 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Attached is the screen shot, where it shows that ruby-oci8-1.0.6-mswin32
 is installed properly.


 On Wed, Jul 22, 2009 at 5:27 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 It works for me :). Check the version of ruby-oci8 that you are using.
 My ruby-oci8 version is 2.0.2. May be its not installed properly. Just 
 check
 on irb by doing a require 'oci8'. If it returns true then its installed
 properly else its not.

 Srinivas.


 On Wed, Jul 22, 2009 at 5:04 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:


 No fruit, still the same issue. (attached is the shot for the same)

 Regards
 Dheeraj Gambhir


 On Wed, Jul 22, 2009 at 4:35 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi,
 Try the following :

 require 'oci8'
 OCI8.new(mlbread, mlbread, Test).exec('select * from
 bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end

 Srinivas


 On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Sir,

 My code is:
 require 'oci8'
 OCI8.new('mlbread', 'mlbread', '
 172.16.100.110:1521/Test').exec('selecthttp://172.16.100.110:1521/Test%27%29.exec%28%27select*
  from bam_order.ec_invoice where order_id = 139920') do |r|
 puts r.join(',')
 end


 My TNS Entry is:
 Test =
   (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT =
 1521))
 )
 (CONNECT_DATA =
   (SID = mlbd)
   (SERVER = DEDICATED)
 )
   )

 But i m still getting this error:
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1


 Thanks
 D G


 On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
 winningsau...@gmail.com wrote:

 Hi Dheeraj,

 Check the entry in your tnsnames.ora file. It should be something
 like this :

 *SOMENAME* =
 (DESCRIPTION =
 (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
 )
 (CONNECT_DATA =
   (SERVICE_NAME = someDBName)
 )
   )


 Now, just enter the *SOMENAME *as in your tnsname.ora file in your
 connection string  try:

 require 'oci8'
 OCI8.new(UserName,Password,*SOMENAME*).exec(some
 query...)

 Let me know if you face any issues.

 Srinivas.


 On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Any help/solution?


 On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
 checktestingthi...@gmail.com wrote:

 Hi Tony,

 I tried one again that u mentioned here but i am still getting :
 C:\testwatirruby testcon.rb
 c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
 Initialization
 Error (OCIError)
 from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
 m_original_require'
 from
 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
 quire'
 from testcon.rb:1

 Refer to attached screen shot having code and error back to back.


 Thanks
 D G


 On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:


 Hi Dheeraj,

 Had never connected to oracle db.
 Did the below and was able to connect to the db.
 1. Downloaded ruby-oci from
 http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem
 .
 This downloads as tar file.
 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar
 to
 ruby-oci8-1.0.6-x86-mswin32-60.gem
 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem
 4. Downloaded Oracle instant Basic client (45mb) from

 http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
 5. Extract it 

[wtr-general] Re: Ruby/Oracle connectivity

2009-07-22 Thread Chuck van der Linden

You probably need to take this to one of the more mainstream ruby
discussion lists.   This is really outside the scope of Watir since
it's really more of a general ruby language question, and also we seem
to have reached the limits of the folks here who are familiar with
this since they have told you what is working for them, and it's not
working for you.

http://www.ruby-lang.org/en/community/mailing-lists/



On Jul 22, 5:23 am, Dheeraj Gambhir checktestingthi...@gmail.com
wrote:
 I have upgraded to 2.0.2 by 
 usinghttp://rubyforge.org/frs/download.php/56929/ruby-*oci8*-1.0.6-x86-mswin...http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin
 and then:

 C:\rubygem install ruby-oci8-2.0.2-x86-mswin32-60.gem
 Successfully installed ruby-oci8-2.0.2-x86-mswin32-60
 1 gem installed
 Installing ri documentation for ruby-oci8-2.0.2-x86-mswin32-60...
 Installing RDoc documentation for ruby-oci8-2.0.2-x86-mswin32-60...

 but still it throws OCI Library Initialization
 Error (OCIError)

 Thnx
 D G

 On Wed, Jul 22, 2009 at 5:42 PM, srinivas subramanian 



 winningsau...@gmail.com wrote:
  Hi Dhiraj,

  As per your previous mail, you are having an older version of oci8 i.e
  1.0.6.Pls upgrade it to 2.0.2  try.

  Srinivas

  On Wed, Jul 22, 2009 at 5:31 PM, Dheeraj Gambhir 
  checktestingthi...@gmail.com wrote:

  Attached is the screen shot, where it shows that ruby-oci8-1.0.6-mswin32
  is installed properly.

  On Wed, Jul 22, 2009 at 5:27 PM, srinivas subramanian 
  winningsau...@gmail.com wrote:

  It works for me :). Check the version of ruby-oci8 that you are using. My
  ruby-oci8 version is 2.0.2. May be its not installed properly. Just check 
  on
  irb by doing a require 'oci8'. If it returns true then its installed
  properly else its not.

  Srinivas.

  On Wed, Jul 22, 2009 at 5:04 PM, Dheeraj Gambhir 
  checktestingthi...@gmail.com wrote:

  No fruit, still the same issue. (attached is the shot for the same)

  Regards
  Dheeraj Gambhir

  On Wed, Jul 22, 2009 at 4:35 PM, srinivas subramanian 
  winningsau...@gmail.com wrote:

  Hi,
  Try the following :

  require 'oci8'
  OCI8.new(mlbread, mlbread, Test).exec('select * from
  bam_order.ec_invoice where order_id = 139920') do |r|
  puts r.join(',')
  end

  Srinivas

  On Wed, Jul 22, 2009 at 4:21 PM, Dheeraj Gambhir 
  checktestingthi...@gmail.com wrote:

  Sir,

  My code is:
  require 'oci8'
  OCI8.new('mlbread', 'mlbread', '
  172.16.100.110:1521/Test').exec('selecthttp://172.16.100.110:1521/Test%27%29.exec%28%27select*
   from bam_order.ec_invoice where order_id = 139920') do |r|
  puts r.join(',')
  end

  My TNS Entry is:
  Test =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.110)(PORT = 1521))
      )
      (CONNECT_DATA =
        (SID = mlbd)
        (SERVER = DEDICATED)
      )
    )

  But i m still getting this error:
  C:\testwatirruby testcon.rb
  c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
  Initialization
  Error (OCIError)
          from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
          from
  c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
  m_original_require'
          from
  c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
  quire'
          from testcon.rb:1

  Thanks
  D G

  On Wed, Jul 22, 2009 at 4:15 PM, srinivas subramanian 
  winningsau...@gmail.com wrote:

  Hi Dheeraj,

  Check the entry in your tnsnames.ora file. It should be something
  like this :

  *SOMENAME* =
  (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = someIP)(PORT = somePORT))
      )
      (CONNECT_DATA =
        (SERVICE_NAME = someDBName)
      )
    )

  Now, just enter the *SOMENAME *as in your tnsname.ora file in your
  connection string  try:

  require 'oci8'
  OCI8.new(UserName,Password,*SOMENAME*).exec(some query...)

  Let me know if you face any issues.

  Srinivas.

  On Wed, Jul 22, 2009 at 3:15 PM, Dheeraj Gambhir 
  checktestingthi...@gmail.com wrote:

  Any help/solution?

  On Wed, Jul 22, 2009 at 1:18 PM, Dheeraj Gambhir 
  checktestingthi...@gmail.com wrote:

  Hi Tony,

  I tried one again that u mentioned here but i am still getting :
  C:\testwatirruby testcon.rb
  c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
  Initialization
  Error (OCIError)
          from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52
          from
  c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `ge
  m_original_require'
          from
  c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `re
  quire'
          from testcon.rb:1

  Refer to attached screen shot having code and error back to back.

  Thanks
  D G

  On Wed, Jul 22, 2009 at 1:00 PM, Tony ynot...@gmail.com wrote:

  Hi Dheeraj,

  Had never connected to oracle db.
  Did the below and was able to connect to the db.
  1. Downloaded ruby-oci from
 

[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Felipe Knorr Kuhn
Hello Dheeraj,

You need this library http://ruby-oci8.rubyforge.org/en/

The site explains all you need to set it up.

Regards,

FK


On Tue, Jul 21, 2009 at 10:06 AM, Dheeraj Gambhir 
checktestingthi...@gmail.com wrote:


 Hi All,


 I have tried my level best to connect to oracle using ruby but all in
 vain.

 Can any one provide concrete steps to follow to do that.
 Please list down what all we require for this.


 Thanks in advance.


 Regards
 Dheeraj Gambhir
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Ivan Kabluchkov

Install http://rubyforge.org/projects/ruby-oci8/

And example of code:

require 'oci8'

connection = OCI8.new(user, pass, scheme)
sql = 'select * from table'

connection.exec(sql) do |row|
   puts row
end


On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
wrote:
 Hi All,

 I have tried my level best to connect to oracle using ruby but all in
 vain.

 Can any one provide concrete steps to follow to do that.
 Please list down what all we require for this.

 Thanks in advance.

 Regards
 Dheeraj Gambhir
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Dheeraj Gambhir

Hi,

I am getting oci.dll missing error on running the code given by you:


require 'oci8'

connection = OCI8.new(mlbread,mlbread,MLBD)
sql = 'select * from bam_order.ec_invoice where
created_datesysdate-2'


connection.exec(sql) do |row|
  puts row
end


Regards
D G

On Jul 21, 6:25 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:
 Installhttp://rubyforge.org/projects/ruby-oci8/

 And example of code:

 require 'oci8'

 connection = OCI8.new(user, pass, scheme)
 sql = 'select * from table'

 connection.exec(sql) do |row|
    puts row
 end

 On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
 wrote:

  Hi All,

  I have tried my level best to connect to oracle using ruby but all in
  vain.

  Can any one provide concrete steps to follow to do that.
  Please list down what all we require for this.

  Thanks in advance.

  Regards
  Dheeraj Gambhir
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Dheeraj Gambhir

I am using oracle client from past 2 years, so do i need to re-
install?. I don't think so.

Now after re-installing ruby-oci8-1.0.6-mswin32, i am getting the
following error now:

C:\Program Files\Watir\examplesruby oraclecon.rb
warning: ActiveRecord-JDBC is for use with JRuby only
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
connection_a
dapters/abstract/connection_specification.rb:76:in
`establish_connection': Pleas
e install the jdbc adapter: `gem install activerecord-jdbc-adapter`
(no such fil
e to load -- java) (RuntimeError)
from oraclecon.rb:7

I re-install ruby-oci8-1.0.6-mswin32 because earlier i was getting
oci.dll missing error.

Regards
Dheeraj Gambhir

On Jul 21, 6:45 pm, Felipe Knorr Kuhn fkn...@gmail.com wrote:
 Did you download and install the Instant Client as described in the guide?

  Download at least two packages Instant Client Package - *Basic* and
 Instant Client Package - *SDK* from Oracle Technology
 Networkhttp://www.oracle.com/technology/tech/oci/instantclient/index.html
 .

 note: use 32-bit packages for 32-bit ruby even though the OS is 64-bit.

 FK

 On Tue, Jul 21, 2009 at 10:43 AM, Dheeraj Gambhir 

 checktestingthi...@gmail.com wrote:

  Hi,

  I am getting oci.dll missing error on running the code given by you:

  require 'oci8'

  connection = OCI8.new(mlbread,mlbread,MLBD)
  sql = 'select * from bam_order.ec_invoice where created_datesysdate-2'

  connection.exec(sql) do |row|
    puts row
  end

  Regards
  D G

  On Tue, Jul 21, 2009 at 6:55 PM, Ivan Kabluchkov 
  ikabluch...@gmail.comwrote:

  Installhttp://rubyforge.org/projects/ruby-oci8/

  And example of code:

  require 'oci8'

  connection = OCI8.new(user, pass, scheme)
  sql = 'select * from table'

  connection.exec(sql) do |row|
    puts row
  end

  On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
  wrote:
   Hi All,

   I have tried my level best to connect to oracle using ruby but all in
   vain.

   Can any one provide concrete steps to follow to do that.
   Please list down what all we require for this.

   Thanks in advance.

   Regards
   Dheeraj Gambhir
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Dheeraj Gambhir

If i run this code to check whether i am able to connect to the Oracle
database server or not:

ruby -r oci8 -e OCI8.new('mlbread', 'mlbread', 'MLBD').exec('select *
from bam_order.ec_invoice where order-id2316027') do |r| puts r.join
(' | '); end

It gives me:

C:\rubyruby -r oci8 -e OCI8.new('mlbread', 'mlbread', 'MLBD').exec
('select * f
rom bam_order.ec_invoice where order-id2316027') do |r| puts r.join('
| '); end

c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
Initialization
Error (OCIError)
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52

Regards
D G

On Jul 21, 6:55 pm, Dheeraj Gambhir checktestingthi...@gmail.com
wrote:
 I am using oracle client from past 2 years, so do i need to re-
 install?. I don't think so.

 Now after re-installing ruby-oci8-1.0.6-mswin32, i am getting the
 following error now:

 C:\Program Files\Watir\examplesruby oraclecon.rb
 warning: ActiveRecord-JDBC is for use with JRuby only
 c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/
 connection_a
 dapters/abstract/connection_specification.rb:76:in
 `establish_connection': Pleas
 e install the jdbc adapter: `gem install activerecord-jdbc-adapter`
 (no such fil
 e to load -- java) (RuntimeError)
         from oraclecon.rb:7

 I re-install ruby-oci8-1.0.6-mswin32 because earlier i was getting
 oci.dll missing error.

 Regards
 Dheeraj Gambhir

 On Jul 21, 6:45 pm, Felipe Knorr Kuhn fkn...@gmail.com wrote:

  Did you download and install the Instant Client as described in the guide?

   Download at least two packages Instant Client Package - *Basic* and
  Instant Client Package - *SDK* from Oracle Technology
  Networkhttp://www.oracle.com/technology/tech/oci/instantclient/index.html
  .

  note: use 32-bit packages for 32-bit ruby even though the OS is 64-bit.

  FK

  On Tue, Jul 21, 2009 at 10:43 AM, Dheeraj Gambhir 

  checktestingthi...@gmail.com wrote:

   Hi,

   I am getting oci.dll missing error on running the code given by you:

   require 'oci8'

   connection = OCI8.new(mlbread,mlbread,MLBD)
   sql = 'select * from bam_order.ec_invoice where created_datesysdate-2'

   connection.exec(sql) do |row|
     puts row
   end

   Regards
   D G

   On Tue, Jul 21, 2009 at 6:55 PM, Ivan Kabluchkov 
   ikabluch...@gmail.comwrote:

   Installhttp://rubyforge.org/projects/ruby-oci8/

   And example of code:

   require 'oci8'

   connection = OCI8.new(user, pass, scheme)
   sql = 'select * from table'

   connection.exec(sql) do |row|
     puts row
   end

   On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
   wrote:
Hi All,

I have tried my level best to connect to oracle using ruby but all in
vain.

Can any one provide concrete steps to follow to do that.
Please list down what all we require for this.

Thanks in advance.

Regards
Dheeraj Gambhir
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread karim rayani

you can also use the db2 library or the active record library they are
better then the OCI8 stuff

On Tue, Jul 21, 2009 at 7:14 PM, Dheeraj
Gambhirchecktestingthi...@gmail.com wrote:

 Hi,

 I am getting oci.dll missing error on running the code given by you:


 require 'oci8'

 connection = OCI8.new(mlbread,mlbread,MLBD)
 sql = 'select * from bam_order.ec_invoice where
 created_datesysdate-2'


 connection.exec(sql) do |row|
  puts row
 end


 Regards
 D G

 On Jul 21, 6:25 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:
 Installhttp://rubyforge.org/projects/ruby-oci8/

 And example of code:

 require 'oci8'

 connection = OCI8.new(user, pass, scheme)
 sql = 'select * from table'

 connection.exec(sql) do |row|
    puts row
 end

 On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
 wrote:

  Hi All,

  I have tried my level best to connect to oracle using ruby but all in
  vain.

  Can any one provide concrete steps to follow to do that.
  Please list down what all we require for this.

  Thanks in advance.

  Regards
  Dheeraj Gambhir
 




-- 
Regards,

Alkarim Rayani

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Chuck van der Linden

You may also find a lot more folks who know about doing this sort of
thing in the main ruby forums than you will here where many of the
folks have never needed to connect to a db (or if they did it was
mysql or ms-sql) in order to test against a web UI.

On Jul 21, 8:36 am, karim rayani karim@gmail.com wrote:
 you can also use the db2 library or the active record library they are
 better then the OCI8 stuff

 On Tue, Jul 21, 2009 at 7:14 PM, Dheeraj





 Gambhirchecktestingthi...@gmail.com wrote:

  Hi,

  I am getting oci.dll missing error on running the code given by you:

  require 'oci8'

  connection = OCI8.new(mlbread,mlbread,MLBD)
  sql = 'select * from bam_order.ec_invoice where
  created_datesysdate-2'

  connection.exec(sql) do |row|
   puts row
  end

  Regards
  D G

  On Jul 21, 6:25 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:
  Installhttp://rubyforge.org/projects/ruby-oci8/

  And example of code:

  require 'oci8'

  connection = OCI8.new(user, pass, scheme)
  sql = 'select * from table'

  connection.exec(sql) do |row|
     puts row
  end

  On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
  wrote:

   Hi All,

   I have tried my level best to connect to oracle using ruby but all in
   vain.

   Can any one provide concrete steps to follow to do that.
   Please list down what all we require for this.

   Thanks in advance.

   Regards
   Dheeraj Gambhir

 --
 Regards,

 Alkarim Rayani- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Jared Quinert

That's one point that I find interesting.  Once Ruby found its way into 
my toolkit, I've used it to hit databases, web services, parse xml, 
simulate flat-file responses from banks and more.  A lot of my watir 
scripts are simple integrations between data that I get from these other 
approaches.

What do you think some of the factors are that stop people from trying 
other things? I have my own thoughts and experiences on this point, but 
am curious about what the barriers are for others (because maybe I need 
to start blogging more 'How to do x with Ruby' - I have permission to 
use some of my real code).

Is there a need for a ruby-testing group?  Are there other groups that 
serve this need?  The people in the main ruby forums were frequently 
unable to help me, because they either use rails, and not much of the 
other ruby libraries, or they build their tools in their main production 
language (ie. Java).

Jared
http://www.software-testing.com.au/blog/

Chuck van der Linden wrote:
 You may also find a lot more folks who know about doing this sort of
 thing in the main ruby forums than you will here where many of the
 folks have never needed to connect to a db (or if they did it was
 mysql or ms-sql) in order to test against a web UI.

 On Jul 21, 8:36 am, karim rayani karim@gmail.com wrote:
   
 you can also use the db2 library or the active record library they are
 better then the OCI8 stuff

 On Tue, Jul 21, 2009 at 7:14 PM, Dheeraj





 Gambhirchecktestingthi...@gmail.com wrote:

 
 Hi,
   
 I am getting oci.dll missing error on running the code given by you:
   
 require 'oci8'
   
 connection = OCI8.new(mlbread,mlbread,MLBD)
 sql = 'select * from bam_order.ec_invoice where
 created_datesysdate-2'
   
 connection.exec(sql) do |row|
  puts row
 end
   
 Regards
 D G
   
 On Jul 21, 6:25 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:
   
 Installhttp://rubyforge.org/projects/ruby-oci8/
 
 And example of code:
 
 require 'oci8'
 
 connection = OCI8.new(user, pass, scheme)
 sql = 'select * from table'
 
 connection.exec(sql) do |row|
puts row
 end
 
 On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
 wrote:
 
 Hi All,
   
 I have tried my level best to connect to oracle using ruby but all in
 vain.
   
 Can any one provide concrete steps to follow to do that.
 Please list down what all we require for this.
   
 Thanks in advance.
   
 Regards
 Dheeraj Gambhir
   
 --
 Regards,

 Alkarim Rayani- Hide quoted text -

 - Show quoted text -
 
 

   


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Chuck van der Linden

Some great points Jared,   for me it comes down to this..

There are probably a ton of great things I could do using Ruby, but
unless I'm sure one of them will pay back the time investment to
figure out how to do them, I likely won't get around to them because
I have so many other things that I NEED to do with regard to my
testing etc.

For Most folks, unless their company uses oracle, if they connect to a
db, it will be whatever their company uses, or mysql if they are doing
it on their own due to the cost of licensing for the 'big boys'  (well
ok SQL Express is pretty close to free, but not a lot of folks know
that unless they already use MS-SQL)

I for one would welcome any handy info that is oriented towards the
needs of test and QA regarding how to do xyz using ruby.   To a degree
the book Everyday scripting with Ruby covers some of that, since
{whisper} it was originally aimed at testers {/whisper}

I agree Ruby is super useful stuff, and the more you learn the more
you can do with it.  But I know many of us are in that 'learn what I
need to know right now' mode and don't get a chance to explore
possibilities beyond immediate needs of what we are testing at this
very instant.

On Jul 21, 3:02 pm, Jared Quinert ja...@kilmore.info wrote:
 That's one point that I find interesting.  Once Ruby found its way into
 my toolkit, I've used it to hit databases, web services, parse xml,
 simulate flat-file responses from banks and more.  A lot of my watir
 scripts are simple integrations between data that I get from these other
 approaches.

 What do you think some of the factors are that stop people from trying
 other things? I have my own thoughts and experiences on this point, but
 am curious about what the barriers are for others (because maybe I need
 to start blogging more 'How to do x with Ruby' - I have permission to
 use some of my real code).

 Is there a need for a ruby-testing group?  Are there other groups that
 serve this need?  The people in the main ruby forums were frequently
 unable to help me, because they either use rails, and not much of the
 other ruby libraries, or they build their tools in their main production
 language (ie. Java).

 Jaredhttp://www.software-testing.com.au/blog/

 Chuck van der Linden wrote:



  You may also find a lot more folks who know about doing this sort of
  thing in the main ruby forums than you will here where many of the
  folks have never needed to connect to a db (or if they did it was
  mysql or ms-sql) in order to test against a web UI.

  On Jul 21, 8:36 am, karim rayani karim@gmail.com wrote:

  you can also use the db2 library or the active record library they are
  better then the OCI8 stuff

  On Tue, Jul 21, 2009 at 7:14 PM, Dheeraj

  Gambhirchecktestingthi...@gmail.com wrote:

  Hi,

  I am getting oci.dll missing error on running the code given by you:

  require 'oci8'

  connection = OCI8.new(mlbread,mlbread,MLBD)
  sql = 'select * from bam_order.ec_invoice where
  created_datesysdate-2'

  connection.exec(sql) do |row|
   puts row
  end

  Regards
  D G

  On Jul 21, 6:25 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:

  Installhttp://rubyforge.org/projects/ruby-oci8/

  And example of code:

  require 'oci8'

  connection = OCI8.new(user, pass, scheme)
  sql = 'select * from table'

  connection.exec(sql) do |row|
     puts row
  end

  On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
  wrote:

  Hi All,

  I have tried my level best to connect to oracle using ruby but all in
  vain.

  Can any one provide concrete steps to follow to do that.
  Please list down what all we require for this.

  Thanks in advance.

  Regards
  Dheeraj Gambhir

  --
  Regards,

  Alkarim Rayani- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Felipe Knorr Kuhn
Hello Jared,

I'm a software tester and my interest in Ruby started a few years ago when I
found out about Watir.

At some point I started a blog (in Portuguese) about How to do x in
Ruby, which would be basically a repository of solutions to the problems I
came across, but it never took off.

People tend to be motivated by challenges, and once the challenge is over,
the interest in the problem is over as well. That includes documenting the
solution so other people can use it, too.

As you mentioned, the Ruby community is heavily targeted towards Rails
developers and I also suffered from this when trying to come up with things
like Oracle integration, parsing and generation of OpenOffice documents and
scheduled tasks.

I believe a ruby-testing group is not necessary, but rather a place with
code people can copy, paste and most importantly, learn.

Even though there are some examples on the wiki, How do I click on popups?
is still one of the most asked questions in this group. Why? Are the
examples outdated? Are people facing variants that the examples don't cover?


Perhaps we should start a new thread just to discuss how to share code and.

Regards,
FK

On Tue, Jul 21, 2009 at 7:02 PM, Jared Quinert ja...@kilmore.info wrote:


 That's one point that I find interesting.  Once Ruby found its way into
 my toolkit, I've used it to hit databases, web services, parse xml,
 simulate flat-file responses from banks and more.  A lot of my watir
 scripts are simple integrations between data that I get from these other
 approaches.

 What do you think some of the factors are that stop people from trying
 other things? I have my own thoughts and experiences on this point, but
 am curious about what the barriers are for others (because maybe I need
 to start blogging more 'How to do x with Ruby' - I have permission to
 use some of my real code).

 Is there a need for a ruby-testing group?  Are there other groups that
 serve this need?  The people in the main ruby forums were frequently
 unable to help me, because they either use rails, and not much of the
 other ruby libraries, or they build their tools in their main production
 language (ie. Java).

 Jared
 http://www.software-testing.com.au/blog/

 Chuck van der Linden wrote:
  You may also find a lot more folks who know about doing this sort of
  thing in the main ruby forums than you will here where many of the
  folks have never needed to connect to a db (or if they did it was
  mysql or ms-sql) in order to test against a web UI.
 
  On Jul 21, 8:36 am, karim rayani karim@gmail.com wrote:
 
  you can also use the db2 library or the active record library they are
  better then the OCI8 stuff
 
  On Tue, Jul 21, 2009 at 7:14 PM, Dheeraj
 
 
 
 
 
  Gambhirchecktestingthi...@gmail.com wrote:
 
 
  Hi,
 
  I am getting oci.dll missing error on running the code given by you:
 
  require 'oci8'
 
  connection = OCI8.new(mlbread,mlbread,MLBD)
  sql = 'select * from bam_order.ec_invoice where
  created_datesysdate-2'
 
  connection.exec(sql) do |row|
   puts row
  end
 
  Regards
  D G
 
  On Jul 21, 6:25 pm, Ivan Kabluchkov ikabluch...@gmail.com wrote:
 
  Installhttp://rubyforge.org/projects/ruby-oci8/
 
  And example of code:
 
  require 'oci8'
 
  connection = OCI8.new(user, pass, scheme)
  sql = 'select * from table'
 
  connection.exec(sql) do |row|
 puts row
  end
 
  On 21 июл, 17:06, Dheeraj Gambhir checktestingthi...@gmail.com
  wrote:
 
  Hi All,
 
  I have tried my level best to connect to oracle using ruby but all in
  vain.
 
  Can any one provide concrete steps to follow to do that.
  Please list down what all we require for this.
 
  Thanks in advance.
 
  Regards
  Dheeraj Gambhir
 
  --
  Regards,
 
  Alkarim Rayani- Hide quoted text -
 
  - Show quoted text -
 
  
 
 


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Ruby/Oracle connectivity

2009-07-21 Thread Dheeraj Gambhir

I am using:
Ruby 1.8.6
Oracle 9i
Windows XP
and i am done with ruby ruby-oci8-0[1].1.13-mswin.rb

But when i run this code on cmd to check whether i am able to connect
to the Oracle
database server or not:

ruby -r oci8 -e OCI8.new('mlbread', 'mlbread', 'MLBD').exec('select *
from bam_order.ec_invoice where order-id2316027') do |r| puts r.join
(' | '); end

Here mlbread=username, mlbread=password and MLBD=schema name

It gives me the following error:

C:\rubyruby -r oci8 -e OCI8.new('mlbread', 'mlbread', 'MLBD').exec
('select * f
rom bam_order.ec_invoice where order-id2316027') do |r| puts r.join('
| '); end

c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52:in `init': OCI Library
Initialization
Error (OCIError)
from c:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:52


Plase help me and let me know where i am wrong.

Regards
D G
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---