on 11-08-2006 1:15 PM
Hi,
We are developping a persistent aplication. We have got a PersistableEntity that we have stored in persistence without problems. But now, we need store too an attribute (AttributeDescriptor) in this entity. We have tried and only get an exception of persistence. The code of this exception is -206 column-name IS NOT A COLUMN OF AN INSERTED TABLE, UPDATED TABLE, OR ANY TABLE IDENTIFIED IN A FROM CLAUSE, OR IS NOT A COLUMN OF THE TRIGGERING TABLE OF A TRIGGER.
Our code is:
In PersistenceMaster class, the attribute creation:
AttributeDescriptor[] aList=new AttributeDescriptor[]{
descriptionRuntime.createAttributeDescriptor("description",AttributeType.String,1,20)
};
To update:
persistenceManager.update(obj,TreeOptionType.COMPLETE);
And now is when throws the exception.
We have debugged, and obj (PersistableEntity) isn´t null and the attribute have got the value(getAttribute(0)) we have introduced.
Thanks,
Best regads,
SCZ
hello satur,
from the logs, it seems that you are trying to insert an
obj having a column called "206" to a table that doesn't
have that column defined.
from your code:
>AttributeDescriptor[] aList=new AttributeDescriptor[]{
>descriptionRuntime.createAttributeDescriptor
>("description",AttributeType.String,1,20)
>};
it seems that you are only declaring a table of one field
named "description". try checking your attrDescriptors or
the object which you are trying to insert.
regards
jo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The code 206 means that we are trying to insert information in a field whose name is wrong. I think this name is the first parameter ("description") of the instruction
AttributeDescriptor[] aList=new AttributeDescriptor[]{
descriptionRuntime.createAttributeDescriptor
("description",AttributeType.String,1,20)
};
I suppose persitence API will create a table with a field whose name is "description" in our example. I don´t refer anywhere this name column. I only call the setter method to asign a value to this attribute (position 0). In the logs I can see that this assignation was ok, so that, i have got an object with the parameter.
Our mobile client has got sp11, can it be the problem?
Thanks,
Best regards,
SCZ
Hello,
We can solve it! The api creates the table the first time you execute the update/insert. The first time, we executed without parameters, so that, when we added the list of attributes with our field ("description"), the api didn´t find this field, because didn´t exist. The solution is reinstall the client!
Thanks,
Best regards,
SCZ
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.