Error in Insert (Save)


Author
Message
Angela Sampaio
Angela Sampaio
StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)
Group: Forum Members
Posts: 16, Visits: 61
Hi,



I have a BO of products that contains a field pro_nrow; this field is the Primary Key and the "Auto Incrementing" is enabled (Seed 1, Increment 1).



When I try save a product, appears a error message





Unable to enter an explicit value for the identity column of the table 'tabproduto' when IDENTITY_INSERT is set to OFF.



When I insert directly into a database gives certain.



I looked debug.html the file and noticed that he is going empty ('') for the pro_nrow.

Is attached the image of debug.html



Thank you.
Attachments
erro_produto. 12 14.jpg (128 views, 57.00 KB)
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Is the BO setup correctly? It should be setup (in the CRUD settings area) with PrimaryKeyIsAutoIncremented=True, PrimaryKeyIsUpdatable=False and the field that is the PK should be shown as the PK in the BO Mapper (which will set that field as the PK when you build the BO).
Angela Sampaio
Angela Sampaio
StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)
Group: Forum Members
Posts: 16, Visits: 61
Yes, the BO is setup correctly...

I don't know what more can be causing this problem...

Angela Sampaio
Angela Sampaio
StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)StrataFrame Beginner (40 reputation)
Group: Forum Members
Posts: 16, Visits: 61
Hi Greg,



I find the problem ...

In the "ProdutoBO.cs" file the properties were set correctly, but in the form of product the BO "sysProdutoBO1" the property PrimaryKeyIsAutoIncremented was as false.



Now is correctly.

Thanks!
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Glad you found it!
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Good to hear you found your problem.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search