Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June 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

Anth
16226
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: http://dcx.sybase.com/index.html#1201/en/dbadmin/udns.html

I have no experience with ActiveRecord.

permanent link

answered 25 Apr '11, 12:39

Bruce%20Hay's gravatar image

Bruce Hay
2.6k1510
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×108

question asked: 25 Apr '11, 02:42

question was seen: 1,163 times

last updated: 25 Apr '11, 14:13