<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>VB.NET Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'VB.NET' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2010 Programmers Heaven</copyright>
    <pubDate>Mon, 15 Mar 2010 21:02:20 -0700</pubDate>
    <lastBuildDate>Mon, 15 Mar 2010 21:02:20 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Get Printer Status after PDF file is printed</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414588/414588/get-printer-status-after-pdf-file-is-printed/</link>
      <description>Hi,&lt;br /&gt;
I am writing a vb.net windows application to send pdf files to printer, one at time, after file is printed I want to get the status from printer as "Printed".&lt;br /&gt;
&lt;br /&gt;
so far I have the code (working) which can send the selected pdf to printer.&lt;br /&gt;
Now I am trying to use this following code to get the status of printer, after the file is printed. but, not working.&lt;br /&gt;
&lt;br /&gt;
objCollection value is being "printer property evaluation failed"&lt;br /&gt;
&lt;br /&gt;
Please help me if anyone knows how  to do it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Imports System.Management 'used namespace&lt;br /&gt;
&lt;br /&gt;
Private objOS As ManagementObjectSearcher&lt;br /&gt;
Private objCollection As ManagementObjectCollection&lt;br /&gt;
Private objMgmt As ManagementObject&lt;br /&gt;
&lt;br /&gt;
Dim jobName As String&lt;br /&gt;
Dim documentName As String&lt;br /&gt;
Dim PrinterStatus As String&lt;br /&gt;
Dim PrinterStatus1 As String&lt;br /&gt;
&lt;br /&gt;
          &lt;br /&gt;
Dim searchQuery As String&lt;br /&gt;
Dim objMgmt As ManagementObject&lt;br /&gt;
searchQuery = "SELECT * FROM Win32_PrintJob"&lt;br /&gt;
objOS = New ManagementObjectSearcher(searchQuery)&lt;br /&gt;
objCollection = objOS.Get()&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 For Each objMgmt In objCollection&lt;br /&gt;
     jobName = objMgmt.Properties("Name").Value.ToString()&lt;br /&gt;
     documentName = objMgmt.Properties("Document").Value.ToString()&lt;br /&gt;
     PrinterStatus = objMgmt.Properties("Status").Value.ToString()&lt;br /&gt;
    PrinterStatus1 = objMgmt.Properties("StatusMask").Value.ToString()&lt;br /&gt;
            If PrinterStatus1 = "128" Then '128 means Printed&lt;br /&gt;
              Change_Status()'write the status to database as printed                &lt;br /&gt;
            Else&lt;br /&gt;
             MsgBox("objMgmt: " + documentName + "Status: " + PrinterStatus1, vbExclamation)&lt;br /&gt;
            End If&lt;br /&gt;
        Next&lt;br /&gt;
       &lt;br /&gt;
       Catch ex As Exception&lt;br /&gt;
       End Try&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks in advance!&lt;br /&gt;
Anita.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414588/414588/get-printer-status-after-pdf-file-is-printed/</guid>
      <pubDate>Mon, 15 Mar 2010 17:10:29 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Designing and Planning programs/applications</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414580/414580/designing-and-planning-programsapplications/</link>
      <description>I'm a self taught programmer still learning but i've got a major problem.&lt;br /&gt;
When i want to write an application i just imagine the form and start writing codes and so on and i know that is so wrong.&lt;br /&gt;
My question how do you plan/design an application??? deciding what should be a class, e.t.c??&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414580/414580/designing-and-planning-programsapplications/</guid>
      <pubDate>Mon, 15 Mar 2010 10:40:04 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Connecting to MySQL and general DB question?</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414543/414543/connecting-to-mysql-and-general-db-question/</link>
      <description>Hello All,&lt;br /&gt;
&lt;br /&gt;
I am getting back into the programming world after a long time away.  I am trying to develop some custom programs for personal use, as well as to get back into the hang of programming.  My major interest is in MySQL database management.  I have the database connector downloaded and installed.  the following is my program:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Public Class Form1
    Dim myConnectionString As String


    Private Sub btn_Connect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Connect.Click
        myConnectionString = "server=localhost;" _
          &amp;amp; "uid=XXXXX;" _
          &amp;amp; "pwd=XXXXX;" _
          &amp;amp; "database=XXXXX;"
        Dim conn As New MySql.Data.MySqlClient.MySqlConnection(myConnectio
nString)

        Try
            conn.Open()
        Catch ex As MySql.Data.MySqlClient.MySqlException
            MessageBox.Show(ex.ToString)
            Select Case ex.Number
                Case 0
                    MessageBox.Show("Cannot connect to server. Contact administrator")
                Case 1045
                    MessageBox.Show("Invalid username/password, please try again")
            End Select
        End Try


        conn.Close()
    End Sub
End Class

&lt;/pre&gt;&lt;br /&gt;
I would like to now begin by displaying the small amount of info in the DB, but am not sure how to proceed.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PS- I will use this thread/program to develop the tools I will need to build my other programs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
USING VISUAL STUDIO 2008&lt;br /&gt;
&lt;br /&gt;
Thank You in Advance for your Help!!!!!&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414543/414543/connecting-to-mysql-and-general-db-question/</guid>
      <pubDate>Sun, 14 Mar 2010 23:28:59 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Log Based Intrusion Detection System ....</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414503/414503/log-based-intrusion-detection-system-/</link>
      <description>Need to develop an log based IDS system in VB.NET ...&lt;br /&gt;
Has Read the System Logs ... but now how do i proceed ... &lt;br /&gt;
Could anyone help me in starting the project ....&lt;br /&gt;
And how do i get the EVENT ID of the Events from the EVENT LOG using .NET ???&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414503/414503/log-based-intrusion-detection-system-/</guid>
      <pubDate>Sat, 13 Mar 2010 09:57:52 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Windows Serice project in VB.NET</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414474/414474/windows-serice-project-in-vbnet/</link>
      <description>Hi,&lt;br /&gt;
I created a windows service in vb.net 2005. and added the following functionality. I am trying to update the label on the form for ever5 five seconds. It works fine when I created the VB.net windows application with the same code. But not in service. when I install the service and start it, doesn't do anything. &lt;br /&gt;
&lt;br /&gt;
Please reply if anyone knows about the windows service.&lt;br /&gt;
&lt;br /&gt;
Thanks in advance!&lt;br /&gt;
Anita Tirumalareddy.&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
 Protected Overrides Sub OnStart(ByVal args() As String)&lt;br /&gt;
        ' Add code here to start your service. This method should set things&lt;br /&gt;
        ' in motion so your service can do its work.&lt;br /&gt;
        Timer1.Start()&lt;br /&gt;
        Timer1.Enabled = True&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Protected Overrides Sub OnStop()&lt;br /&gt;
        ' Add code here to perform any tear-down necessary to stop your service.&lt;br /&gt;
        Timer1.Stop()&lt;br /&gt;
        Timer1.Enabled = False&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick&lt;br /&gt;
        lblDateTime.Text = Now.ToLongTimeString.ToString()&lt;br /&gt;
        Timer1.Interval = 5000&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
 ' The main entry point for the process&lt;br /&gt;
    &amp;lt;MTAThread()&amp;gt; _&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Shared Sub Main()&lt;br /&gt;
        Dim ServicesToRun() As System.ServiceProcess.ServiceBase&lt;br /&gt;
&lt;br /&gt;
        ' More than one NT Service may run within the same process. To add&lt;br /&gt;
        ' another service to this process, change the following line to&lt;br /&gt;
        ' create a second service object. For example,&lt;br /&gt;
        '&lt;br /&gt;
        '   ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}&lt;br /&gt;
        '&lt;br /&gt;
        ServicesToRun = New System.ServiceProcess.ServiceBase() {New Timer_Service1()}&lt;br /&gt;
&lt;br /&gt;
        System.ServiceProcess.ServiceBase.Run(ServicesToRu
n)&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414474/414474/windows-serice-project-in-vbnet/</guid>
      <pubDate>Fri, 12 Mar 2010 07:15:00 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Add your code snippets, get links to your site</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414447/414447/add-your-code-snippets-get-links-to-your-site/</link>
      <description>Curious if anyone here would like to help add some commonly used code snippets to a freeware code repository project at &lt;a href="http://www.snippetmanager.net"&gt;http://www.snippetmanager.net&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You can post a link to your code on the blog if you would like to participate: &lt;a href="#"&gt;http://blog.snippetmanager.net&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
VB.net is great but code for PHP, SQL, VB6, C#, C++, Delphi and others is also needed.&lt;br /&gt;
&lt;br /&gt;
This is a non-profit project but contributors may include a comment in each snippet file with a site link for free promotion.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414447/414447/add-your-code-snippets-get-links-to-your-site/</guid>
      <pubDate>Thu, 11 Mar 2010 12:22:05 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Query Database</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414396/414396/query-database/</link>
      <description>Hi i've got a form with six option boxes. i want to query my database based on any of the option box checked. all six boxes can be checked.&lt;br /&gt;
how do i go about this??&lt;br /&gt;
I've tried multiple If...Else statements but it dosent give me the required result.. &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414396/414396/query-database/</guid>
      <pubDate>Wed, 10 Mar 2010 09:39:38 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>NullReferenceException was unhandled</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414350/414350/nullreferenceexception-was-unhandled/</link>
      <description>Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click&lt;br /&gt;
        Select Case btnNew.Text&lt;br /&gt;
            Case "&amp;amp;New"&lt;br /&gt;
&lt;br /&gt;
                txtBookTitle.ReadOnly = False&lt;br /&gt;
                txtAuthor.ReadOnly = False&lt;br /&gt;
&lt;br /&gt;
                txtBookTitle.Clear()&lt;br /&gt;
                txtAuthor.Clear()&lt;br /&gt;
                btnNew.Text = "&amp;amp;Save"&lt;br /&gt;
                btnModify.Enabled = True&lt;br /&gt;
                btnModify.Text = "&amp;amp;Cancel"&lt;br /&gt;
                btnRemove.Enabled = False&lt;br /&gt;
                txtBookTitle.Focus()&lt;br /&gt;
            Case "&amp;amp;Save"&lt;br /&gt;
                If txtBookTitle.Text.Trim.Length = 0 Then&lt;br /&gt;
                    MessageBox.Show("Please type a valid Book Title.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                End If&lt;br /&gt;
&lt;br /&gt;
                If txtAuthor.Text.Trim.Length = 0 Then&lt;br /&gt;
                    MessageBox.Show("Please type a valid Author Name.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                End If&lt;br /&gt;
&lt;br /&gt;
                If txtBookCategory.Text.Trim.Length = 0 Then&lt;br /&gt;
                    MessageBox.Show("Please type a valid Book Category.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                End If&lt;br /&gt;
&lt;br /&gt;
                If txtBookCode.Text.Trim.Length = 0 Then&lt;br /&gt;
                    MessageBox.Show("Please type a valid Book Code.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                End If&lt;br /&gt;
&lt;br /&gt;
                If txtVolume.Text.Trim.Length = 0 Then&lt;br /&gt;
                    MessageBox.Show("Please type a valid Book Category.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                End If&lt;br /&gt;
                &lt;br /&gt;
                Dim dbDataReader As OleDb.OleDbDataReader = Nothing&lt;br /&gt;
                Dim sqlCommand As String = "SELECT * FROM BOOKS WHERE BookTitle = '" &amp;amp; txtBookTitle.Text &amp;amp; "'"&lt;br /&gt;
                dbDataReader = performQuery(connectionString, sqlCommand)&lt;br /&gt;
&lt;br /&gt;
                If dbDataReader.HasRows = 0 Then&lt;br /&gt;
                    sqlCommand = "SELECT * FROM BOOKS WHERE Author = '" &amp;amp; txtAuthor.Text &amp;amp; "'"&lt;br /&gt;
                    dbDataReader = performQuery(connectionString, sqlCommand)&lt;br /&gt;
&lt;br /&gt;
                    If dbDataReader.HasRows = 0 Then&lt;br /&gt;
                        sqlCommand = "SELECT * FROM BOOKS WHERE BookCategory = '" &amp;amp; txtBookCategory.Text &amp;amp; "'"&lt;br /&gt;
                        dbDataReader = performQuery(connectionString, sqlCommand)&lt;br /&gt;
&lt;br /&gt;
                        If dbDataReader.HasRows = 0 Then&lt;br /&gt;
                            sqlCommand = "SELECT * FROM BOOKS WHERE Volume = '" &amp;amp; txtVolume.Text &amp;amp; "'"&lt;br /&gt;
                            dbDataReader = performQuery(connectionString, sqlCommand)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
          ERROR --  &amp;gt; If dbDataReader.HasRows = 0 Then&lt;br /&gt;
                                sqlCommand = "INSERT INTO BOOKS (BookTitle, Author, BookCategory, Volume) VALUES ('" &amp;amp; txtBookTitle.Text &amp;amp; "', '" &amp;amp; txtAuthor.Text &amp;amp; "', '" &amp;amp; txtBookCategory.Text &amp;amp; "' , '" &amp;amp; txtVolume.Text &amp;amp; "',)"&lt;br /&gt;
                                If performNonQuery(connectionString, sqlCommand) Then&lt;br /&gt;
                                    MessageBox.Show("New contact successfully added.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                                    txtBookTitle.Clear()&lt;br /&gt;
                                    txtAuthor.Clear()&lt;br /&gt;
                                    txtBookTitle.Focus()&lt;br /&gt;
                                    Exit Sub&lt;br /&gt;
                                Else&lt;br /&gt;
                                    MessageBox.Show("Unable to create new BOOK INFORMATION.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Error)&lt;br /&gt;
                                    txtBookTitle.Focus()&lt;br /&gt;
                                    Exit Sub&lt;br /&gt;
                                End If&lt;br /&gt;
                            Else&lt;br /&gt;
                                MessageBox.Show("BOOK TITLE name already existing.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                                txtAuthor.Focus()&lt;br /&gt;
                                Exit Sub&lt;br /&gt;
                            End If&lt;br /&gt;
                        Else&lt;br /&gt;
                            MessageBox.Show("Author Name already existing.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                            txtBookTitle.Focus()&lt;br /&gt;
                            Exit Sub&lt;br /&gt;
                        End If&lt;br /&gt;
                    Else&lt;br /&gt;
                        MessageBox.Show("Volume Name already existing.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                        txtBookTitle.Focus()&lt;br /&gt;
                        Exit Sub&lt;br /&gt;
                    End If&lt;br /&gt;
&lt;br /&gt;
                End If&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            Case "&amp;amp;Update"&lt;br /&gt;
                If txtBookTitle.Text.Trim.Length = 0 Then&lt;br /&gt;
                    MessageBox.Show("Please type a valid Mobile Number.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                End If&lt;br /&gt;
&lt;br /&gt;
                Dim dbDataReader As OleDb.OleDbDataReader = Nothing&lt;br /&gt;
                Dim sqlCommand As String = "UPDATE BOOKS SET BookTitle = '" &amp;amp; txtBookTitle.Text &amp;amp; "' WHERE Author = '" &amp;amp; txtAuthor.Text &amp;amp; "'"&lt;br /&gt;
                If performNonQuery(connectionString, sqlCommand) Then&lt;br /&gt;
                    MessageBox.Show("Update of Book Information successful.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Error)&lt;br /&gt;
&lt;br /&gt;
                    txtBookTitle.Clear()&lt;br /&gt;
                    txtBookTitle.ReadOnly = True&lt;br /&gt;
                    txtAuthor.Clear()&lt;br /&gt;
                    txtAuthor.ReadOnly = True&lt;br /&gt;
                    btnNew.Text = "&amp;amp;New"&lt;br /&gt;
                    btnModify.Text = "&amp;amp;Modify"&lt;br /&gt;
                    btnModify.Enabled = False&lt;br /&gt;
                    btnRemove.Enabled = False&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                Else&lt;br /&gt;
                    MessageBox.Show("Unable to update Book Information.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Error)&lt;br /&gt;
                    txtBookTitle.Focus()&lt;br /&gt;
                    Exit Sub&lt;br /&gt;
                End If&lt;br /&gt;
&lt;br /&gt;
        End Select&lt;br /&gt;
    End Sub&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414350/414350/nullreferenceexception-was-unhandled/</guid>
      <pubDate>Tue, 09 Mar 2010 08:34:50 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Help! how to display data grid view items in particular textboxes?</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414344/414344/help-how-to-display-data-grid-view-items-in-particular-textboxes/</link>
      <description>HI~&lt;br /&gt;
&lt;br /&gt;
   i have DatagridView1 with 5 Columns BookCode, BookCategory, BookTitle, Volume and Author just wondering how can i display thier values at textboxes WHEN I CLICK A ROW in the DATAGRID VIEW&lt;br /&gt;
need help please!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414344/414344/help-how-to-display-data-grid-view-items-in-particular-textboxes/</guid>
      <pubDate>Tue, 09 Mar 2010 06:20:29 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>NULL  REFERENCE ERROR VB.NET URGENT</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414331/414331/null--reference-error-vbnet-urgent/</link>
      <description>Dear All,&lt;br /&gt;
&lt;br /&gt;
I am encountering a null reference error on the souce code below. I am trying to save into an Access 2003 database. Please help. I have tried to define the dataset by going to the toolbox menu. However, this code below is the same that I have been using elsewhere for saving and it works with no problem at all.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Dim dsnewrw As DataRow&lt;br /&gt;
        Dim dshist As New DataSet&lt;br /&gt;
        Dim dahis As New OleDb.OleDbDataAdapter&lt;br /&gt;
        Dim cbc As New OleDb.OleDbCommandBuilder(dahis)&lt;br /&gt;
        Dim Conc As New OleDb.OleDbConnection&lt;br /&gt;
&lt;br /&gt;
        'Opening database&lt;br /&gt;
        Conc.ConnectionString &lt;br /&gt;
        Conc.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Programming\DbAssetRegister.mdb" &lt;br /&gt;
        Conc.Open()&lt;br /&gt;
        dsnewrw = dshist.Tables("TblAssetHistory").NewRow()&lt;br /&gt;
        ' dsnewrw.Item("RrecId") = 1999&lt;br /&gt;
        dsnewrw.Item("Rserialno") = CboSerialno.Text&lt;br /&gt;
        dsnewrw.Item("Ractionres") = "Allocation"&lt;br /&gt;
        dsnewrw.Item("Rdatecreated") = System.DateTime.Now&lt;br /&gt;
        dsnewrw.Item("Rcreatedby") = "1223"&lt;br /&gt;
        dsnewrw.Item("Remployeeno") = "test number"&lt;br /&gt;
        dsnewrw.Item("Rformno") = TxtFormno.Text&lt;br /&gt;
        dsnewrw.Item("Rdateallocated") = System.DateTime.Now&lt;br /&gt;
        dshist.Tables("TblAssetHistory").Rows.Add(dsnewrw)&lt;br /&gt;
        dahis.Update(dshist, "TblAssetHistory")&lt;br /&gt;
        Conc.Close()</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414331/414331/null--reference-error-vbnet-urgent/</guid>
      <pubDate>Tue, 09 Mar 2010 01:02:27 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Cant Add New Record to Database</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414311/414311/cant-add-new-record-to-database/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
Whenever i try to add a new record into the database i got an error - Syntax error in INSERT INTO statement.&lt;br /&gt;
&lt;br /&gt;
What is wrong with this code ? I really cant figure out how to solve the problem. Can someone please help me. Thanks.&lt;br /&gt;
&lt;br /&gt;
I am using VB 2008 with Microsoft Access 2007. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;Imports System.Data.OleDb

Public Class Form4
    Dim connStr As String = "PROVIDER=Microsoft.ace.oledb.12.0;Data Source=C:\Testing.accdb"
    Dim sql As String = "SELECT * FROM Product"
    Dim conn As OleDbConnection = New OleDbConnection(connStr)
    Dim comm As OleDbCommand = New OleDbCommand(sql, conn)
    Dim da As OleDbDataAdapter = New OleDbDataAdapter(comm)
    Dim ds As DataSet = New DataSet()


    Private Sub LoadDatabase()
        conn.Open()
        da.Fill(ds, "Product")
        conn.Close()
        DataGridView1.DataSource = ds
        DataGridView1.DataMember = "Product"
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(da)
        builder.GetUpdateCommand()
        da.Update(ds.Tables("Product"))
        MessageBox.Show("Record Successfully Added")
    End Sub

    Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadDatabase()
    End Sub
End Class&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414311/414311/cant-add-new-record-to-database/</guid>
      <pubDate>Mon, 08 Mar 2010 08:55:40 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>send information to mobile</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414300/414300/send-information-to-mobile/</link>
      <description>On the clik of a button in a web-page information is sent to the mobile phone? How is this accomplished in .NET ? Is it necessary to purchase a gateway SMS ?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414300/414300/send-information-to-mobile/</guid>
      <pubDate>Mon, 08 Mar 2010 04:54:43 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Image Viewer (New Buttons)</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414230/414230/image-viewer-new-buttons/</link>
      <description>Hi, I have this little program I found on another site. It's a simple image viewer: Uses a dialog box to open an image from the local computer, and then applies that to a picturebox. I would just like two buttons. One button to go to the next image in the folder, and one button to go back one image in the folder. Once an image is loaded, I would like to have a small textbox to rename the image, &lt;strong&gt;but if that's not possible it's fine.&lt;/strong&gt;&lt;img src="http://img443.imageshack.us/img443/1696/examplevu.png" /&gt;&lt;br /&gt;
&lt;br /&gt;
I would also like it if, instead of choosing a single image, this little program would allow the user to choose a specific FOLDER, which would include a number of images, and then cycle through them from there.&lt;br /&gt;
&lt;br /&gt;
I've attached the program with this post. Please help, Collin Helmers.&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1646"&gt;PictureViewer.zip&lt;/a&gt; (59079 bytes | downloaded 8 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414230/414230/image-viewer-new-buttons/</guid>
      <pubDate>Fri, 05 Mar 2010 14:08:46 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Bug when setting FolderBrowserDialog1.SelectedPath in code</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414146/414146/bug-when-setting-folderbrowserdialog1selectedpath-in-code/</link>
      <description>Do you know why this happens?&lt;br /&gt;
&lt;br /&gt;
    If (strCampaignFolder &amp;lt;&amp;gt; "") Then&lt;br /&gt;
      'Next line works fine when strCampaignFolder already has a value set by FolderBrowserDialog1.SelectedPath further below.&lt;br /&gt;
      FolderBrowserDialog1.SelectedPath = strCampaignFolder&lt;br /&gt;
    Else  'PROBLEM: Next line causes the external .NET code 'UnsafeNativeMethods' to put the app to sleep when strCampaignFolder has no existing value!&lt;br /&gt;
      FolderBrowserDialog1.SelectedPath = "L:\InternetMarketing\AdWordsCampaigns\LiveChat-Software"&lt;br /&gt;
    End If&lt;br /&gt;
    If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then&lt;br /&gt;
      'Get Campaign folder&lt;br /&gt;
      strCampaignFolder = FolderBrowserDialog1.SelectedPath&lt;br /&gt;
    End If&lt;br /&gt;
&lt;br /&gt;
Can you suggest a workaround, please?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414146/414146/bug-when-setting-folderbrowserdialog1selectedpath-in-code/</guid>
      <pubDate>Tue, 02 Mar 2010 10:59:40 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>parsing information from a text file</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414028/414028/parsing-information-from-a-text-file/</link>
      <description>i have this -for me- major problem&lt;br /&gt;
&lt;br /&gt;
having as definitions a start time and an end time&lt;br /&gt;
i have to parse a text file and search from the start time to the end time&lt;br /&gt;
i believe i can do this parsing with the .contains&lt;br /&gt;
my major main problem is what to use to go from one time to the other?&lt;br /&gt;
&lt;br /&gt;
in example&lt;br /&gt;
&lt;br /&gt;
how can i say &lt;br /&gt;
&lt;br /&gt;
for starttime as 13:46 am to endtime as 14:56 pm step 1 second&lt;br /&gt;
.....?</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414028/414028/parsing-information-from-a-text-file/</guid>
      <pubDate>Mon, 01 Mar 2010 02:51:46 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>time Zones in Excel sheet</title>
      <link>http://www.programmersheaven.com/mb/VBNET/414027/414027/time-zones-in-excel-sheet/</link>
      <description>Hello,&lt;br /&gt;
I am looking for a list of the standard time zones in Excel format.   I have a developer writing a. net application and they want to give the user a drop down to select their time zone.  I've been tasked with getting a spreadsheet to populate the drop down.  The time zones that Windows displays when you double click the clock is what I'm looking for.  This seems like a good standard list to use. &lt;br /&gt;
&lt;br /&gt;
I tried searching for something to download but cant find.  I'm sure someone has something.  Anybody have a speadsheet I can give to the developer? &lt;br /&gt;
 Thanks Experts!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/414027/414027/time-zones-in-excel-sheet/</guid>
      <pubDate>Mon, 01 Mar 2010 02:33:32 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Tree view .........very very urgent</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413985/413985/tree-view-very-very-urgent/</link>
      <description>I am very new to vb.net.&lt;br /&gt;
Suppose i have a page ,on one side i have certain  names from the database(tree view).when i click a particular customer name,i have to display the details regarding about this particular customer on the other side of the page in the same form,for that what i have to do.i want codings for thaty&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413985/413985/tree-view-very-very-urgent/</guid>
      <pubDate>Sat, 27 Feb 2010 14:03:43 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>How can I have my VB look at the value of the formula inside the cell?</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413927/413927/how-can-i-have-my-vb-look-at-the-value-of-the-formula-inside-the-cell/</link>
      <description>This is what I have written:&lt;br /&gt;
&lt;br /&gt;
                    Set valrange = Range("O5:O99")&lt;br /&gt;
&lt;br /&gt;
    If Not Intersect(Target, valrange) Is Nothing Then&lt;br /&gt;
        If Target.Formula = "N" Then&lt;br /&gt;
            MsgBox "Message here"&lt;br /&gt;
        End If&lt;br /&gt;
    End If&lt;br /&gt;
&lt;br /&gt;
Basically I am trying to get VB to display a message anytime the formula in column "O" is returning a N (based on an IF statement inside the cell). can't figure out what is missing in the code!&lt;br /&gt;
&lt;br /&gt;
Any help will be greatly appreciated!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413927/413927/how-can-i-have-my-vb-look-at-the-value-of-the-formula-inside-the-cell/</guid>
      <pubDate>Thu, 25 Feb 2010 15:45:50 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>StatusLabel Control</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413661/413661/statuslabel-control/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have a parent form called frmMainMenu and a child form called frmInsertStock with text boxes. On frmMainMenu I have a status panel called panInstruction. I am trying to display a message when a textbox has focus. So in the enter event of the text box I have placed this code:&lt;br /&gt;
 &lt;br /&gt;
frmMainMenu.panInstruction.Text = "My name is David"&lt;br /&gt;
&lt;br /&gt;
In the previous version on VB.NET this statement worked. Could you tell me what am I doing wrong and if there is an error in my code.&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
&lt;br /&gt;
David</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413661/413661/statuslabel-control/</guid>
      <pubDate>Fri, 19 Feb 2010 05:01:12 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Help with file manipulation...</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413653/413653/help-with-file-manipulation/</link>
      <description>Alright...here's the deal..i am making a program that has to affect every file in a predefined folder...so i need a sub that is going to select (or rather get the path to) every single file in that folder one at a time...&lt;br /&gt;
and alongside that it would be appreciated if you also give me a sub that reads the file info (like comments, author etc. - if i have to specify a file type i would need it for audio files)...&lt;br /&gt;
and please post the subs themselves...i am a beginner in vb.net so if you write "use the ___ class(or whatever)" it doesn't mean much to me...i learn more easily if i see the finished code and draw my conclusions from that...&lt;br /&gt;
&lt;br /&gt;
Thanks in advance...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413653/413653/help-with-file-manipulation/</guid>
      <pubDate>Fri, 19 Feb 2010 01:32:48 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>LINQ Query for Sum [with null values Column from Datatable] ?</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413652/413652/linq-query-for-sum-with-null-values-column-from-datatable-/</link>
      <description>Hi Sean,&lt;br /&gt;
How are you man? Im fine here. After a long gap...&lt;br /&gt;
&lt;br /&gt;
I like to calculate the total to a field [trn_qty] from Dtb1 [Datatable]. For that any ideas...? &lt;br /&gt;
&lt;br /&gt;
My Query is&lt;br /&gt;
&lt;br /&gt;
Dim Numbers = Dtb1.AsEnumerable()&lt;br /&gt;
Dim SvQy = (From n In Numbers Select n.Field(Of Decimal)("trn_qty")).Sum()&lt;br /&gt;
&lt;br /&gt;
But Iam not getting any O/P. Also I don't know whether its correct or not... Any better ideas?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413652/413652/linq-query-for-sum-with-null-values-column-from-datatable-/</guid>
      <pubDate>Fri, 19 Feb 2010 01:25:57 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>MDI Forms</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413628/413628/mdi-forms/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have a Parent form and childform.&lt;br /&gt;
I have a button on the childform that should call another child form, but it is no displaying.&lt;br /&gt;
The code that I am using is in the button click event is:&lt;br /&gt;
        &lt;br /&gt;
        frmCurrentStock.MdiParent = frmMainMenu&lt;br /&gt;
        frmCurrentStock.Show()&lt;br /&gt;
&lt;br /&gt;
Thanks David.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413628/413628/mdi-forms/</guid>
      <pubDate>Thu, 18 Feb 2010 06:52:15 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Program + Database help</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413600/413600/program-+-database-help/</link>
      <description>Hi all,&lt;br /&gt;
&lt;br /&gt;
I am in the midst of re-writing a program for it to make use of a database to store data instead of numerous text files.&lt;br /&gt;
&lt;br /&gt;
I am using Access as my database and Visual Studio 2005 (VB.net) to write the program&lt;br /&gt;
&lt;br /&gt;
The purpose of the program is mainly to generate a list of fixtures for a given league, there are currently 3 different leagues. Users will need to be able to add/delete/modify leagues as well as being able to add/delete/modify teams that play in one of the leagues.&lt;br /&gt;
&lt;br /&gt;
The database is needed to hold all the team and team manager details as well as the fixtures. The program is intended to generate the fixtures and once done this it needs to populate the corresponding table and fields in the database.&lt;br /&gt;
&lt;br /&gt;
I was advised to create my database in access (i have access '07 but i am saving as access 2000 files) and then connect it to my program..i have created the database in access but i am struggling to connect the program and database&lt;br /&gt;
&lt;br /&gt;
Firstly..is this the best way of doing it..? If not, how else should i be doing it?&lt;br /&gt;
&lt;br /&gt;
This is the first time i have tried to combine vb.net with databases etc, so any tips, pointers or advice would be much appreciated...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413600/413600/program-+-database-help/</guid>
      <pubDate>Wed, 17 Feb 2010 10:15:34 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>Urgent Solution to treeview</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413551/413551/urgent-solution-to-treeview/</link>
      <description>Imports MSComctlLib&lt;br /&gt;
Imports System&lt;br /&gt;
Imports System.Data.OleDb&lt;br /&gt;
Imports ADODB&lt;br /&gt;
Public Class Form1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Dim cn As ADODB.Connection&lt;br /&gt;
    Dim rst As ADODB.Recordset&lt;br /&gt;
    Dim rs As ADODB.Recordset&lt;br /&gt;
    Dim MyDataFile As String&lt;br /&gt;
&lt;br /&gt;
    Dim dbNode As Node&lt;br /&gt;
    Dim tabNode As Node&lt;br /&gt;
    Dim fldNameNode As Node&lt;br /&gt;
    Dim ColHeader() As String&lt;br /&gt;
    Dim ColHeaders As String&lt;br /&gt;
&lt;br /&gt;
    Private Sub cmdLoadData_Click()&lt;br /&gt;
&lt;br /&gt;
        Dim strCon As String&lt;br /&gt;
        Dim tabName As String&lt;br /&gt;
        Dim fldName As String&lt;br /&gt;
        Dim n As Integer&lt;br /&gt;
        Dim c As Integer&lt;br /&gt;
        Dim i As Integer&lt;br /&gt;
        Dim j As Integer&lt;br /&gt;
&lt;br /&gt;
        On Error Resume Next&lt;br /&gt;
&lt;br /&gt;
        MyDataFile = "D:\Documents and Settings\yiacovides\Desktop\" &amp;amp; "final.mdb"&lt;br /&gt;
&lt;br /&gt;
        strCon = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;amp; MyDataFile &amp;amp; ";"&lt;br /&gt;
&lt;br /&gt;
        lblDatabase.Text = MyDataFile&lt;br /&gt;
&lt;br /&gt;
        'init TreeView&lt;br /&gt;
        tvdata.Nodes.Clear()&lt;br /&gt;
&lt;br /&gt;
        cn = New ADODB.Connection&lt;br /&gt;
        cn.CursorLocation = ADODB.CursorLocationEnum.adUseClient&lt;br /&gt;
        cn.Open(strCon)&lt;br /&gt;
&lt;br /&gt;
        Cursor = Cursors.WaitCursor&lt;br /&gt;
&lt;br /&gt;
        ' set root node of TreeView.&lt;br /&gt;
        dbNode = tvdata.Nodes.Add(, , "RootDB", "Database", "DatabaseClose")&lt;br /&gt;
        dbNode.Tag = "RootDB"&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        'rst = cn.OpenSchema(adSchemaTables)&lt;br /&gt;
        rst = cn.OpenSchema(ADODB.SchemaEnum.adSchemaTables, New Object() {Nothing, Nothing, Nothing, "TABLE"})&lt;br /&gt;
        rst.MoveFirst()&lt;br /&gt;
&lt;br /&gt;
        ' set table nodes:&lt;br /&gt;
        Do Until rst.EOF&lt;br /&gt;
            If rst("TABLE_TYPE").Value = "VIEW" Or rst("TABLE_TYPE").Value = "TABLE" Then&lt;br /&gt;
                tabName = rst("TABLE_NAME").Value&lt;br /&gt;
                tabNode = tvdata.Nodes.Add("RootDB", &lt;strong&gt;tvwChild&lt;/strong&gt;&lt;span style="color: Red;"&gt;&lt;/span&gt;, "X" &amp;amp; tabName, tabName, "TableClose")&lt;br /&gt;
                tabNode.Tag = "Tables"&lt;br /&gt;
            End If&lt;br /&gt;
            rst.MoveNext()&lt;br /&gt;
        Loop&lt;br /&gt;
&lt;br /&gt;
        rst.Close()&lt;br /&gt;
&lt;br /&gt;
        If tabNode Is Nothing Then&lt;br /&gt;
            Cursor = Cursors.Default&lt;br /&gt;
            Exit Sub&lt;br /&gt;
        End If&lt;br /&gt;
&lt;br /&gt;
        rs = New ADODB.Recordset&lt;br /&gt;
&lt;br /&gt;
        c = tvdata.Nodes("RootDB").Children&lt;br /&gt;
        ' first table&lt;br /&gt;
        n = tvdata.Nodes("RootDB").Child.FirstSibling.Index&lt;br /&gt;
&lt;br /&gt;
        For i = n To c + n&lt;br /&gt;
            tabName = tvdata.Nodes(i).Text&lt;br /&gt;
            ' get field name&lt;br /&gt;
            rs = cn.Execute("SELECT * FROM [" &amp;amp; tabName &amp;amp; "]", 1, 1)&lt;br /&gt;
            For j = 0 To rs.Fields.Count - 1&lt;br /&gt;
                fldName = rs.Fields(j).Name&lt;br /&gt;
                fldNameNode = tvdata.Nodes.Add("X" &amp;amp; tabName, &lt;strong&gt;tvwChild,&lt;/strong&gt;&lt;span style="color: Red;"&gt;&lt;/span&gt; "X" &amp;amp; fldName, fldName, "imgField")&lt;br /&gt;
                fldNameNode.Tag = "Fields"&lt;br /&gt;
            Next j&lt;br /&gt;
            rs.Close()&lt;br /&gt;
        Next i&lt;br /&gt;
&lt;br /&gt;
        ' sort top nodes:&lt;br /&gt;
        tvdata.Nodes(1).Sorted = True&lt;br /&gt;
        '  collapse top node:&lt;br /&gt;
        tvdata.Nodes(1).Expanded = False&lt;br /&gt;
&lt;br /&gt;
        Cursor = Cursors.Default&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Private Sub tvData_Expand(ByVal Node As Node)&lt;br /&gt;
&lt;br /&gt;
        If Node.Tag = "RootDB" Then&lt;br /&gt;
            Node.Image = "DatabaseOpen"&lt;br /&gt;
        ElseIf Node.Tag = "Tables" Then&lt;br /&gt;
            Node.Image = "TableOpen"&lt;br /&gt;
        End If&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Private Sub tvData_Collapse(ByVal Node As Node)&lt;br /&gt;
&lt;br /&gt;
        If Node.Tag = "RootDB" Then&lt;br /&gt;
            Node.Image = "DatabaseClose"&lt;br /&gt;
        ElseIf Node.Tag = "Tables" Then&lt;br /&gt;
            Node.Image = "TableClose"&lt;br /&gt;
        End If&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    Private Sub tvData_NodeClick(ByVal Node As MSComctlLib.Node)&lt;br /&gt;
&lt;br /&gt;
        Dim nodTag As String&lt;br /&gt;
        Dim tabName As String&lt;br /&gt;
        Dim n As Integer&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
        nodTag = Node.Tag&lt;br /&gt;
&lt;br /&gt;
        If nodTag = "Tables" Then&lt;br /&gt;
            'if no Fields in Table&lt;br /&gt;
            If Node.Children = 0 Then Exit Sub&lt;br /&gt;
            'read Table name&lt;br /&gt;
            tabName = Node.Text&lt;br /&gt;
            'read Fields name&lt;br /&gt;
            n = Node.Child.FirstSibling.Index&lt;br /&gt;
            ColHeaders = Node.Child.FirstSibling.Text&lt;br /&gt;
&lt;br /&gt;
            Do Until n = Node.Child.LastSibling.Index&lt;br /&gt;
                ' string includes all Fields name&lt;br /&gt;
                ColHeaders = ColHeaders &amp;amp; ";" &amp;amp; tvdata.Nodes(n).Next.Text&lt;br /&gt;
                n = tvdata.Nodes(n).Next.Index&lt;br /&gt;
            Loop&lt;br /&gt;
&lt;br /&gt;
        End If&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I did not find a solution so far,&lt;br /&gt;
any help would be appriciated. I am using&lt;br /&gt;
VB studio 2008 in XP operating system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It sais the tvwchild is not declared&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413551/413551/urgent-solution-to-treeview/</guid>
      <pubDate>Tue, 16 Feb 2010 06:09:10 -0700</pubDate>
      <category>VB.NET</category>
    </item>
    <item>
      <title>ITS URGENT,DONT TAKING % SYMBOL IN TEXTBOX</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413467/413467/its-urgentdont-taking--symbol-in-textbox/</link>
      <description>'Coding for allowing numeric values,backspace and decimal point&lt;br /&gt;
        If Not IsNumeric(e.KeyChar) And Not e.KeyChar = Chr(8) And Not e.KeyChar = "." Then&lt;br /&gt;
            e.KeyChar = ""&lt;br /&gt;
Er:&lt;br /&gt;
            MsgBox(Err.Description = "Only Numeric values allowed", vbCritical, Title:="Only Numerical Values")&lt;br /&gt;
        End If&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//I want to add % symbol also to the text box.Then how can i modify my code.how can i divide the value with % symbol by 100.what is the string function to be used&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413467/413467/its-urgentdont-taking--symbol-in-textbox/</guid>
      <pubDate>Sun, 14 Feb 2010 23:49:57 -0700</pubDate>
      <category>VB.NET</category>
    </item>
  </channel>
</rss>