Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in August and this forum will be retired.

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?

asked 25 Apr '11, 02:42

Anth's gravatar image

accept rate: 100%

edited 25 Apr '11, 14:13

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:

I have no experience with ActiveRecord.

permanent link

answered 25 Apr '11, 12:39

Bruce%20Hay's gravatar image

Bruce Hay
accept rate: 48%

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!

(25 Apr '11, 14:10) Anth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Apr '11, 02:42

question was seen: 1,227 times

last updated: 25 Apr '11, 14:13