0
votes

Hey guys i am wondering how is it possible to either sync pervasive sql to another database or directly connect it to ruby on rails?

My accounting system uses pervasive sql and at the moment i am trying to use an ODBC connection from the database to my ruby application.

I am currently working with this website:

http://odbc-rails.rubyforge.org/

Has anyone made this happen before because so far i am getting really confused with how to do the connection and get data from the remote database.

1

1 Answers

0
votes

I realize this is a bit late, but on windows based systems you can use OLE DB to connect to pervasive by doing something like this:

    require 'win32ole'
    conn = WIN32OLE.new('ADODB.Connection')
    conn.Open = ('Provider=PervasiveOLEDB;Data Source=DEMODATA;')

    recordset = ('Select * from some_table',conn)
    data = recordset.GetRows.transpose
    recordset.Close

There is no adapter for ole db and active record though. It might work by just setting the adapter to odbc, but i'm not positive.

If you can setup and odbc dsn you can also connect to pervasive the way described here.

If you can use JRuby, you have access to JDBC connections as described here.