Errors when creating an Oracle data source for LightSwitch

Postby Konamiman » Thu 03 Nov 2011 08:04

goethals.f wrote:But when I just try to run the project itself, I get an error related to a SQLEXpress not found. Does the lightSwitch still needs some sql server ?

The LightSwitch engine needs an instance of SQL Server in order to debug the application from within Visual Studio. This is, if you hit F5 and create some sample data, it will be created in the specified instance of SQL Server.

The instance name is "SQLExpress" by default. To change it, open the .lsproj file and search for the element.
Konamiman
 
Posts: 8
Joined: Tue 29 Mar 2011 16:13
Location: Mallorca, Spain

Postby goethals.f » Fri 04 Nov 2011 09:44

Shalex wrote:We will investigate the possibility of creating Lightswitch sample.


Hi again,

It would be really great if some basic example is available.
I have done some more tests, but have some questions.


Currently, I created an before-insert trigger on my oracle DB-table, which fetches a new ID-value from the sequence.

When i now use the standard lightswitch "create new" screen, and pus the save button, my record is indeed created in DB and has the sequence value as ID.

But, now the problem :

After creating the record in LS --> de details windows is shown, but this is empty in my case.
Further investigation, shows that Lightswitch never "knows" the value of that ID --> so it can nog get the details back from DB to show them.

This can be verified in the ...._Inserted(... entity) method, which is executed after the entity is created in DB. There I see that my ID value is still 0 (and does nos have the value from the sequence fetched in the trigger)

Is there any workaround or way, to overcome this problem ? so that in some way I know what the value of my ID is when record is created.
As far i know, there is also no (easy) way to fetch first manually the sequence value, because executing simple SQL-statements is not possible....


thx
Fred
goethals.f
 
Posts: 60
Joined: Mon 18 May 2009 13:17

Postby Shalex » Fri 04 Nov 2011 15:37

goethals.f wrote:Is there any workaround or way, to overcome this problem ? so that in some way I know what the value of my ID is when record is created.

Set the StoreGeneratedPattern attribute to "Identity" for the primary key column in the Store part of the model: http://www.devart.com/forums/viewtopic.php?t=18620.
Shalex
Devart Team
 
Posts: 7475
Joined: Thu 14 Aug 2008 12:44

Postby goethals.f » Mon 14 Nov 2011 15:15

Hello Again,


Last days I have done some further testings.

- The tip of Set StoreGeneratedPattern attribute to "Identity" solved indeed my sequence-id problem.
But I still need an insert trigger (it's ok for this project)
And each datasource-refresh --> I have to this trick manually again (this 'bug' also mentioned in the info-link)

- When deploying my SL-app hosted on a Win2003 IIS webserver --> I got error's concerning the devart-dll's. Possible due to reference not copied and no correct licensing

Concerning the deployment --> what are the correct steps to be able to deploy the LS-app on my win 2003 webserver on IIS ?

- Where do i have to add the devart-references (the client, server, generated code projects....)
- Which references (and set copy-local == true), core, entity, linq, ...
- what about the licence.lixc file
...


Do you have idea when a more detailed example (walkthrough) for a real-world example could be provided ?

thx
Fred
goethals.f
 
Posts: 60
Joined: Mon 18 May 2009 13:17

Postby Shalex » Fri 18 Nov 2011 16:02

goethals.f wrote:The tip of Set StoreGeneratedPattern attribute to "Identity" solved indeed my sequence-id problem.
But I still need an insert trigger (it's ok for this project)
And each datasource-refresh --> I have to this trick manually again (this 'bug' also mentioned in the info-link)

Could you please send us a small test project with the corresponding DDL/DML script and specify the exact steps we should follow to reproduce the issue in our environment?

goethals.f wrote:When deploying my SL-app hosted on a Win2003 IIS webserver --> I got error's concerning the devart-dll's. Possible due to reference not copied and no correct licensing

Tell us the exact texts of the errors.

goethals.f wrote:Concerning the deployment --> what are the correct steps to be able to deploy the LS-app on my win 2003 webserver on IIS ?

Please refer to http://msdn.microsoft.com/en-us/library/ff872288.aspx.

goethals.f wrote:- Where do i have to add the devart-references (the client, server, generated code projects....)
- Which references (and set copy-local == true), core, entity, linq, ...
- what about the licence.lixc file

Please add the license resource and references at server side: http://www.devart.com/dotconnect/oracle/docs/EF.html#project.
As an alternative, you can install dotConnect for Oracle with "Minimal" and "Entity Framework support" options in your deployment environment.
goethals.f wrote:Do you have idea when a more detailed example (walkthrough) for a real-world example could be provided ?

We cannot provide any timeframe at the moment.
Shalex
Devart Team
 
Posts: 7475
Joined: Thu 14 Aug 2008 12:44

Previous

Return to dotConnect for Oracle