I am using C++ Builder XE7 and Advantage Local Server 11 (latest release).

I am having trouble adding free table to a dictionary at run time.

The error I receive is 5054, command cannot be completed with the current permissions. It's local server, there is only one user. How do I set the permissions for the user?

// this code fails
Dictionary->IsConnected = true;
TableSQL->Active = false;
Dictionary->AddTable("SQL", "C:\Temp\SQL.adt", "", "SQL Queries", ttAdsADT, ANSI);  // I have double slashes, this forum is removing the 2nd slash
Thanks!

asked 29 Jun '15, 12:41

Davi%20in%20Wisconsin's gravatar image

Davi in Wisc...
868812
accept rate: 0%

edited 29 Jun '15, 12:50


On your "Dictionary" component, what did you set the username to? Has it been set to the ADSSYS user (and the password) or is it blank? If blank the user is connecting as "anonymous". By default on a Dictionary an anonymous user has access to read all tables, but still lacks DDL (Meta Data changes i.e. create table, etc).

If you want to use a different username, first create the user in the dictionary and give them permissions to create a table. I find the wizard easier to use (via ARC), but for SQL you can use the following:

execute procedure sp_createuser( 'username', 'password', 'comment');
grant create table to username;

BTW, if you want to enforce security, open the dictionary in ARC (login as adssys) right click and choose properties and review the security tab. Select Logins required and Check User Rights.

link

answered 29 Jun '15, 16:48

Edgar%20Sherman's gravatar image

Edgar Sherman
5.4k13185
accept rate: 25%

Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
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

Tags:

×55

Asked: 29 Jun '15, 12:41

Seen: 1,573 times

Last updated: 29 Jun '15, 16:48

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.