Page 1 of 2
Publish Web site with gridview - datasource an Entity Model
Posted: Thu 28 May 2009 15:57
by SilviaTerzi
Hello, I'm new in DevArt and i'm tryng to publish a simply web site with e gridview that has as datasource an entytymodel that use a db Oracle on Windows Server 2008. I've done all I read in this forum, I've put in web.config:
And i've add all the dll in the bin folder, however, when i try to see the page that contain the gridview there is the error:
Schema specified is not valid. Errors:
Devart.Data.Oracle.Entity.StoreSchemaDefinition.ssdl(2,69) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken 'ORA' is different from 'Ora10gR2' that was encountered earlier.
But really, I've installed Oracle - OraClient10g_home1 in both of pc!!!
How can i do???
Please, helpme!!
Posted: Fri 29 May 2009 07:33
by AndreyR
We are unable to reproduce this error.
The similar one was reported here:
http://devart.com/forums/viewtopic.php?t=14222,
but it was resolved simply by recreating the model.
Try to delete the model from your project and re-add it. This should help.
Posted: Fri 29 May 2009 07:41
by SilviaTerzi
I've already try to do it a lot of times, but it doesn't work. I do not know what to do!! Where can i attach you my program to show you?
Posted: Fri 29 May 2009 08:27
by AndreyR
Please send the test project to support * devart * com, subject "EF ProviderManifestToken error", I'll look into it.
Posted: Fri 29 May 2009 08:40
by SilviaTerzi
Ok, i've send it.
Thanks a lot.
Silvia Terzi
Posted: Wed 03 Jun 2009 07:54
by SilviaTerzi
Sorry for the hurry, but I am a bit 'stuck' because I'm considering whether or not to buy devart and I would like to decide it before the trial expiry. Have you find a solution to the problem? Thanks, Silvia
Posted: Mon 08 Jun 2009 08:35
by SilviaTerzi
Hello, i've solved my problem installing devart on server. It's not exactly what I wanted but it is the same.
Now I have another problem, I've created an ado .net entity model (called model.edmx) in my site web and I have to change the connection string dinamically. How can i do?? Is it possible usiing devart? Thanks, Silvia
Posted: Tue 09 Jun 2009 09:06
by Shalex
1. The 0169 error occurs rarely. It is fixed now and will be included in the next build. As a workaround, please change the ProviderManifestToken attribute of the Schema tag from "Ora10gR2" to "ORA".
2. If you want to change the connection string dynamically, it is necessary to remove the Schema attributes and the DefiningQuery tags from the SSDL part of the EDMX file. This allows you to create the instance of the ObjectContext class by passing the connection string you want as a parameter of a constructor.
Posted: Tue 09 Jun 2009 11:08
by SilviaTerzi
Sorry, is there an example of using devart entity model with dynamic connection string?
Posted: Wed 10 Jun 2009 16:05
by Shalex
Please specify the problem you have encountered and the error message.
Posted: Thu 11 Jun 2009 08:23
by SilviaTerzi
I've created an ado .net entity model (called model.edmx) in my site web and I have to change the connection string of that dinamically. After that I have a gridview that has, like datasource, an entitydatasource linked to model. When the connection string of the model change i want that data in gridview change automatically, becose it's linked to an entitydatasource that is linked with model.edmx. How can i do?? The web site is a visual basic web site.
I try this way:
Dim connectionString = "metadata=res://*;provider=Devart.Data.Oracle;provider connection string=""User Id=***;Password=***;Server=***;Sid=***;Persist Security Info=True"""
Dim ctxt As New TestEntities(connectionString)
Me.GridView1.DataBind()
But it doesn't work!!!
Thanks,
Silvia
Posted: Thu 11 Jun 2009 08:45
by SilviaTerzi
Now i've try to put, in the page_load:
Dim connectionString = "metadata=res://*;provider=Devart.Data.Oracle;provider connection string=""User Id=***;Password=***;Home=OraClient10g_home1;Direct=True;Sid=***;Port=****;Persist Security Info=True"""
Using conn As New Entities(connectionString)
Me.GridView1.DataBind()
End Using
But it says:
Schema specificato non valido. Errori: TestEDM.App_Code.Model.ssdl(2,76) : errore 0169: Tutti gli elementi SSDL devono utilizzare lo stesso provider. ProviderManifestToken 'Ora10gR2' diverso da 'ORA', rilevato in precedenza.
WHY??? Please, help me!!!
Silvia
Posted: Thu 11 Jun 2009 10:37
by Shalex
You didn't assign a value to the GridView1.DataSource property. For example:
Code: Select all
Dim ctxt As New TestEntities(connectionString)
Me.GridView1.DataSource = from k in ctxt.Objects
select k
Me.GridView1.DataBind()
As for the 0169 error, please look forward to the next build of dotConnect for Oracle if our workaround mentioned above doesn't help.
Posted: Thu 11 Jun 2009 10:56
by SilviaTerzi
The data source of gridview is the entitydatasource linked with EntityDataModel!
Posted: Mon 15 Jun 2009 12:51
by AndreyR
Please make sure that you have called the DataBind() method of the EntityDataSource in your code
after the connection string is changed as well as the DataBind() method of the GridView.