ODBC

From Reia

Jump to: navigation, search

To use the ODBC adapter, you must have the proper ODBC libraries and a DSN set up. Example usage:

>> load("lib/odbc.re")
=> 
>> mysql = ODBC.start("DSN=mysqldb;UID=root")
=> #<Object>
>> result = mysql.query("SELECT * FROM fruit")              
=> #<Object>
>> result.hashes()
=> [{"color":"red","type":"apple"},{"color":"green","type":"pear"},{"color":"yellow","type":"banana"}]
Personal tools