"How Do I" Videos - Here's What's Next!

"How Do I" Videos - Here's What's Next!

  • Comments 28

Based on all the great (and numerous) amounts of positive feedback on the first series of videos, I'm ramping up to start the next wave. I took into account each and every request I got and came up with the following areas of focus - all related to what you can do now with VS 2005:

Object Binding  
Reporting & Printing
Managing Database Changes
Deployment
Interop Forms
Validation

These areas will span at least 10 videos that I'm shooting to have done by mid-June so stay tuned! And once again, keep the feedback coming!

Leave a Comment
  • Please add 7 and 8 and type the answer here:
  • Post
  • Great, can not wait till those done. Hope that there are C# version too, like always.

  • Hi Pram,

    These videos will all be in Visual Basic, but I'll forward your request to the C# team.

    -B

  • I have been eagerly looking forward to the one on Object Binding!  Enough so I believe it has made a few people jealous  ;)

  • I've seen some of your videos. They're good.

    I'm new to VB. How do you create codesnippets. e.g. DeleteCustomer

  • Using Typed DataSets are great,but we need information on how to create encoded connection strings so someone can't read them in the app.config file. How about a video on doing that?

  • Your videos are the best!

    I can't wait to see the next set of videos!

    I've just started working with SQL 2005, who would have thought data could be so much fun! :)

    I would like to see a video, of populating a TreeView in a win form application with a SQL 2005 database.

    Do you have any info to get me pointed in the right direction.

    How would I bind the specific columns to the correct nodes?

    Thanks again.

  • Your videos are the best!

    I can't wait to see the next set of videos!

    I've just started working with SQL 2005, who would have thought data could be so much fun! :)

    I would like to see a video, of populating a TreeView in a win form application with a SQL 2005 database.

    Do you have any info to get me pointed in the right direction.

    How would I bind the specific columns to the correct nodes?

    Thanks again.

  • Hi pmmci,

    You can create code snippets by selecting text in the code editor and then dragging that onto the toolbox. Then you can use that snippet of code again by dragging from the toolbox into the editor.

    -B

  • Hi Jerry,

    Binding with a TreeView is not automatic since this control does not have a DataSource property and the treeview is a hierarchical representation of data and not just a flat list. You have to create the nodes manually by looping through your DataViews. I will try to post a sample scenario on this blog. :-)

    -B

  • Thanks Beth.

    I've been serching for a while on how to bind the data to a treeview (VB.net/SQL 2005).

    I appreciate any help.

    I look forward to all the great info you post on this blog.

    Thanks again. :)

  • Well I've been working on getting the treeview populated with my data.

    I can get the TableName & ColumnName into the TreeView, after that I'm stuck :(

    Any ideas? (sorry I'm impatient) :)

    I'm not sure I'm going in the right direction, here is what I have so far.

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Dim dt As DataTable

           Dim dc As DataColumn

           Dim NTables, NTable, NColumn As TreeNode

           Try

               TreeView1.BeginUpdate()

               TreeView1.ShowLines = True

               TreeView1.ShowPlusMinus = True

               TreeView1.ShowRootLines = True

               TreeView1.HideSelection = False

               TreeView1.HotTracking = True

               NTables = New TreeNode("Library Info")

               NTables.ForeColor = Color.Blue

               TreeView1.Nodes.Add(NTables)

               For Each dt In CustomerOrdersDataSet.Tables

                   NTable = New TreeNode(dt.TableName)

                   NTable.ForeColor = Color.Red

                   NTables.Nodes.Add(NTable)

                   For Each dc In dt.Columns

                       NColumn = New TreeNode(dc.ColumnName)

                       NColumn.ForeColor = Color.Green

                       NTable.Nodes.Add(NColumn)

                   Next

               Next

           Catch ex As Exception

               MessageBox.Show(ex.ToString)

           Finally

               TreeView1.ExpandAll()

               TreeView1.EndUpdate()

           End Try

    End Sub

  • Hi Jerry,

    You'll need to add a For..Each for the DataRows too in there. Something like:

    For Each dc In dt.Columns

       NColumn = New TreeNode(dc.ColumnName)

       NColumn.ForeColor = Color.Green

       NTable.Nodes.Add(NColumn)

       For Each dr As DataRow In dt.Rows

           Dim val As Object = dr(dc)

           If IsDBNull(val) Then

               val = "<null>"

           End If

           Dim nRow As New TreeNode(val.ToString)

           NColumn.Nodes.Add(nRow)

       Next

    Next

  • Hi Beth,

    Super job on the videos.  You get 5 stars from me.

    Your boss should give you a higher salary for this work!  Truely, we cannot use the great features of a product if we do not know how to use them.  MS has tons of written documentation, but who has time to read it? (Not me)

    Suggested video: Project wide Exception handling.

    The Try-Catch blocks are great, but there is sometimes that unanticipated error.  How can we provide Exception handling that will encompass the entire project to catch unanticipated errors?

    Keep up the good work!

    Tom

  • Beth,

    Thank you so much!

    Your code worked GREAT! :)

    I'll post the final code, & hope it can help anyone else looking to add a TreeView to their project.

    If anyone wants to add this code, what I did was add a TreeView "AFTER" I finished the "3OneToManyForm" Video by Beth Massi.

    Thanks again  :)

    --------------------------------------------------------------------------------------------------------------------------

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

           'TODO: This line of code loads data into the 'CustomerOrdersDataSet.Orders' table. You can move, or remove it, as needed.

           Me.OrdersTableAdapter.Fill(Me.CustomerOrdersDataSet.Orders)

           'TODO: This line of code loads data into the 'CustomerOrdersDataSet.Customer' table. You can move, or remove it, as needed.

           Me.CustomerTableAdapter.Fill(Me.CustomerOrdersDataSet.Customer)

           'Me.CustomerTableAdapter.Fill(Me.CustomerOrdersDataSet.Customer)

           'Me.TreeView1.Nodes.Add(New CategoryTreeNode())

           'Me.CustomerTableAdapter.Fill(Me.CustomerOrdersDataSet.Customer)

           'TreeView1.BeginUpdate()

           'TreeView1.Nodes.Add("Parent")

           'TreeView1.Nodes(0).Nodes.Add("Child 1")

           'TreeView1.Nodes(0).Nodes.Add("Child 2")

           'TreeView1.Nodes(0).Nodes(1).Nodes.Add("Grandchild")

           'TreeView1.Nodes(0).Nodes(1).Nodes(0).Nodes.Add("Great Grandchild")

           'TreeView1.EndUpdate()

           ' ''TreeView1.BeginUpdate()

           ' ''TreeView1.Nodes.Add(Me.CustomerTableAdapter.Fill(Me.CustomerOrdersDataSet.Customer))

           ' ''TreeView1.Nodes.Add(Me.OrdersTableAdapter.Update(Me.CustomerOrdersDataSet.Orders))

           ' ''TreeView1.Nodes(0).Nodes.Add(Me.OrdersTableAdapter.Update(Me.CustomerOrdersDataSet.Orders))

           ' ''Me.TreeView1.Nodes.Add(Me.OrdersTableAdapter.Fill(Me.CustomerOrdersDataSet.Orders))

           ' ''Me.TreeView1.Nodes.Add(Me.CustomerTableAdapter.Update(Me.CustomerOrdersDataSet.Customer))

           ' ''TreeView1.EndUpdate()

           ' ''TreeView1.ExpandAll()

           'Me.TreeView1.ExpandAll()

           ' ''InfoDataset123(TreeView1, CustomerOrdersDataSet, True)

           Dim dt As DataTable

           Dim dc As DataColumn

           Dim NTables, NTable, NColumn As TreeNode

           Try

               TreeView1.BeginUpdate()

               TreeView1.ShowLines = True

               TreeView1.ShowPlusMinus = True

               TreeView1.ShowRootLines = True

               TreeView1.HideSelection = False

               TreeView1.HotTracking = True

               NTables = New TreeNode("Library Info")

               NTables.ForeColor = Color.Blue

               TreeView1.Nodes.Add(NTables)

               For Each dt In CustomerOrdersDataSet.Tables

                   NTable = New TreeNode(dt.TableName)

                   NTable.ForeColor = Color.Red

                   NTables.Nodes.Add(NTable)

                   For Each dc In dt.Columns

                       NColumn = New TreeNode(dc.ColumnName)

                       NColumn.ForeColor = Color.Green

                       NTable.Nodes.Add(NColumn)

                       'For Each dr As DataRow In dt.Rows

                       For Each dr As DataRow In dt.Rows

                           Dim val As Object = dr(dc)

                           If IsDBNull(val) Then

                               val = "<null>"

                           End If

                           Dim nRow As New TreeNode(val.ToString)

                           NColumn.Nodes.Add(nRow)

                       Next

                   Next

               Next

           Catch ex As Exception

               MessageBox.Show(ex.ToString)

           Finally

               'TreeView1.ExpandAll()

               TreeView1.EndUpdate()

           End Try

       End Sub

  • Your the best!!!  Thank you for the excellent video!

Page 1 of 2 (28 items) 12