| 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 | |