Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby binding for odbtp library
C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
rodbtp.c

README

Rodbtp is a ruby binding for the odbtp library
(http://odbtp.sourceforge.net)

To use you need to install first odbtp and
in the same directory compile rodbtp.c file,
futures release will have a correct extconf.rb,

To compile:

gcc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I.  -fPIC -Wall -g -fno-strict-aliasing -O2  -fPIC  -c rodbtp.c
gcc -shared -rdynamic -Wl,-export-dynamic   -L"/usr/lib" -o rodbtp.so rodbtp.o odbtp.o sockutil.o  -lruby1.8  -lpthread -ldl -lcrypt -lm   -lc


Example:

require 'rodbtp'

rodb = Rodbtp.new
rodb.connect(hostname, tcp_port, odbc_string_connection)

qry = rodb.query("Select * from Customers")

qry.each do |row|
	puts row.inspect
end

for row in qry.result
	puts row.inspect
end

puts qry.fields
puts qry.ntuples
puts qry.num_fields

rodb.disconnect
Something went wrong with that request. Please try again.