I'm having a problem on my customer pc (and not on my own) when I run this embedded sql script in a Powerbuilder application on a ASA8 database. I use embedded scripts to modify database tables and add users:
ALTER TABLE LOADCON ADD LOADSALES_RATE NUMERIC(12,2);
It produces the following error:
SQLDBCODE: -121 - SQLSTATE = 42000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error or access violation: Permission denied: you do not have permission to...
I have separate embedded code to add users and grand permissions - and these don't produce any errors:
sp_addlogin user_name, password
GRANT CONNECT TO user_name IDENTIFIED BY password
GRANT GROUP to DBA
GRANT MEMBERSHIP in group DBA to user_name
But when I run this:
GRANT SELECT, INSERT, UPDATE, DELETE ON table_name TO user_name
it kicks up a similar error to the above:
SQLDBCODE: -121 - SQLSTATE = 42000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Syntax error or access violation: Permission denied: you do not have permission to grant permissions on 'table_name'
When I execute this embedded script on my machine (windows7) logged on from a PB app to ASA8 using dba/sql it works with no fail errors (except user_names already exists) but running the same on a customer machine (windows8) the above fails with SQLCODE = -1
, SQLCA.SQLERRTEXT
messages as shown.
Any advise please.
Thanks Alex