Solved

microsoft.data.connectionui

Posted on 2008-10-16
15
1,029 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
 

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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now