Data Source and Combo Box

  • Thread starter Thread starter Soulless
  • Start date Start date
S

Soulless

I would like to bind a combo box to my DSNs in windows. Any idea how
i might accomplish this? I wouldl like to have the drop down display
the available sources. I am searching but cannot find anything online
or in my C# books and am new to C#.

Thanks in advance!
 
Soulless,

Is this at design time, or at run time?
 
Soulless,

Is this at design time, or at run time?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




I would like to bind a combo box to my DSNs in windows. Any idea how
i might accomplish this? I wouldl like to have the drop down display
the available sources. I am searching but cannot find anything online
or in my C# books and am new to C#.
Thanks in advance!- Hide quoted text -

- Show quoted text -

Hi, I may be going about this the wrong way...

I'm wanting to have a combo box display available DSN sources. This
way I could import from excel or sql server. I thought of some how
binding that cbo to the dsn in ODBC at design time, but i do not know
if that is really the best way.

I am thinking now, maybe i need a dataset and just have the sources in
XML for the dataset and then populate the cbo from that.

I think I need to analyze the needs a little more first.

Thanks!
 
For a moment, I thought that you were talking about data sources that
are available to the design surface, not ODBC data sources.

For the DSN names, I believe you will have to call the SQLDataSources
function through the P/Invoke layer. It will require a number of calls to
other functions in the ODBC APIs to set the environment up as well.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Soulless said:
Soulless,

Is this at design time, or at run time?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




I would like to bind a combo box to my DSNs in windows. Any idea how
i might accomplish this? I wouldl like to have the drop down display
the available sources. I am searching but cannot find anything online
or in my C# books and am new to C#.
Thanks in advance!- Hide quoted text -

- Show quoted text -

Hi, I may be going about this the wrong way...

I'm wanting to have a combo box display available DSN sources. This
way I could import from excel or sql server. I thought of some how
binding that cbo to the dsn in ODBC at design time, but i do not know
if that is really the best way.

I am thinking now, maybe i need a dataset and just have the sources in
XML for the dataset and then populate the cbo from that.

I think I need to analyze the needs a little more first.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top