Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 7th, 2004, 06:05 PM
Authorized User
 
Join Date: Aug 2004
Location: dollard des ormeaux, Quebec, Canada.
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to macupryk Send a message via Yahoo to macupryk
Default Bind records from the table to a datalist control

I tried egghead.
Not much help.
I am trying to bind the records from the table to a datalist control in C#
private DataSet BindTBCOMMANDTYPE()
{
   OdbcConnection myConnection = new OdbcConnection("DSN=POS;UID=system;PWD=system");

    // Populate the ddlDataSet1
   myConnection.Open();
   const string strSQLDDL = @"SELECT DT_REF, DT_DESCRIPTION FROM TBCOMMANDTYPE ORDER BY DT_REF";
   OdbcDataAdapter myDataAdapter = new OdbcDataAdapter(strSQLDDL, myConnection);
   ddlDataSet1.Clear();
   myDataAdapter.Fill(ddlDataSet1, "ddlDATATYPE");
   DataSet1.DataSource = ddlDataSet1;
   DataSet1.DataBind();
   myDataAdapter.Dispose();
   myDataAdapter = null;
   myConnection.Close();
   return ddlDataSet1;
}

Just need the correct syntax.


http://www.eggheadcafe.com/forums/Fo...=14586&INTID=6


Let's share our knowledge together!!!
mcupryk@sun.net.bb
Matt Cupryk
514-685-0449

Knowledge is to be shared.
__________________
Knowledge is to be shared.
Reply With Quote
  #2 (permalink)  
Old October 13th, 2004, 11:59 AM
Registered User
 
Join Date: Oct 2004
Location: Belo Horizonte, Minas Gerasi, Brazil.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Wellerson
Default

:)
you need bind the datalist's property databind to table of the your dataset....

Valeu



Costa, Wellerson
wellerson@gmail.com
BH-MG-Brazil
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Bind Two Variables to LinkButton Control cyberstore05 .NET Framework 2.0 1 October 31st, 2008 02:50 AM
Bind a property to a table field? ParadiseIsle Access 2 November 12th, 2005 07:13 PM
How to bind date field in a datalist deepak kavety .NET Web Services 2 January 19th, 2005 12:19 AM
How to bind data to a dropdown in a datalist thats broushly ASP.NET 1.0 and 1.1 Basics 1 April 28th, 2004 01:52 PM
bind 2 tables in a datalist life_s Ng ASP.NET 1.0 and 1.1 Basics 4 December 19th, 2003 04:37 AM



All times are GMT -4. The time now is 08:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.