Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 93926
BY: Praveen Devarao (praveend)
DATE: 2010-06-17 17:16
SUBJECT: RE: Connecting to Informix

 

Hi Martin,

Could you try the sample script below. This could help us know if the problem is really the server_info or something else.

BTW, what is the version of your IBM Dataserver client? To know issue db2level (Yes that's right db2level). If db2level is not in your path you should find the db2level script under the bin directory of the IBM Dataserver client.

#sample.rb
#----------------------
require 'ibm_db'

puts "A sample script to test connection to IDS and retrieve the server info"

conn = IBM_DB.connect('DRIVER={IBM DB2 ODBC DRIVER};DATABASE=dbname;HOSTNAME=1.234.456.89;PORT=9091;PROTOCOL=TCPIP;UID=username;PWD=password;','','')

puts "Connection complete"

srvinf = IBM_DB.server_info(conn)

puts srvinf.DBMS_NAME

IBM_DB.close conn

puts "Script run complete"
#----------------------
#End of Script

Thanks

Praveen


Thread View

Thread Author Date
Connecting to InformixMartin Little2010-06-09 20:32
      RE: Connecting to InformixPraveen Devarao2010-06-10 05:26
            RE: Connecting to InformixPraveen Devarao2010-06-11 05:30
                  RE: Connecting to InformixMartin Little2010-06-17 13:47
                        RE: Connecting to InformixPraveen Devarao2010-06-17 17:16
                              RE: Connecting to InformixMartin Little2010-06-17 20:48
                                    RE: Connecting to InformixPraveen Devarao2010-06-18 05:27
                                          RE: Connecting to InformixMartin Little2010-06-18 18:52
                                                RE: Connecting to InformixMartin Little2010-06-18 20:15
                                                      RE: Connecting to InformixPraveen Devarao2010-06-19 02:55
                                                            RE: Connecting to InformixPraveen Devarao2010-06-21 13:00
                                                                  RE: Connecting to InformixMartin Little2010-06-21 16:21
                                                                        RE: Connecting to InformixPraveen Devarao2010-07-16 07:13

Post a followup to this message