Solved

microsoft.data.connectionui

Posted on 2008-10-16
15
1,042 Views
Last Modified: 2012-05-05
I am looking for examples on how this is implemented with Sybase, Oracle Rdb and other RDBMS databases?
0
Comment
Question by:TimPeer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
15 Comments
 
LVL 41

Expert Comment

by:graye
ID: 22758182
I'm confused by the question.... are you trying to use the built-in "Choose Data Source"  dialog box in your application?
If so, it goes like this:
1) Step 1:  add a reference to Microsoft.Data.ConnectionUI and Microsoft.Data.ConnectionUI.Dialog.  These DLLs do NOT show in the list of available References, you must browse for them at C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
2) Step 2: Use like this:

        Dim d As New Microsoft.Data.ConnectionUI.DataConnectionDialog
 
        Microsoft.Data.ConnectionUI.DataSource.AddStandardDataSources(d)
 
        If Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(d) = Windows.Forms.DialogResult.OK Then
            cmbProvider.Text = d.SelectedDataProvider.Name
            tbConnect.Text = d.ConnectionString
        End If

Open in new window

0
 

Author Comment

by:TimPeer
ID: 22760381
Thanks Grave,

I need to added additional data sources to the list, e.g. MySQL.Data, Oracle.DataAccess.OracleRdb, Oracle.DataAccess.OracleClient and others. Is this possible with the existing implementation or do must i roll-my own?
0
 
LVL 41

Expert Comment

by:graye
ID: 22762682
No, the built-in dialog box will automatically show every .Net provider that's installed on your system.    So, if the "native" oracle .Net providers are installed, they will show up in the list
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

Author Comment

by:TimPeer
ID: 22762878
I installed the ODP Oracle .Net drivers and the Rdb from installation kit. When I load the connection dialog, I don't see the drivers referenced. In which directory are these drivers normally installed? Could it be that simple?
0
 
LVL 41

Expert Comment

by:graye
ID: 22764148
No, I don't think the directory has anything to do with it.   For example, when I installed the older "Oracle Data Provider for .NET", I got another entry in the dialog box.   I didn't have to do anything... just install the Oracle parts, then presto... I got another entry.
So, I had assumed that the newer ODP.Net would also behave the same way.   I don't recall doing a reboot... but I guess you could try that.
0
 
LVL 41

Expert Comment

by:graye
ID: 22764158
Oh wait... are you running a 64-bit OS?
0
 

Author Comment

by:TimPeer
ID: 22764418
Nope 32 bit Windows XP.
0
 
LVL 41

Expert Comment

by:graye
ID: 22766165
So, what do you have in the list of providers?
0
 

Author Comment

by:TimPeer
ID: 22768996
Just the microsoft providers which is odd. There is a reference to an Oracle driver but the driver loads the Microsoft Variant system.data.oracle not oracle.dataaccess.client.

It seems creqting a new dialog is needed to handle the 4 other database sources mysql, sybase, oracle client, rdb. I hoped I could inject the driver's assy into the dataprovider class but it isn't clear how I would do this.

Thanks for your continued interest.
0
 
LVL 41

Expert Comment

by:graye
ID: 22778416
Hummm... I had assumed that the Oracle driver in the list was just a wrapper for ODP.Net.
Recall that each provider has to have a DDEX extension for it to appear in the list.   I had assumed that the "Oracle" driver in the list was this DDEX wrapper.
http://msdn.microsoft.com/en-us/library/ms379576.aspx 
0
 

Author Comment

by:TimPeer
ID: 22779716
I think that is in large part, the problem. Apparently, the Oracle.dataaccess.oracleclient and Oracle.dataaccess.oraclerdb assy do not support the DDEX extension. Microsoft ships Sytem.data.oracle (which I believe is the mapping you described). The connection dialog for the "Oracle" oracle client  is markedly different from the dialog raised by the microsoft variant.

Can a DDEX wrapper be created for these drivers?
I will issue the points to you but don't want to close the thread just yet.

Thanks!

Tim
0
 
LVL 41

Accepted Solution

by:
graye earned 500 total points
ID: 22780081
Yes, I would assume you could....    But don't you find it odd that nobody else has already done this?
0
 
LVL 41

Expert Comment

by:graye
ID: 22780125
Hummm... have  you tried the Oracle Developer Tools (ODT) for Visual Studio?    That *might* include the DDEX library... just guessing!
http://www.oracle.com/technology/tech/dotnet/tools/index.html 
0
 

Author Closing Comment

by:TimPeer
ID: 31507035
Indeed. My preference is to NOT reinvent the wheel on this one. If you know of other sources to implement the wrapper, please forward them my way.

Thanks again!!!!

peert[_at_]envysys.com
0
 

Expert Comment

by:corebiz
ID: 24443429
Check out

http://msmvps.com/blogs/carlosq/archive/2008/01/16/more-on-quot-howto-using-the-choose-data-source-dialog-of-visual-studio-2005-from-your-own-code-quot.aspx

Pretty good explanation plus links to more discussions.
Basically microsoft do not supprt the use of this component in your own application.
You may not be licensed to use it in your own app.
It does not seem to be able to support adding your own sources.
vrett
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question