Oradirect with WPF

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
matthieu de graaf
Posts: 18
Joined: Wed 14 May 2008 12:13

Oradirect with WPF

Post by matthieu de graaf » Mon 01 Sep 2008 19:49


I'm working with Oradirect with MS Visual Studio 2008.

I'm trying to creat a simple WPF form bounded to Oracle data via Oradirect

My approach is the following

1) Create a strongly typed dataset with a datatable (OraDirect style, option "use provider specific code generator is checked" is used in dataset wizard.

2) Load the data in the datatable in the Window_Loaded event
myDataset.MY_TABLE.Active = true

3) Set the datacontext of my stackpanel containing the text input items to myDataset.myDataTable


4) What property of the myDataTable do I use for the binding?
I tried binding to the myColumncolumn property of the myDataset.MY_TABLE but this doesn't work

Can you show me where I went wrong?

A little example of Oradirect with WPF would be appreciated. All the samples provided now are windows forms examples.


Matthieu de Graaf

matthieu de graaf
Posts: 18
Joined: Wed 14 May 2008 12:13

Issue solved

Post by matthieu de graaf » Thu 04 Sep 2008 06:59

Hi Everybody,

Solved the issue myself.

First of all in step 3 you can only set the datacontext in XAML if you've defined your dataset as a resource (e.g. in the window.resources section)
Unfortunately, the datatable is a inner class of the dataset. I haven't found a way to define a resource referring to an inner class. That's why I've set the datacontext in C# in the loaded event of the Window e.g. this.dataContext = myDataset.MY_TABLE;

In step 4 you refer to the properties of the datatable which have the same name as the columns in your database table.


Post Reply