 |
Forums |
Admin Start New Thread
By: Roman Rozinov
RE: FreeTDS + Ruby DBI + MS Sql [ reply ] 2009-03-03 06:44
|
Ok, I am still struggling guys.
So, i had to rebuild my CentOs box.
i have rails 2.2.2 with 2.1.0 frozen in the app. I have brought down dbi 0.4.1 and dbd-odbc0.2.4 and now I get this error:
DBI::InterfaceError (Unable to load driver 'ODBC' (underlying error: uninitialized constant DBI::DBD::ODBC)
I would appreciate any leads.
|
By: Erik Hollensbe
RE: FreeTDS + Ruby DBI + MS Sql [ reply ] 2009-02-17 00:28
|
Sorry I haven't gotten back to you yet.
In this case, the only thing I can suggest to you is to inspect the hash that is returned as it may be provided under a different key; we only can provide the information provided to us, and at this point it is very dependent on the underlying driver.
-Erik
|
By: Roman Rozinov
RE: FreeTDS + Ruby DBI + MS Sql [ reply ] 2009-02-11 07:01
|
What are your errors with regard to metadata failures?
I am having a problem where ActiveRecord sql_adapter is having a problem running a query to inspect columns of a sql_server odbc datasourced table.
|
By: Rakesh Ramakrishnan
FreeTDS + Ruby DBI + MS Sql [ reply ] 2008-03-10 15:11
|
hi all,
I am using Ruby DBI + FreeTDS + MS Sql Server 2005 for my development. I was successful in making a connection to the database and execute different database operations. But I have problems in retrieving the metadata about columns in a table. I am trying to retrieve the primary keys of a table but I am not able to do so. I have pasted the sample code below which fails
DBI.connect('dbi:ODBC:tosqlserver', 'xyz', 'abcde') do | dbh |
sth = dbh.execute('select * from DataPreprocess')
rows = sth.fetch_all
puts sth.methods
sth.column_info.each_with_index do |info,i|
printf "primary: %s\n",info["primary"]
end
sth.finish
end
Could u please suggest a solution or an alternate way to retrieve the primary keys of the table ?
|
|
 |