Hi,
In a simple MSSQL table designed and generated using Entity Developer v5.7.451 with two fields :
CREATE TABLE dbo.Inventory (
InventoryId INT NOT NULL IDENTITY,
InventoryDescription NVARCHAR(120),
CONSTRAINT PK_Inventory PRIMARY KEY (InventoryId)
)
I insert some records and work ok in Management Studio.
Then, in Delphi XE7, using the following EntityConnection, EntityTable, and EntityDataSource components:
object mainConnection: TEntityConnection
LoginPrompt = False
ConnectionString =
'Data Provider=SDAC;SQL Dialect=SQL Server;Login Prompt=False;Ser' +
'ver=DEVELOP\SQLEXPRESS;Database=DataInventory;Integrated Se' +
'curity=True'
ProviderName = 'SDAC'
DialectName = 'SQL Server'
DefaultModelName = 'DataInventoryModel'
end
(of course, I'd included EntityXMLModel, SDACDataProvider and EntityContext and configured them)
object dsInventory: TEntityDataSource
AutoEdit = False
DataSet = entityInventory
Left = 144
Top = 272
end
object entityInventory: TEntityTable
FieldExpressions = <>
Context = EntityContext1
TypeName = 'Inventory'
object entityInventoryInventoryId: TIntegerField
AutoGenerateValue = arAutoInc
FieldName = 'InventoryId'
end
object entityInventoryDescription: TStringField
FieldName = 'InventoryDescription'
Size = 120
end
end
Then I bind those fields to a simple TListView (with Text to InventoryDescription, and Detail to InventoryId)
And a TEdit binded to InventoryDescription and a TBindNavigator binded to the TDataSource
Looks great! It shows all records previously added on Management Studio with both fields very well.
The problem is when I insert a new record, it goes to the Database and data is saved correctly.
But, it seem do not refresh the InventoryId field with new value. Then it shows 0 in Detail.
When I try to create a new one, there is an error:
Inserting error: "List does not allow duplicates ($0%x)"
And when I update same new field, then, new changes don't go to Database.
I think: Of course!, inside entityTable there is no InventoryId updated with new value.
Can you help me? What am I missing?
Thanks
Abner
Delphy XE7 - EntityTable append record when field is AutoInc, missing refresh field value
Re: Delphy XE7 - EntityTable append record when field is AutoInc, missing refresh field value
Hi
here is a project test to show the error(s)
Please let me know what am I doing wrong.
Thanks.
https://drive.google.com/file/d/0Bx_vp7 ... sp=sharing
here is a project test to show the error(s)
Please let me know what am I doing wrong.
Thanks.
https://drive.google.com/file/d/0Bx_vp7 ... sp=sharing
Re: Delphy XE7 - EntityTable append record when field is AutoInc, missing refresh field value
Hello,
Thank you for the information, we have already fixed this problem, the fix will be included to the next version.
Thank you for the information, we have already fixed this problem, the fix will be included to the next version.
Re: Delphy XE7 - EntityTable append record when field is AutoInc, missing refresh field value
Thank you AlexP
I really appreciate your time to check it out.
Please, can you tell me how much time it will takes? I mean, when you deploy a new version?
Thank you again.
Abner
I really appreciate your time to check it out.
Please, can you tell me how much time it will takes? I mean, when you deploy a new version?
Thank you again.
Abner
Re: Delphy XE7 - EntityTable append record when field is AutoInc, missing refresh field value
We plan to release the build including this fix next week.
Re: Delphy XE7 - EntityTable append record when field is AutoInc, missing refresh field value
Hi AlexP,
still waiting...
Abner
still waiting...
Abner
Re: Delphy XE7 - EntityTable append record when field is AutoInc, missing refresh field value
We have already fixed this issue. The new version with this fix is already available for download at our website.