Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

microsoft.data.connectionui

Posted on 2008-10-16
15
Medium Priority
?
1,070 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

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 1500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

824 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