473,320 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

dataConnection dialog in c#

Hi, everyone

I'm using the microsoft.connectionUI.dialog reference in a c# windows application.
Is there anyway to connect to the database using the data.connectionUI dialog. What I want to happen in my c# windows app, is the user selects sql server type from list, then the provides their authentication. When they provide their authentication is there a way to connect to that database they provide and list all the tables within that database and manipulate the tables if I need to in c#?

Also, is the dataconnection UI freeware? is it available for any programmer to use in their program? Are there any copyrights law that prevent programmers from using this in their code?

code:
DataConnectionDialog dcd = new DataConnectionDialog();

//allows you to add datasources, if you want to specify which will be supported
//dcd.DataSources.Add(DataSource.SqlDataSource);
//dcd.DataSources.Add(DataSource.SqlFileDataSource);

//Adds all the standard supported databases
DataSource.AddStandardDataSources(dcd);

DataConnectionDialog.Show(dcd);

MessageBox.Show("Connectionstring: "+dcd.ConnectionString + "\nSelected Data Source: " + dcd.SelectedDataSource.DisplayName + "\nSelected Data Provider: "+ dcd.SelectedDataProvider.DisplayName);

Any help will be appreciated
Jul 15 '07 #1
1 5454
sunboy
5
Thanks! It's good and help me very much
A programmer from China
Aug 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Prosonman | last post by:
Hi, What is the best way to transfer variables to and from a dialog box? My project consists of a form with a number of controls, lets say three Labels, when a label is clicked it opens a dialog...
23
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common...
1
by: Carmine | last post by:
I'm currently writing a small program that churns on a repetitive task while displaying a progress & cancel modeless dialog. I've been having problems due to threadlocking, and I was wondering if...
4
by: Alexander | last post by:
Hi, I have written a program that takes on some operations much more time than I expected. As I have seen users clicking wildly on the screen to make something happen, I want to follow the...
6
by: bryanhobson | last post by:
I'm fairly new to c#, and I am just trying to work out how a 'properties' dialog works. Currently in my code, I have an object represented by the class 'Dog'. The dog object has several...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
0
by: Moezzie | last post by:
So ive got a bit of a problem here. Ive been searching the net about this for quite some time now but i just cant seem to figure out how to open a dialog that ive made in QtDesigner. Of corse i...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.