cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with ActiveRecord's SQL

Former Member
0 Kudos
1,387

I'm connecting to an ASA 9 DB on Windows from a Rails app on a Mac. I can connect fine and execute SQL queries. The problem is that most of the tables are owned by a different user than my app is using, so I need ActiveRecord to generate its queries using fully qualified table names (ie. "select "table".* from "owner.table"). Is this possible with ActiveRecord 3.0.5?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

Assuming that the error you are seeing is "Table 'xxx' not found", you can define the owner of the table as a group and grant membership to that group to the users that will need access to the table. By doing this, you can avoid the need to qualify the table with its owner in statements that reference the table. See: http://dcx.sybase.com/index.html#1201/en/dbadmin/udns.html

I have no experience with ActiveRecord.

Former Member
0 Kudos

Thanks! That does help. However, I can't really modify the DB in that way. This does make it clear that it is an ActiveRecord issue rather than an ASA issue. Cheers!