Solved

microsoft.data.connectionui

Posted on 2008-10-16
15
1,035 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
  • 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

809 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