Autoincremental fields problem
Autoincremental fields problem
I'm testing dotConnect 6.30 for Oracle with VS2010 and Oracle XE 10g (at the moment) on a Silverlight project.
First of all I have found a big problem with the autoincremental field.
I have generated the Entity Data Model with MS wizard and using dotConnect provider.
The Identity fields are not configured so my app, that works perfectly with (MsSQLServer), fails.
I'have changed manualy the property field StoreGeneratedPattern to Identity and ricompiled everything but doesn't change!
Does you provider works with auto incremental field (implemented with SEQUENCE and TRIGGER in Oracle)?
If yes as I wrote on infos what is the best way to use it?
thank you very much
First of all I have found a big problem with the autoincremental field.
I have generated the Entity Data Model with MS wizard and using dotConnect provider.
The Identity fields are not configured so my app, that works perfectly with (MsSQLServer), fails.
I'have changed manualy the property field StoreGeneratedPattern to Identity and ricompiled everything but doesn't change!
Does you provider works with auto incremental field (implemented with SEQUENCE and TRIGGER in Oracle)?
If yes as I wrote on infos what is the best way to use it?
thank you very much
Please open your model with XML Editor and make sure that the StoreGeneratedPattern attribute is set to Identity in the SSDL part of the model for the Entity Key property: http://www.devart.com/forums/viewtopic.php?t=18620.
We recommend you using Entity Developer. It allows editing storage part in designer.
We recommend you using Entity Developer. It allows editing storage part in designer.
Entity Developer and Auto-increment
thank you for answer,
I saw thar the field property was set to Identity but into the xml it was not.
I will try again to change and recompile.
in order to evaluate your product I have some more questions:
1.May I use Entity Developer to create the EDM, instead the MsWizard?
this is because my database still exist! so the model have to reflect it, ... why entity field are not default detected?
2. My "Entity Developer" seems disabled, I thought because the "Database Explorer" was empty. But I can not add new database or new connection! Update menu voices are disabled. Any reasons for that?
I saw thar the field property was set to Identity but into the xml it was not.
I will try again to change and recompile.
in order to evaluate your product I have some more questions:
1.May I use Entity Developer to create the EDM, instead the MsWizard?
this is because my database still exist! so the model have to reflect it, ... why entity field are not default detected?
2. My "Entity Developer" seems disabled, I thought because the "Database Explorer" was empty. But I can not add new database or new connection! Update menu voices are disabled. Any reasons for that?
Autoincr fail
I have made the change you told me:
but when I execute this command from the client page, the "Add method" has threw the exception that the ID still exist and fail
SESSION s = new SESSION();
ctx.SESSIONs.Add(s);
Mechanism "trigger+sequence" works because I tested it with sqldeveloper IDE
thank you
but when I execute this command from the client page, the "Add method" has threw the exception that the ID still exist and fail
SESSION s = new SESSION();
ctx.SESSIONs.Add(s);
Mechanism "trigger+sequence" works because I tested it with sqldeveloper IDE
thank you
1.
Microsoft Entity Data Model Wizard is not adjusted for Oracle: http://www.devart.com/dotconnect/oracle ... izard.html .
Running Entity Developer: right click on your project > Add > New Item > the Data tab, the Devart Entity Model item.
2.
3.
b) we have sent you a test project with the DDL script where StoreGeneratedPattern="Identity" works as expected. If you didn't receive it, check your spam filter.
We recommend using Devart Entity Developer for creating and managing EF models because Entity Developer is faster and more flexible.Gianluca wrote:1.May I use Entity Developer to create the EDM, instead the MsWizard?
this is because my database still exist! so the model have to reflect it, ... why entity field are not default detected?
Microsoft Entity Data Model Wizard is not adjusted for Oracle: http://www.devart.com/dotconnect/oracle ... izard.html .
Running Entity Developer: right click on your project > Add > New Item > the Data tab, the Devart Entity Model item.
2.
Please run Tools > Entity Developer > Database Explorer (it opens the "Database Explorer - Entity Developer" window) and drag and drop the database objects on your model design surface.Gianluca wrote:2. My "Entity Developer" seems disabled, I thought because the "Database Explorer" was empty. But I can not add new database or new connection! Update menu voices are disabled. Any reasons for that?
3.
a) please make sure that your table does not already contain the value that is generated by trigger for this particular insert.Gianluca wrote:but when I execute this command from the client page, the "Add method" has threw the exception that the ID still exist and fail
b) we have sent you a test project with the DDL script where StoreGeneratedPattern="Identity" works as expected. If you didn't receive it, check your spam filter.
Entity Developer
I would like to use the Entity Developer for Oracle in order to test it, but from your web site it is possible to download only ED Trial for SQLServer!
Entity Developer for Oracle is included to the Professional and Developer editions of dotConnect for Oracle. Please refer to http://www.devart.com/dotconnect/oracle/editions.html.
We have received your e-mail. We will send you our response as soon as possible.
We have received your e-mail. We will send you our response as soon as possible.
Works
I write in order to update my results.
Every things seem works properly. My problem was due to the ID=0: I mean, when a new record is added to the recordset the assigned id is 0, but in my table there was still a zero id record and so there was an exception.
Thank you for your help.
Every things seem works properly. My problem was due to the ID=0: I mean, when a new record is added to the recordset the assigned id is 0, but in my table there was still a zero id record and so there was an exception.
Thank you for your help.