samira wrote:

> I hope  I post at the right place.
> 
> Hi : I am using SAPDB 7.3.0.29 with win2k pro as a server. 
> Frontend running
> delphi 6.xx on XP.
> I am using ADOdataset with dbgrid.
> Table: create table test( cno smallint key default serial,
> cdetail varchar(24))
> connection is fine, data can be inserted or added.
> However , if I want to edit key field( cno) with different 
> number without
> violating the property, ie,  not a duplicate value  , it gives me the
> following error message :
> [SAP AG][SQLOD32 DLL][SAP DB]Syntax error or access 
> violation;-5001 pos(21)
> Missing privilege:CNO.
> In my connection to SAPDB , I used DBA ( who is the owner of 
> the db and also
> a user).
> Any suggestion ?
> Thanks for the help.
>
> More info :
> I am doing the same thing on the SQLStudio and it also gives me the same
> error message.
> Since I am new to DBMS and SAP DB, I wonder, once the value has been set for
> the field with 'key' , it can not be changed. Am I correct ?
> Thanks again for any help.

You are right:

SERIAL columns can only be assigned a value when a row is inserted. The values of a 
SERIAL column cannot be changed with an UPDATE statement. A SERIAL column, therefore, 
can be used to determine the insertion sequence and identify a row in a table 
uniquely. 
written in 
http://www.sapdb.org/htmhelp/57/3cd234a54d11d2a97100a0c9449261/frameset.htm

Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to