Second OracleDataSource

Second OracleDataSource

Postby JoeRuspante » Wed 22 Sep 2010 00:06

Hi.
I'm trying to use a master-detail relationship in an ASP.NET page (runtime 4.0). For do that I'd like to follow this steps:

1) Add an OracleDataSource to the page (drag & drop)
2) Configure it to connect to my database and store the connection string in the web.config file (so I can reuse it in other pages).
3) Configure the data source (table to read). For do that I use the "Configure data source" button that appear in the "Design" view of VS2010
3) Add a DataGrid to the page and bind it to the OracleDataSource (first point)

Now I need to add another OracleDataSource... So:
1) Drag & Drop another OracleDataSource (ok)
2) Configure it to use the same connection string of the other OracleDataSource (ok)
3) Try to configure the data source... When I push on the ""Configure data source" of the second OracleDataSource, I have this error: "Error invoking Configure Data Source. Detail:Exception has been thrown by the target of an invocation"

I have:

-) Windows XP with all "update"
-) Visual Studio 2010 Professional
-) DotConnect 5.70.152
-) Oracle XE (I'm using the default db for user HR just for do some test)

What is my problem?

PS: As I told, I'm using XE with default db, so if you need my solution for see it, I can send it to someone without any problem.
JoeRuspante
 
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Postby JoeRuspante » Wed 22 Sep 2010 00:22

I found the problem...

In the "editor" I wrote "MyConnection" for store the connection string in my web.config file...
But in that file, the name is "MyProject.MyPage.MyConnection" and not only "MyConnection".

In the source the "ConnectionString" property of OracleDataConnection is "MyConnection" (as I choose in the editor).

So, changing the web.config file renaming the value in "MyConnection" everything works fine (I think you have to fix this problem).

But now, how can I add a "select" parameter to a selected item of a control of the page? I saw I can set a parameter in input mode, but how can I bind it to the selected value of a control in the same page for make a master-detail?
Thank you in advance.
JoeRuspante
 
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Postby Shalex » Fri 24 Sep 2010 17:29

1. Have you added your connection string to web.config manually and got it as it is described in this article? Or you were using other approach?
2. The OracleDataSource control supports only base class (System.Web.UI.WebControls.Parameter) in design time at the moment. You can set parameters that are derived from the Parameter class in the Source mode (not Design) of the page, but when you open designer, these derived parameters will be broken. We are investigating the possibility of the derived parameters support in OracleDataSource.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle