Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

Data Source and Combo Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Soulless - 09 Oct 2007 19:54 GMT
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!
Nicholas Paldino [.NET/C# MVP] - 09 Oct 2007 20:05 GMT
Soulless,

   Is this at design time, or at run time?

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!
Soulless - 09 Oct 2007 20:10 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.