
Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>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!
On Oct 9, 2:05 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.com> wrote:
> Soulless,
>
[quoted text clipped - 12 lines]
>
> - 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!
Nicholas Paldino [.NET/C# MVP] - 09 Oct 2007 20:30 GMT
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.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> On Oct 9, 2:05 pm, "Nicholas Paldino [.NET/C# MVP]"
> <m...@spam.guard.caspershouse.com> wrote:
[quoted text clipped - 28 lines]
>
> Thanks!