Publish Web site with gridview - datasource an Entity Model

Publish Web site with gridview - datasource an Entity Model

Postby SilviaTerzi » Thu 28 May 2009 15:57

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!!
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby AndreyR » Fri 29 May 2009 07:33

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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby SilviaTerzi » Fri 29 May 2009 07:41

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?
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby AndreyR » Fri 29 May 2009 08:27

Please send the test project to support * devart * com, subject "EF ProviderManifestToken error", I'll look into it.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby SilviaTerzi » Fri 29 May 2009 08:40

Ok, i've send it.
Thanks a lot.
Silvia Terzi
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby SilviaTerzi » Wed 03 Jun 2009 07:54

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
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby SilviaTerzi » Mon 08 Jun 2009 08:35

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
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby Shalex » Tue 09 Jun 2009 09:06

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.
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby SilviaTerzi » Tue 09 Jun 2009 11:08

Sorry, is there an example of using devart entity model with dynamic connection string?
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby Shalex » Wed 10 Jun 2009 16:05

Please specify the problem you have encountered and the error message.
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby SilviaTerzi » Thu 11 Jun 2009 08:23

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
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby SilviaTerzi » Thu 11 Jun 2009 08:45

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
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby Shalex » Thu 11 Jun 2009 10:37

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.
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby SilviaTerzi » Thu 11 Jun 2009 10:56

The data source of gridview is the entitydatasource linked with EntityDataModel!
SilviaTerzi
 
Posts: 13
Joined: Thu 28 May 2009 15:43

Postby AndreyR » Mon 15 Jun 2009 12:51

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.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Next

Return to dotConnect for Oracle