Solved

microsoft.data.connectionui

Posted on 2008-10-16
15
1,053 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

636 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