Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
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
Old January 24th, 2005, 12:56 PM
Authorized User
Join Date: Aug 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Default what the heck is a container?[:D]

get access to database information and return it via a DataReader
    Function GetTeams() As System.Data.IDataReader
     Dim connectionString As String = _
     Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)

     Dim queryString As String = "SELECT [Teams].[TeamID], [Teams].[TeamName], [Teams].[Notes] FROM [Teams]"
     Dim dbCommand As System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand
     dbCommand.CommandText = queryString
     dbCommand.Connection = dbConnection

     Dim dataReader As System.Data.IDataReader = dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)

     Return dataReader
    End Function
next place the "notes" field in a server control

<asp:Label text='<%# Container.DataItem("Notes") %>' id="teamnotes" runat="server" />
Can anyone explain the Container object referenced above, I come from Classic ASP and it looks like its used in similar fasion to a recordSet object, however it doesn't use an object name. I assume the function GetTeams() has created this Container object? Any information would be helpful. Thanks much.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Container Binding problem tany4u Javascript How-To 0 October 3rd, 2006 01:36 AM
Is there a container control in VBA? sangeenobs Beginning VB 6 1 March 23rd, 2006 10:57 AM
Principals and EJB container mtedone J2EE 1 December 14th, 2004 09:47 AM
Name 'Container' is not declared. surendran ASP.NET 1.0 and 1.1 Professional 1 August 17th, 2004 10:33 AM
Form Container shortynelson General .NET 1 August 13th, 2004 01:27 PM

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