<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>VB.NET Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/Tag/1948/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to VB.NET.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 20:52:00 -0700</pubDate>
    <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>
    <item>
      <title>Re: Algorithm 2 - create program</title>
      <link>http://www.programmersheaven.com/mb/basic/418624/423698/ReadMessage.aspx#423698</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Josh+Code/"&gt;Josh Code&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/basic/418624/423698/ReadMessage.aspx#423698"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/basic/Board.aspx"&gt;Basic&lt;/a&gt; forum.&lt;/p&gt;No, I'm very sure it can not do a facebook application.&lt;br /&gt;
&lt;br /&gt;
I have not made a facebook app before but it can be done using Java.&lt;br /&gt;
&lt;br /&gt;
You can make software that interacts with facebook using various programming languages.  facebook offers software development kits(SDK) for languages including PHP, Python, JavaScript.  Any language that can use TCP/IP or HTTP can interact with facebook in some ways.&lt;br /&gt;
&lt;br /&gt;
Check this:&lt;br /&gt;
&lt;a href="https://developers.facebook.com/docs/?_fb_noscript=1"&gt;facebook developers&lt;/a&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/basic/418624/423698/ReadMessage.aspx#423698</guid>
      <pubDate>Sun, 08 May 2011 20:46:13 -0700</pubDate>
    </item>
    <item>
      <title>DataGridView</title>
      <link>http://www.programmersheaven.com/mb/VBNET/421502/421502/ReadMessage.aspx#421502</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Simple+Man/"&gt;Simple Man&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/421502/421502/ReadMessage.aspx#421502"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I've created a new datatable within my dataset.  It doesn't get updated from a data adapter or anything.  I just want to use this data table as a temp table used to print a Crystal Report.&lt;br /&gt;
&lt;br /&gt;
I've got code that will add a new record in to the data table.  After a dozen or so records are added, i've got a datagridview on the same form that will show me the inserted records.&lt;br /&gt;
&lt;br /&gt;
Now, after the insert and dgv shows data, I have another form open that has by CR on it and also a dgv...so I can see the data from the data table.  Well, I'm not showing any data on the report nor the dgv.  I've copied and made sure that the 2 dgv have the same "settings" but no go.&lt;br /&gt;
&lt;br /&gt;
Any suggestions why this is happening?&lt;br /&gt;
&lt;br /&gt;
Thanks.&lt;br /&gt;
&lt;br /&gt;
Nick</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/421502/421502/ReadMessage.aspx#421502</guid>
      <pubDate>Fri, 04 Feb 2011 14:45:40 -0700</pubDate>
    </item>
    <item>
      <title>Re: I am leaving the forum</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418073/421231/ReadMessage.aspx#421231</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/DrMarten/"&gt;DrMarten&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418073/421231/ReadMessage.aspx#421231"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418073/421231/ReadMessage.aspx#421231</guid>
      <pubDate>Mon, 24 Jan 2011 08:03:31 -0700</pubDate>
    </item>
    <item>
      <title>Re: Get Specific Element Value From XML String</title>
      <link>http://www.programmersheaven.com/mb/VBNET/420754/421149/ReadMessage.aspx#421149</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/420754/421149/ReadMessage.aspx#421149"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hey chrissyboy,&lt;br /&gt;
&lt;br /&gt;
Check out this forum thread for how to pass a string to the XMLReader object... &lt;a href="http://social.msdn.microsoft.com/Forums/eu/xmlandnetfx/thread/2aad018f-7af1-41c3-bfa1-8691eed0eb38"&gt;http://social.msdn.microsoft.com/Forums/eu/xmlandnetfx/thread/2aad018f-7af1-41c3-bfa1-8691eed0eb38&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You should be able to find ample  tutorials with a simple google search. If you are still having problems, you can email me directly (find my contact information in the Sticky Thread I stuck up top of this forum).&lt;br /&gt;
&lt;br /&gt;
Happy coding,&lt;br /&gt;
Sean Campbell - Firesickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/420754/421149/ReadMessage.aspx#421149</guid>
      <pubDate>Fri, 21 Jan 2011 14:55:05 -0700</pubDate>
    </item>
    <item>
      <title>Re: Declaring global variables and passing them to a sql query</title>
      <link>http://www.programmersheaven.com/mb/VBNET/421015/421148/ReadMessage.aspx#421148</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/421015/421148/ReadMessage.aspx#421148"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Normally, I would have suggested that. That creates variables at the Application level (a module works like a Static Class if that means anything to you)... &lt;br /&gt;
&lt;br /&gt;
However, I was providing you a SQL Solution so you could get the DateTime of the SQL Server rather than the Date Time of the computer that is executing the code.&lt;br /&gt;
&lt;br /&gt;
Happy Coding sir,&lt;br /&gt;
Sean Campbell - Firesickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/421015/421148/ReadMessage.aspx#421148</guid>
      <pubDate>Fri, 21 Jan 2011 14:52:35 -0700</pubDate>
    </item>
    <item>
      <title>Re: Validating numeric data in datagrid</title>
      <link>http://www.programmersheaven.com/mb/VBNET/420967/421147/ReadMessage.aspx#421147</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/420967/421147/ReadMessage.aspx#421147"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hey there, found you a solution directly on the MSDN! How lucky :).&lt;br /&gt;
&lt;br /&gt;
I modified their code ever so slightly to fit your code, but I added the link to the article for your sake.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
    Private Sub DataGridView1_CellValidating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellValidatingEventArgs) Handles Dg_bill.CellValidating
        Dim newInteger As Integer

        ' Don't try to validate the 'new row' until finished 
        ' editing since there
        ' is not any point in validating its initial value.

        'This checks if the current row is a new row and calls RETURN to exit the sub
        If Dg_bill.Rows(e.RowIndex).IsNewRow Then Return

        If Not Integer.TryParse(e.FormattedValue.ToString(), newInteger) Then
            e.Cancel = True
            MessageBox.Show("error aa gia je" &amp;amp; " at row:" &amp;amp; e.RowIndex.ToString())

            'Me.DataGridView1.Rows(e.RowIndex).ErrorText = "the value must be an integer"
        End If
    End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvalidating.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvalidating.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope that helps :)&lt;br /&gt;
Sean Campbell - FireSickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/420967/421147/ReadMessage.aspx#421147</guid>
      <pubDate>Fri, 21 Jan 2011 14:51:00 -0700</pubDate>
    </item>
    <item>
      <title>Re: Need Help</title>
      <link>http://www.programmersheaven.com/mb/VBNET/420822/421144/ReadMessage.aspx#421144</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/420822/421144/ReadMessage.aspx#421144"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Here is a great article on using Web Services with VB.Net - &lt;a href="http://www.codeguru.com/vb/vb_internet/webservices/article.php/c4813"&gt;http://www.codeguru.com/vb/vb_internet/webservices/article.php/c4813&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once the web reference is added to your project, you simply call the function as if it were code within your project.&lt;br /&gt;
&lt;br /&gt;
If you have further questions, feel free to reply to this thread.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/420822/421144/ReadMessage.aspx#421144</guid>
      <pubDate>Fri, 21 Jan 2011 14:38:28 -0700</pubDate>
    </item>
    <item>
      <title>Re: Visual Studio 2005 and visual Basic...</title>
      <link>http://www.programmersheaven.com/mb/VBNET/420888/421143/ReadMessage.aspx#421143</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/420888/421143/ReadMessage.aspx#421143"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I am not sure I understand your question? Perhaps you need to click "Show All Files" button at the top of your Solution Explorer to see those files again? (Hover your cursor over the buttons to see the Tool Tip of what they are)&lt;br /&gt;
&lt;br /&gt;
-Sean Campbell - Firesickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/420888/421143/ReadMessage.aspx#421143</guid>
      <pubDate>Fri, 21 Jan 2011 14:36:27 -0700</pubDate>
    </item>
    <item>
      <title>Re: Declaring global variables and passing them to a sql query</title>
      <link>http://www.programmersheaven.com/mb/VBNET/421015/421142/ReadMessage.aspx#421142</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/421015/421142/ReadMessage.aspx#421142"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hi doug,&lt;br /&gt;
&lt;br /&gt;
There are SQL Server functions that accomplish what you are trying to do, you can slip them directly into your SQL.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Look up: &lt;/strong&gt;&lt;br /&gt;
SQL GetDate()&lt;br /&gt;
and&lt;br /&gt;
SQL DateAdd(unit, number, date)&lt;br /&gt;
&lt;br /&gt;
For your case&lt;br /&gt;
replace @payperiodstartdate with GetDate()&lt;br /&gt;
and&lt;br /&gt;
replace @payperiodenddate with Dateadd(day,7,GetDate())&lt;br /&gt;
&lt;br /&gt;
Hope that helps.&lt;br /&gt;
&lt;br /&gt;
Otherwise you'd be having to manage changing that DateTime object in VB every time the function is called, and if you are doing that, it seems illogical to declare a global variable (since it technically is not going to have a value that is held statically for other operations to use, rather just memory space that is constantly reserved)&lt;br /&gt;
&lt;br /&gt;
Perhaps I misunderstood your question, please correct me if I am wrong,&lt;br /&gt;
Sean Campbell - Firesickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/421015/421142/ReadMessage.aspx#421142</guid>
      <pubDate>Fri, 21 Jan 2011 14:33:02 -0700</pubDate>
    </item>
    <item>
      <title>Re: How to create a custom Calendar/DateTimePicker control?</title>
      <link>http://www.programmersheaven.com/mb/VBNET/421067/421141/ReadMessage.aspx#421141</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/421067/421141/ReadMessage.aspx#421141"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hello Gadix1980,&lt;br /&gt;
&lt;br /&gt;
I am sorry I cannot be of more assistance teaching you to create this control, however I was able to uncover similar projects which have already been created and posted online.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Hijri Calendar&lt;/strong&gt;&lt;br /&gt;
&lt;a href="http://www.codeproject.com/KB/cs/HijriCalendar.aspx"&gt;http://www.codeproject.com/KB/cs/HijriCalendar.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Also, didn't research this more, but it looks like there is an object called System.Globalization.HijriCalendar which may work as a solution for you. Since it is from 2008, I assume it will work with XP.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Hebrew Calendar&lt;/strong&gt;&lt;br /&gt;
&lt;a href="http://www.hebcal.com/home/category/developers"&gt;http://www.hebcal.com/home/category/developers&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.dafaweek.com/HebCal/HebCal.html"&gt;http://www.dafaweek.com/HebCal/HebCal.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
Perhaps the code that is working fine on Server2008 would work in XP with some "massaging," have you gone down that route?&lt;br /&gt;
&lt;br /&gt;
-Sean Campbell -Firesickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/421067/421141/ReadMessage.aspx#421141</guid>
      <pubDate>Fri, 21 Jan 2011 14:21:53 -0700</pubDate>
    </item>
    <item>
      <title>Re: sum function</title>
      <link>http://www.programmersheaven.com/mb/VBNET/421035/421140/ReadMessage.aspx#421140</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/421035/421140/ReadMessage.aspx#421140"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hi O4ACig,&lt;br /&gt;
&lt;br /&gt;
I'm sorry but you have not provided enough information for me to give you a direct answer. I am certainly not an Access expert, but I may be able to help you if you can provide me a copy of your database. &lt;br /&gt;
&lt;br /&gt;
If this database contains sensitive information you don't want to share, Please post the full text of the error you are getting and any more information about the problem you are having for me to help.&lt;br /&gt;
&lt;br /&gt;
Please note that I stopped moderating this forum mid last year. A sticky thread I put up contains information on how to contact me outside of this forum. I will check back a few times next week for a response from you to make sure you get a good answer,&lt;br /&gt;
&lt;br /&gt;
-Sean Campbell -Firesickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/421035/421140/ReadMessage.aspx#421140</guid>
      <pubDate>Fri, 21 Jan 2011 14:14:57 -0700</pubDate>
    </item>
    <item>
      <title>Re: I am leaving the forum</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418073/421139/ReadMessage.aspx#421139</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418073/421139/ReadMessage.aspx#421139"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I came back today to see how the activity was in this forum. Apparently the owners of this site don't care enough about it to read my emails about removing me as the forum moderator.&lt;br /&gt;
&lt;br /&gt;
I made this thread sticky in hopes that you read this and don't waste your time. You can contact me directly (details on my website, firesickle.com) if you are looking for .Net assistance. I am no expert, but I just may be able to help you!&lt;br /&gt;
&lt;br /&gt;
100 mph...&lt;br /&gt;
Sean Campbell - Firesickle</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418073/421139/ReadMessage.aspx#421139</guid>
      <pubDate>Fri, 21 Jan 2011 14:08:30 -0700</pubDate>
    </item>
    <item>
      <title>ftp response timeout</title>
      <link>http://www.programmersheaven.com/mb/VBNET/420737/420737/ReadMessage.aspx#420737</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/James/"&gt;James&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/420737/420737/ReadMessage.aspx#420737"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hi all,&lt;br /&gt;
I have a Windows Service that uses ftp to query a folder on a remote server and download any files it finds there, deleting them afterward. It has been running without issue for well over a year until three weeks ago.&lt;br /&gt;
&lt;br /&gt;
Now there is an intermittent error. Periodically when it sends a port command, it hangs waiting for a response from the remote server.  According to the admin at the remote server, the command simply never arrives.&lt;br /&gt;
&lt;br /&gt;
This is legacy code from VB.Net 2003 recompiled in VS 2005.  Any help or ideas will be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
-James&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
    Public Overloads Function DownloadFile(ByVal RemoteFile As String, ByVal LocalFile As String, ByVal StreamMode As StreamModes, ByVal FileMode As DataConnection.FileModes, ByVal AppendFrom As Long) As Boolean
        SendCommand("TYPE " + Convert.ToChar(StreamMode))
        If Not CreateDataSocket(LocalFile, FileMode, DataConnection.StreamDirections.Download, AppendFrom) Then
            RaiseEvent CommandCompleted()
            Return False
        End If
        If Not (passiveTransfers) Then
            Dim MyEndPoint As IPEndPoint = dataSocket.GetLocalEndPoint()
            SendCommand("PORT " + MyEndPoint.Address.ToString.Replace(".", ",") + "," + CType(Math.Floor(MyEndPoint.Port / 256), Integer).ToString + "," + (MyEndPoint.Port Mod 256).ToString)
        End If
        If FileMode = DataConnection.FileModes.Append AndAlso AppendFrom &amp;gt; 0 Then
            SendCommand("REST " + AppendFrom.ToString)
        End If
        SendCommand("RETR " + RemoteFile)
        If lastResponseType &amp;lt;&amp;gt; 4 AndAlso lastResponseType &amp;lt;&amp;gt; 5 Then
            Try
                dataSocket.ReceiveFromSocket()
            Catch EX As Exception
                dataSocket.Close()
                WaitForResponse()
                RaiseEvent CommandCompleted()
                Return False
            End Try
            WaitForResponse()
        End If
        dataSocket.Close()
        RaiseEvent CommandCompleted()
        Return True
    End Function

Private Sub SendCommand(Command as String)
	Try
		clientSocket.Send(ASCII.GetBytes(Command + Convert.ToChar(13) + Convert.ToChar(10)))'ControlChars.CrLf))
		If Command.Length &amp;gt;= 4 AndAlso Command.SubString(0, 4).ToUpper.Equals("PASS") Then
	RaiseEvent CommandSent("PASS ********")
	Else
				RaiseEvent CommandSent(Command)
			End If
			WaitForResponse()
        Catch EX As Exception
            RaiseEvent ConnectionFailed()
            lastResponseNumber = 0
            lastResponseType = 0
            lastResponse = ""
            Throw EX
        End Try
	End Sub

	Private Sub WaitForResponse()
		If Not(isNowConnected) Then Exit Sub
		Dim tempBuffer(1023) as Byte
		Dim retBytes as Integer
		Dim retString as String = ""
		Do
			Try
				retBytes = clientSocket.Receive(tempBuffer)
            Catch EX As Exception
                WriteToMyEventLog(EX.Message &amp;amp; vbCrLf &amp;amp; EX.StackTrace, , EventLogEntryType.Error)
                'Throw EX
                Exit Do
            End Try
            retString = retString + ASCII.GetString(tempBuffer, 0, retBytes)
        Loop Until IsValidResponse(retString)
		lastResponse = retString
		If retString.Length &amp;gt;= 3 Then
			lastResponseNumber = Short.Parse(retString.Substring(0, 3))
		Else
			lastResponseNumber = 0
		End If
		lastResponseType = CType(Math.Floor(lastResponseNumber / 100), Short)
		RaiseEvent ReceivedReply(lastResponse, lastResponseNumber, lastResponseType)
	End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/420737/420737/ReadMessage.aspx#420737</guid>
      <pubDate>Tue, 04 Jan 2011 14:31:56 -0700</pubDate>
    </item>
    <item>
      <title>.xml database file protection</title>
      <link>http://www.programmersheaven.com/mb/VBNET/419877/419877/ReadMessage.aspx#419877</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/honest_dude/"&gt;honest_dude&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/419877/419877/ReadMessage.aspx#419877"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;i have this .xml file read and display at runtime by vb.net2003. the .xml file is the database which contain various data and its not for adding more data or edited by user so i need to protect the file so that my code can read and display those data. can anyone know how to protect the file.  If encrypted can i decrypt it inside my code so as to read by the program and extract information from the .xml file.&lt;br /&gt;
&lt;br /&gt;
I would be very grateful if anyone could help me on this.&lt;br /&gt;
&lt;br /&gt;
Zela</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/419877/419877/ReadMessage.aspx#419877</guid>
      <pubDate>Tue, 23 Nov 2010 01:58:59 -0700</pubDate>
    </item>
    <item>
      <title>web browser in vb.net2003</title>
      <link>http://www.programmersheaven.com/mb/VBNET/419353/419353/ReadMessage.aspx#419353</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/honest_dude/"&gt;honest_dude&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/419353/419353/ReadMessage.aspx#419353"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I could not find web browser component that i use to used in vb6 in vb.net 2003. does vb.net 2003 does not support the web browser component or i miss out some components or reference that need to setup in vb.net 2003.&lt;br /&gt;
&lt;br /&gt;
i do i run my program which have a web browser component in vb.net 2003 which i use in vb6 previously, any suggestion please.&lt;br /&gt;
&lt;br /&gt;
dude</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/419353/419353/ReadMessage.aspx#419353</guid>
      <pubDate>Wed, 27 Oct 2010 02:58:35 -0700</pubDate>
    </item>
    <item>
      <title>Re: Algorithm 2 - create program</title>
      <link>http://www.programmersheaven.com/mb/basic/418624/418709/ReadMessage.aspx#418709</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Josh+Code/"&gt;Josh Code&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/basic/418624/418709/ReadMessage.aspx#418709"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/basic/Board.aspx"&gt;Basic&lt;/a&gt; forum.&lt;/p&gt;It is based on a general mission lots of development environments are on; making products faster and easier to use.  &lt;br /&gt;
&lt;br /&gt;
Algorithm 2 seems pretty quick at making simple programs but probably lacks a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
Programs like that would probably become very popular similar to Game Maker if it helps more with developing other kinds of software of practical use.  Game Maker is popularized for similar reasons and there are many competing game development environments for non-programmers.&lt;br /&gt;
&lt;br /&gt;
Making programs without a programming language is something lots of products try but end up limited in doing.  Most of these products end up very specific in what they produce.  For example, Game Maker limits users to template based 2D and 3D games where the unique, user defined aspects of the program is limited to configuration and generating data used in the games.&lt;br /&gt;
&lt;br /&gt;
If you want some related information, look up visual programming, and &lt;a href="http://en.wikipedia.org/wiki/Visual_programming_language"&gt;visual programming language&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/basic/418624/418709/ReadMessage.aspx#418709</guid>
      <pubDate>Tue, 14 Sep 2010 09:30:01 -0700</pubDate>
    </item>
    <item>
      <title>Formatting text in richtextbox</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418705/418705/ReadMessage.aspx#418705</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/honest_dude/"&gt;honest_dude&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418705/418705/ReadMessage.aspx#418705"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I need to change the font color as well as italic and bold in my richtextbox which were read from .xml database, like whenever word like GOD is found it should display in bold and so on and other text as normal.&lt;br /&gt;
&lt;br /&gt;
Is there anyway i can do this. If there is a way kindly give an example with code.&lt;br /&gt;
&lt;br /&gt;
Thanks in advance&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418705/418705/ReadMessage.aspx#418705</guid>
      <pubDate>Tue, 14 Sep 2010 03:32:32 -0700</pubDate>
    </item>
    <item>
      <title>Re: Automatically leave a DataGridView Cell</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418385/418461/ReadMessage.aspx#418461</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/asponge/"&gt;asponge&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418385/418461/ReadMessage.aspx#418461"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Use the EditControlShowing event which is fired whenever the user begins editing a grid cell.  The event handler passes an EditControlEventArgs object which contains a Control property.  This is the control used to edit the cell data.  What you can do is register the TextChanged event on this control.  When the text changes, and two characters have been entered, then set the DataGridView.CurrentCell property to whatever cell you want to move to.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418385/418461/ReadMessage.aspx#418461</guid>
      <pubDate>Thu, 26 Aug 2010 22:09:35 -0700</pubDate>
    </item>
    <item>
      <title>Re: Multidimensional jagged array of strings...</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418178/418460/ReadMessage.aspx#418460</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/asponge/"&gt;asponge&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418178/418460/ReadMessage.aspx#418460"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Unless I missed something while reading your code you can do everything that code does with a simple generic string list.  I "cut my teeth" on C++ myself so I see what you're doing in that code, but none of that is necessary with VB.NET.   You can create a list of string objects to hold the errors without all the buffer business:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Dim errors As New List(Of String)()
errors.Add("Some Error")
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The List object will append whatever string you want to the collection and handle the memory management behind the scenes for you.  You don't have to allocate more memory space or limit yourself to a particular number of bytes.  You also don't have to free() or delete memory.  All of this is handled for you.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418178/418460/ReadMessage.aspx#418460</guid>
      <pubDate>Thu, 26 Aug 2010 21:48:32 -0700</pubDate>
    </item>
    <item>
      <title>Multidimensional jagged array of strings...</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418178/418178/ReadMessage.aspx#418178</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Sephiroth/"&gt;Sephiroth&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418178/418178/ReadMessage.aspx#418178"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Alright, I am working on a small class that I can reuse to log errors in my VB .NET applications, but am not sure how to achieve what is fairly easy for me in C++. I want to specify the maximum number of errors to log upon object initialization and then record class names and the errors they specify when errors occur, which will vary in length. Maybe some code will help.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Public Class errorClass
  Private iBufferSize, iErrorCount As Integer
  Private strBuffer()() As String

  ' Public method to initialize this object
  Public Function Initialize(ByRef iSize As Integer) As Boolean
    ' Verify that this object is not already initialized
    If Me.bInitialized Then Return False

    ' Validate the buffer size
    If iSize &amp;lt; 4 Or iSize &amp;gt; 1024 Then Return False

    ' Initialize the object and return
    Me.iBufferSize = iSize
    Me.iErrorCount = 0
    ReDim Me.strBuffer(Me.iBufferSize)
    Me.bInitialized = True
    Return True
  End Function

  ' Public method to add an error to the buffer
  Public Function AddError(ByRef objClass As Object, ByRef strValue As String) As Boolean
    Dim iLoop As Integer

    ' Purge the last error if the buffer is full
    If Me.iErrorCount = Me.iBufferSize Then
      Me.strBuffer(0) = Nothing
    End If

    ' Loop through and move each error up one level
    For iLoop = 1 To Me.iBufferSize Step 1
      Me.strBuffer(iLoop - 1) = Me.strBuffer(iLoop)
    Next iLoop

    ' Now add the new error
    Me.strBuffer(Me.iBufferSize - 1) = Nothing
    Me.strBuffer(Me.iBufferSize - 1) = New String() {strValue}

    ' Increment the error counter and return
    If Me.iErrorCount &amp;lt; Me.iBufferSize Then Me.iErrorCount += 1
    Return True
  End Function
End Class
&lt;/pre&gt;&lt;br /&gt;
Am I doing this the correct way for VB .NET? I am not sure if I am freeing the oldest error properly once the buffer is full, and I am not sure if I am freeing the new error position properly. I am used to using "free()" or "delete" depending on the situation in C or C++. I can't get used to the idea of memory magically freeing itself and it gives me hell in VB .NET...&lt;br /&gt;
-&lt;em&gt;&lt;strong&gt;&lt;span style="color: Red;"&gt;S&lt;/span&gt;&lt;span style="color: Purple;"&gt;e&lt;/span&gt;&lt;span style="color: Blue;"&gt;p&lt;/span&gt;&lt;span style="color: Green;"&gt;h&lt;/span&gt;&lt;span style="color: Red;"&gt;i&lt;/span&gt;&lt;span style="color: Purple;"&gt;r&lt;/span&gt;&lt;span style="color: Blue;"&gt;o&lt;/span&gt;&lt;span style="color: Green;"&gt;t&lt;/span&gt;&lt;span style="color: Red;"&gt;h&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418178/418178/ReadMessage.aspx#418178</guid>
      <pubDate>Wed, 04 Aug 2010 09:29:38 -0700</pubDate>
    </item>
    <item>
      <title>I am leaving the forum</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418073/418073/ReadMessage.aspx#418073</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418073/418073/ReadMessage.aspx#418073"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hey guys,&lt;br /&gt;
&lt;br /&gt;
It is time for me to part ways with Programmersheaven. I've been blessed with several good years of providing help and moderation in these forums. You can contact me directly if you are desperate for some help, you'll find my contact information at: &lt;a href="http://www.firesickle.com/contact.php"&gt;http://www.firesickle.com/contact.php&lt;/a&gt; Someday soon I will find a new home in a VB.Net forum, if you have any suggestions please contact me!&lt;br /&gt;
&lt;br /&gt;
Take care guys,&lt;br /&gt;
Good luck&lt;br /&gt;
Sean Campbell</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418073/418073/ReadMessage.aspx#418073</guid>
      <pubDate>Wed, 28 Jul 2010 11:01:26 -0700</pubDate>
    </item>
    <item>
      <title>Re: synchronizing Events</title>
      <link>http://www.programmersheaven.com/mb/VBNET/418008/418010/ReadMessage.aspx#418010</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/418008/418010/ReadMessage.aspx#418010"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I'm not expert. As far as I know:&lt;br /&gt;
If you raise an event, there is no way within that function to know if other routines Handle that event, and if those Handlers have completed. The only thing I can think of would be to set a global Boolean (possibly EventComplete = False) when you raise the event and have the specific function handling that event set "EventComplete = True" at the end.&lt;br /&gt;
&lt;br /&gt;
Hope that helps,&lt;br /&gt;
Cheers,&lt;br /&gt;
Sean Campbell</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/418008/418010/ReadMessage.aspx#418010</guid>
      <pubDate>Tue, 20 Jul 2010 13:58:26 -0700</pubDate>
    </item>
    <item>
      <title>Re: timer tick not working properly</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417988/418007/ReadMessage.aspx#418007</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417988/418007/ReadMessage.aspx#418007"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Question: Why are you using a Timer instead of:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
If (i = 1) Then
WebBrowser1.Document.GetElementById("username").SetAttribute("value", "elvin")
WebBrowser1.Document.GetElementById("password").SetAttribute("value", "1111111")
WebBrowser1.Document.GetElementById("wpt").InvokeMember("click")
i = 2
ElseIf (i = 2) Then
WebBrowser1.Document.GetElementById("title").SetAttribute("value", "elvin")
WebBrowser1.Document.GetElementById("content").SetAttribute("value", "111111")
WebBrowser1.Document.GetElementById("tags").SetAttribute("value", "fgddferre")
WebBrowser1.Document.GetElementById("publish").InvokeMember("click")
i = 3
WebBrowser1.Navigate("http://blogger.com")
ElseIf (i = 3) Then
Timer1.Stop()
WebBrowser1.Document.GetElementById("loginTextBlock_uname").SetAttribute("value", "elvin")
WebBrowser1.Document.GetElementById("loginTextBlock").SetAttribute("value", "11111")
WebBrowser1.Document.GetElementById("nowwhat").InvokeMember("click")
i = 4
ElseIf (i = 4) Then
WebBrowser1.Document.GetElementById("title").SetAttribute("value", "elvin")
WebBrowser1.Document.GetElementById("content").SetAttribute("value", "11111")
WebBrowser1.Document.GetElementById("tags").SetAttribute("value", "fghfghfgh")
WebBrowser1.Document.GetElementById("publish").InvokeMember("click")
i = 5
WebBrowser1.Navigate("http://www.yahoo.com/")
ElseIf (i = 5) Then
WebBrowser1.Document.GetElementById("user").SetAttribute("value", "rfgjhfhj")
WebBrowser1.Document.GetElementById("pass").SetAttribute("value", "566788989")
WebBrowser1.Document.GetElementById("wpt").InvokeMember("click")
i = 6
End If
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
My guess is that this has something to do with the Interval of the timer? In the amount of time it takes to load yahoo.com and have it complete the Timer ticks again and calls "WebBrowser1.Navigate" again, and runs in a continuous loop (basically never letting it finish loading).&lt;br /&gt;
&lt;br /&gt;
Whats your Timer1.Interval set to&lt;br /&gt;
Is Timer1.Enabled EqualTo True after you call .Stop() ? (I don't know what .Start() and .Stop() do on timers to be honest).&lt;br /&gt;
Did you throw a breakline inside of the Timer Tick event to see if that event was firing at all?&lt;br /&gt;
If TimerTick is getting called, what exactly is i set to when it's being called?&lt;br /&gt;
&lt;br /&gt;
I avoid Timers like I avoid the plague... I really don't see a purpose for using one here, but I might be missing part of the big picture.&lt;br /&gt;
&lt;br /&gt;
-Sean C - Forum Mod</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417988/418007/ReadMessage.aspx#418007</guid>
      <pubDate>Tue, 20 Jul 2010 11:48:59 -0700</pubDate>
    </item>
    <item>
      <title>Re: Issue Converting DataType (VSE 2010, .NET 4.0)</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417935/417939/ReadMessage.aspx#417939</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417935/417939/ReadMessage.aspx#417939"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I'm sorry, but I cannot figure out what the problem you are having is. Are you saying that the below code is crashing? Or that it isn't plotting the points as you'd like them to? Please restate your question and I would be glad to help you!&lt;br /&gt;
&lt;br /&gt;
Please.......&lt;br /&gt;
I'd like to steer you away from using the Val command. It's a command that was carried over from Old VB and has the potential to crash or just be heinous in general... Plus, your double convertin, first your using Val to take out bad input and convert to a number, then you convert to a double...&lt;br /&gt;
&lt;br /&gt;
I prefer this method of converting numbers from strings to numbers:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
strLine = sr.ReadLine()
While strLine IsNot Nothing
   strArray = strLine.Split(charArray)
   Dim dr As DataRow = dt.NewRow()
   For i As Integer = 0 To strArray.GetUpperBound(0)
      dr(i) = strArray(i).Trim()
      If dr(i) &amp;lt;&amp;gt; "" Then
         If isNumeric(dr(i)) Then 'Checks if the string is a number, returns true or false
            dr(i) = Double.Parse(dr(i)) 'Parses the String into a Double
         End If
      End If
   Next
   dt.Rows.Add(dr)
   strLine = sr.ReadLine()
End While
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
You could also use Double.TryParse(Byval String, ByRef Double) (returns a boolean to indicate failure or success)&lt;br /&gt;
&lt;br /&gt;
-Sean Campbell&lt;br /&gt;
-firesickle.com</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417935/417939/ReadMessage.aspx#417939</guid>
      <pubDate>Fri, 16 Jul 2010 12:51:14 -0700</pubDate>
    </item>
    <item>
      <title>Re: Datagrid query</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417854/417903/ReadMessage.aspx#417903</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417854/417903/ReadMessage.aspx#417903"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Marius, &lt;br /&gt;
&lt;br /&gt;
The code you provided should work in all frameworks. &lt;br /&gt;
&lt;br /&gt;
The only time a KeyPressed, KeyDown, or KeyUp event is handled, is when the object itself has Focus of the user input. For instance, if you set TextBox1_KeyPressed method to handle the Insert press, and you did have your cursor focus in that TextBox, it wouldn't handle any keyboard presses.&lt;br /&gt;
&lt;br /&gt;
That said, accepting keyboard commands gets pretty tricky when you have many elements on a form that can have focus.&lt;br /&gt;
&lt;br /&gt;
Smartshab,&lt;br /&gt;
&lt;br /&gt;
Try this: Add that same function to Form1_KeyPress event and see if it works for you.&lt;br /&gt;
&lt;br /&gt;
Maybe there is a better way to do what you want. Check out "context menus".&lt;br /&gt;
-Sean&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417854/417903/ReadMessage.aspx#417903</guid>
      <pubDate>Thu, 15 Jul 2010 14:03:53 -0700</pubDate>
    </item>
    <item>
      <title>Re: Microsoft Access and VB.NET Help</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417825/417848/ReadMessage.aspx#417848</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417825/417848/ReadMessage.aspx#417848"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;A common cause of "syntax invalid" when you are doing an Insert is because you have a Field that is also a reserved name in SQL. (Password is a reserved SQL keyword). In these cases you must surround the field name with '[' and ']' brackets.&lt;br /&gt;
&lt;br /&gt;
Try this:&lt;br /&gt;
&lt;br /&gt;
"INSERT INTO useraccess (FirstName, Surname, IDNumber, [UserState], [UserLevel], [Username], [Password]) VALUES ('" &amp;amp; txtFirstName.Text &amp;amp; "', '" &amp;amp; txtSurname.Text &amp;amp; "', " &amp;amp; txtIDNumber.Text &amp;amp; ", '" &amp;amp; cboUserState.Text &amp;amp; "', '" &amp;amp; cboUserLevel.Text &amp;amp; "', '" &amp;amp; txtUsername.Text &amp;amp; "', '" &amp;amp; txtConfirmPassword.Text &amp;amp; "')"&lt;br /&gt;
&lt;br /&gt;
I surrounded your field names that are suspect, and I added some spacing in there to separate fields.&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
-Sean Campbell</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417825/417848/ReadMessage.aspx#417848</guid>
      <pubDate>Tue, 13 Jul 2010 13:48:05 -0700</pubDate>
    </item>
    <item>
      <title>Re: Treeview Control in Vb.net</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417765/417846/ReadMessage.aspx#417846</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417765/417846/ReadMessage.aspx#417846"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Don't have time to write any up for you myself, but I found these:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.java2s.com/Code/VB/GUI/UsingaTreeViewtodisplaythedirectorystructure.htm"&gt;http://www.java2s.com/Code/VB/GUI/UsingaTreeViewtodisplaythedirectorystructure.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.dreamincode.net/code/snippet2052.htm"&gt;http://www.dreamincode.net/code/snippet2052.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
(great Q/A about directory listing) &lt;a href="http://www.codeguru.com/forum/archive/index.php/t-417770.html"&gt;http://www.codeguru.com/forum/archive/index.php/t-417770.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
Sean Campbell</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417765/417846/ReadMessage.aspx#417846</guid>
      <pubDate>Tue, 13 Jul 2010 12:42:20 -0700</pubDate>
    </item>
    <item>
      <title>Re: Embed Micosoft Word in Vb.net</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417681/417734/ReadMessage.aspx#417734</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417681/417734/ReadMessage.aspx#417734"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;&lt;a href="http://www.java2s.com/Tutorial/VB/0440__Windows/EditWorddocument.htm"&gt;http://www.java2s.com/Tutorial/VB/0440__Windows/EditWorddocument.htm&lt;/a&gt;&lt;br /&gt;
--In the above link, the poster demonstrates how to replace text inside of a word document and save those changes&lt;br /&gt;
&lt;br /&gt;
You open the object the same way as the prior links, but he actually performs actions on the Document object to make changes.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/de-de/library/microsoft.office.interop.word._document_members%28office.11%29.aspx"&gt;http://msdn.microsoft.com/de-de/library/microsoft.office.interop.word._document_members%28office.11%29.aspx&lt;/a&gt;&lt;br /&gt;
--In the MSDN link, you have visibility into all of the available members and methods of the Document object&lt;br /&gt;
&lt;br /&gt;
That's the best I can do for you.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417681/417734/ReadMessage.aspx#417734</guid>
      <pubDate>Thu, 08 Jul 2010 05:33:10 -0700</pubDate>
    </item>
    <item>
      <title>Re: Deployment of Vb.net application</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417680/417733/ReadMessage.aspx#417733</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417680/417733/ReadMessage.aspx#417733"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;There is no way to write back to a CD, so the actual installer itself won't know how many computers it is being installed on. In order to do that, you would have to:&lt;br /&gt;
&lt;br /&gt;
A) Give a unique CD-Key for every copy of the CD&lt;br /&gt;
B) Once the software is installed, have it connect to a server to "activate" (like windows does).&lt;br /&gt;
C) You'd have to be able to grab and send unique computer information to track and compare when software is being reinstalled on a PC&lt;br /&gt;
D) The server can tell how many times you have installed the software based on how many times it has activated.&lt;br /&gt;
E) Once it activates you can use the software, if it fails then you cannot use the software.&lt;br /&gt;
-----------------&lt;br /&gt;
In this case, you require the user to have an Internet connection to use your software, regardless of whether or not the software's regular functionality requires it. Most PC users in the United States have internet access, but it's something to think about while you consider your audience for your software.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417680/417733/ReadMessage.aspx#417733</guid>
      <pubDate>Thu, 08 Jul 2010 05:23:25 -0700</pubDate>
    </item>
    <item>
      <title>Re: Embed Micosoft Word in Vb.net</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417681/417717/ReadMessage.aspx#417717</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417681/417717/ReadMessage.aspx#417717"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;These two articles discussing adding reference's to the Office packages in your Visual Studio project.&lt;br /&gt;
&lt;br /&gt;
The vbdotnetheaven one has a downloadable sample.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.vbdotnetheaven.com/Uploadfile/mgold/WordDocument04182005081441AM/WordDocument.aspx"&gt;http://www.vbdotnetheaven.com/Uploadfile/mgold/WordDocument04182005081441AM/WordDocument.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
http://www.builderau.com.au/program/dotnet/soa/Easily-utilise-Microsoft-Word-functionality-in-your-NET-application/0,339028399,339198903,00.htm&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
Sean C - forum mod</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417681/417717/ReadMessage.aspx#417717</guid>
      <pubDate>Wed, 07 Jul 2010 07:17:16 -0700</pubDate>
    </item>
    <item>
      <title>Re: Deployment of Vb.net application</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417680/417716/ReadMessage.aspx#417716</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417680/417716/ReadMessage.aspx#417716"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;1) You are never going to get away from people making Copies of your CD's. Even if you spent thousands of dollars for research and development to get a technique that would, some young-punk out there is still going to find a way around it.&lt;br /&gt;
&lt;br /&gt;
2) You cannot write back to the CD once the program is installed on a PC. So the CD itself (and the installer contained there-in) wouldn't know how many computer's it has been installed on. To get around this, you'd have to use a method to track when the software has been installed on a computer. In all cases, this is going to force the user to have to have the internet in order to install and the installer will have to send unique Computer information to track about the persons PC. If you allow them to by-pass that when they don't have the internet, then you provide them with a work around for installing on multiple computers which defeats the purpose of what you are doing.&lt;br /&gt;
----------------&lt;br /&gt;
&lt;br /&gt;
Users almost always feel burdened by copyright restrictions. The more you impose, the more likely that a user will hate your software before he even gets to use it. Even having to enter a CD-key is a burden. If your software never has a need to use the internet, rethink your desire to add copy protection to your deployment.&lt;br /&gt;
-----------&lt;br /&gt;
There are many ways to tackle this topic, no one is going to be a best fit, but knowing what is practical and what is not is more than half of the battle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-Sean Campbell</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417680/417716/ReadMessage.aspx#417716</guid>
      <pubDate>Wed, 07 Jul 2010 07:12:51 -0700</pubDate>
    </item>
    <item>
      <title>Re: Include File Issue</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417551/417553/ReadMessage.aspx#417553</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Midwest_Tech/"&gt;Midwest_Tech&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417551/417553/ReadMessage.aspx#417553"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Never mind, I got it figured out. &lt;br /&gt;
&lt;br /&gt;
It was a file permission issue after all. I changed the permissions on the file, set it to always copy and it is now working.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417551/417553/ReadMessage.aspx#417553</guid>
      <pubDate>Tue, 29 Jun 2010 15:06:44 -0700</pubDate>
    </item>
    <item>
      <title>Include File Issue</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417551/417551/ReadMessage.aspx#417551</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/Midwest_Tech/"&gt;Midwest_Tech&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417551/417551/ReadMessage.aspx#417551"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I am trying to include a (sqlbackup).bak file in my project for deployment.&lt;br /&gt;
&lt;br /&gt;
I am able to include the file just fine, but If i run an sql script in code to restore a database from it, I get an access denied error.&lt;br /&gt;
&lt;br /&gt;
Just to double check my code, I referenced the file directly (without including it in the project) and i was able to use it just fine.&lt;br /&gt;
&lt;br /&gt;
Any idea how to get around this? I really need to be able to include this file so it deploys with the application.&lt;br /&gt;
&lt;br /&gt;
Here's a sample of the code that will be accessing the file (CleanDB.bak is the file in question).....&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;Dim con As New SqlConnection
Dim cmd As New SqlCommand

con.ConnectionString = My.Settings.ConnectionString
con.Open()
cmd.Connection = con

sql = "CREATE DATABASE " &amp;amp; DBName
cmd.CommandText = sql
cmd.ExecuteNonQuery()

sql = "RESTORE DATABASE " &amp;amp; DBName &amp;amp; " FROM DISK = N'" &amp;amp; Application.StartupPath &amp;amp; "\CleanDB.bak' WITH FILE = 1, MOVE N'" &amp;amp; DBName &amp;amp; "' TO N'" &amp;amp; DBPath &amp;amp; "',REPLACE"
cmd.CommandText = sql
cmd.ExecuteNonQuery()
con.Close()&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417551/417551/ReadMessage.aspx#417551</guid>
      <pubDate>Tue, 29 Jun 2010 14:45:03 -0700</pubDate>
    </item>
    <item>
      <title>Re: VB.NET 2003 and XML database</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417416/417439/ReadMessage.aspx#417439</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417416/417439/ReadMessage.aspx#417439"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;When I went back to view that article, it told me you needed to sign up to read it. I didn't realize I was logged in when I viewed it. Here is another article that is more specific to encrypting XML data:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://dotnetslackers.com/articles/xml/xmlencryption.aspx"&gt;http://dotnetslackers.com/articles/xml/xmlencryption.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Sorry about that,&lt;br /&gt;
Sean C</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417416/417439/ReadMessage.aspx#417439</guid>
      <pubDate>Thu, 24 Jun 2010 07:57:14 -0700</pubDate>
    </item>
    <item>
      <title>Re: VB.NET 2003 and XML database</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417416/417437/ReadMessage.aspx#417437</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417416/417437/ReadMessage.aspx#417437"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Here is an article that teaches you to Encrypt and decrypt things in VB.Net, enjoy&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.devx.com/security/Article/7019"&gt;http://www.devx.com/security/Article/7019&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
-Sean C</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417416/417437/ReadMessage.aspx#417437</guid>
      <pubDate>Thu, 24 Jun 2010 06:07:40 -0700</pubDate>
    </item>
    <item>
      <title>VB.NET 2003 and XML database</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417416/417416/ReadMessage.aspx#417416</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/honest_dude/"&gt;honest_dude&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417416/417416/ReadMessage.aspx#417416"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hi guys,&lt;br /&gt;
I have made this small database type software using vb.net 2003 and it use .xml database. I need to decrypt this .xml file so that the data could not be manipulate/change by the user. Can anyone give suggestion in encryption and decryption of my database so that it will be well protected.&lt;br /&gt;
&lt;br /&gt;
Any suggestion and help will be highly appreciated.&lt;br /&gt;
&lt;br /&gt;
Zela</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417416/417416/ReadMessage.aspx#417416</guid>
      <pubDate>Thu, 24 Jun 2010 01:51:42 -0700</pubDate>
    </item>
    <item>
      <title>Re: Serial Port Communication through weigh scale machine</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417371/417383/ReadMessage.aspx#417383</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417371/417383/ReadMessage.aspx#417383"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I'm guessing that when you switch the Scale off it loses it's connection with the computer. If you want to resolve this, I would add a "Reconnect to Scale" button on your form which forces the Serial connection off and re-establishes it. There may be no way for your software to know that it lost it's connection with the scale.&lt;br /&gt;
&lt;br /&gt;
I capture scale data in a Custom Shop Floor inventory system. It uses a "thread" (similar to a timer) to repetitively check the connection status of all of our connected RS232 devices and re-establish connections to them, or retrieve the data that they have scanned/weighed. That's how we are handling it, but it may not be practical in your situation.&lt;br /&gt;
&lt;br /&gt;
Hope that helps,&lt;br /&gt;
Sean C - forum mod</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417371/417383/ReadMessage.aspx#417383</guid>
      <pubDate>Tue, 22 Jun 2010 06:14:05 -0700</pubDate>
    </item>
    <item>
      <title>Re: date in datagridview</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417228/417257/ReadMessage.aspx#417257</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417228/417257/ReadMessage.aspx#417257"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Database Date fields cannot store Null values. That is why it comes in with a Year 1900.&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
Sean C</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417228/417257/ReadMessage.aspx#417257</guid>
      <pubDate>Wed, 16 Jun 2010 10:07:46 -0700</pubDate>
    </item>
    <item>
      <title>Re: Windows forms: Right click doesn't when form is opened inside pa</title>
      <link>http://www.programmersheaven.com/mb/VBNET/417071/417090/ReadMessage.aspx#417090</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/417071/417090/ReadMessage.aspx#417090"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;It's most likely that the Subroutine that loads the Form from the context menu (right-click menu) is initializing the context menu for your Right-Side-Panel form and that the linkbutton you have is not doing that. Or, at the least, the two sets of code are not exactly the same.&lt;br /&gt;
&lt;br /&gt;
Without you posting any code, That is the most help I can offer you.&lt;br /&gt;
-Sean Campbell&lt;br /&gt;
vb.net forum mod</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/417071/417090/ReadMessage.aspx#417090</guid>
      <pubDate>Tue, 08 Jun 2010 06:12:10 -0700</pubDate>
    </item>
    <item>
      <title>Re: Conversion to double</title>
      <link>http://www.programmersheaven.com/mb/VBNET/413366/416868/ReadMessage.aspx#416868</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/DrMarten/"&gt;DrMarten&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/413366/416868/ReadMessage.aspx#416868"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;This post has been deleted.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/413366/416868/ReadMessage.aspx#416868</guid>
      <pubDate>Sun, 30 May 2010 19:56:32 -0700</pubDate>
    </item>
    <item>
      <title>Re: Need Advice</title>
      <link>http://www.programmersheaven.com/mb/VBNET/416653/416722/ReadMessage.aspx#416722</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/416653/416722/ReadMessage.aspx#416722"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;&lt;pre class="sourcecode"&gt;
&lt;em&gt;thushara says&lt;/em&gt;
I am a beginner in .net. I have certain doubts regarding datagrid in .net. Is it possible to do calculation in datagrid. 

In datagridviewcomboboxcolumn how can we do selectedindexcahnged event.

In my form i have cerain controls and one datagrid during the lostfocus of certain controls it is doinng some calculation and when i click ok button, it will come to datagrid.

Now my requirement is to do same calculation in the datagrid also. 

So that I directly entered in the datagrid, it will do the same calculation. is it possible.?? 

can anybody help me in this giving some good ideas, or name of the site&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://windows-tech.info/3/37cffc23001984bc.php"&gt;http://windows-tech.info/3/37cffc23001984bc.php&lt;/a&gt; - The solution provided to this guy's question suggests that you cannot capture the SelectedIndexChanged&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://p2p.wrox.com/net-framework-2-0/41774-datagridview-combobox-column.html"&gt;http://p2p.wrox.com/net-framework-2-0/41774-datagridview-combobox-column.html&lt;/a&gt; - The solution provided here, in c#, demonstrates how to work around this and know when Values are changed in a combobox&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
Sean Campbell</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/416653/416722/ReadMessage.aspx#416722</guid>
      <pubDate>Tue, 25 May 2010 07:28:29 -0700</pubDate>
    </item>
    <item>
      <title>Re: datagrid view help</title>
      <link>http://www.programmersheaven.com/mb/VBNET/416687/416721/ReadMessage.aspx#416721</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/416687/416721/ReadMessage.aspx#416721"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Hey, Just so you know, this is a VB.Net forum and your question is more related to ASP.Net... Here's a possible solution:&lt;br /&gt;
&lt;br /&gt;
You didn't call the DataBind() routine that populates the object with all of the data you just set to the dataSource. Try this code, read the comments as well:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
'Make sure you are not declaring global variables in ASP.Net
'Global variables are global across all Sessions accessing the page
'and very odd bugs will occur once the applications goes into
'use or beta-testing...

'If you need a global variable, use Session variables
Dim myDataTable As New DataTable
Dim strSQL As String

strSQL = "select Pin from Credentials where Gpa &amp;gt; " &amp;amp; txtSearch.Text &amp;amp; ""

Dim conConnection As New OleDbConnection
conConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=" &amp;amp; System.AppDomain.CurrentDomain.BaseDirectory() &amp;amp; "\App_Data\sh.mdb"
conConnection.Open()

Dim myDataAdapter As New OleDbDataAdapter(strSQL, conConnection)

myDataAdapter.Fill(myDataTable)
grdoutput.DataSource = myDataTable
'This routine will cause grdoutput to fille in it's row data
'from the data in DataSource
grdoutput.DataBind()

conConnection.Close()
myDataAdapter.Dispose()
End Sub

&lt;/pre&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/416687/416721/ReadMessage.aspx#416721</guid>
      <pubDate>Tue, 25 May 2010 07:19:33 -0700</pubDate>
    </item>
    <item>
      <title>Re: Urgent DataGridViewComboBoxColumn</title>
      <link>http://www.programmersheaven.com/mb/VBNET/416549/416575/ReadMessage.aspx#416575</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/416549/416575/ReadMessage.aspx#416575"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Lets see if I understand this correctly.&lt;br /&gt;
&lt;br /&gt;
You want to update a database (or some other datasource) with changes that you made to a Row in a DataGridView? In other words, you have a comboBox that populates based on some values. You can then change that comboBox and click "OK" to submit the changes?</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/416549/416575/ReadMessage.aspx#416575</guid>
      <pubDate>Wed, 19 May 2010 05:39:08 -0700</pubDate>
    </item>
    <item>
      <title>Re: ListView Updation</title>
      <link>http://www.programmersheaven.com/mb/VBNET/416482/416522/ReadMessage.aspx#416522</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/416482/416522/ReadMessage.aspx#416522"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;You can edit All Row and Column data for a ListView in code:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.columns%28v=VS.71%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.columns%28v=VS.71%29.aspx&lt;/a&gt; &lt;br /&gt;
- Information about the Columns member of Listview - Used to Add/Manage the available columns and column information for your listview&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.items%28v=VS.71%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.items%28v=VS.71%29.aspx&lt;/a&gt; &lt;br /&gt;
- Information about the Items member of the Listview - Used to Add/Manage row data and access specific row values</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/416482/416522/ReadMessage.aspx#416522</guid>
      <pubDate>Mon, 17 May 2010 08:28:35 -0700</pubDate>
    </item>
    <item>
      <title>Re: database query</title>
      <link>http://www.programmersheaven.com/mb/VBNET/416341/416345/ReadMessage.aspx#416345</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/416341/416345/ReadMessage.aspx#416345"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;SELECT Car.*, B.Qty FROM &lt;br /&gt;
(SELECT Carno, SUM(Qty) AS Qty FROM Sales GROUP BY CarNo) AS B&lt;br /&gt;
INNER JOIN Car ON B.CarNo = Car.CarNo&lt;br /&gt;
ORDER BY B.Qty Desc&lt;br /&gt;
&lt;br /&gt;
This will return all of the car's and their respective total sales in order of Most sold to least sold. The first record should be the most Quantity sold car.&lt;br /&gt;
-Sean</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/416341/416345/ReadMessage.aspx#416345</guid>
      <pubDate>Tue, 11 May 2010 10:51:42 -0700</pubDate>
    </item>
    <item>
      <title>Re: How to hide a Column in a gridview, Visual Web Developer</title>
      <link>http://www.programmersheaven.com/mb/VBNET/416320/416327/ReadMessage.aspx#416327</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/416320/416327/ReadMessage.aspx#416327"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;FYI, this is a VB.Net forum here, there is a seperate ASP.Net forum where you can go to ask web questions... Since I am too lazy to reassign this to anothre forum... here's your answer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
RowDataBound is called for each row. &lt;br /&gt;
Only ONE row will have the edit state set, and the rest will be normal. &lt;br /&gt;
Switching columns to Visible or Not Visible is not row specific, in other words you cannot just show a column for one row and not for the others. &lt;br /&gt;
Therefore, the last row to call "RowDataBound" has the "lasting" effect of whether that column is visible or not.&lt;br /&gt;
&lt;br /&gt;
What I normally do:&lt;br /&gt;
If I have an "Actions" column that allows me to to perform actions such as "Save, Edit, Delete, Open" I will add all of the controls that I want there WITH VISIBLE SET TO FALSE... On RowDataBound I check the state of the row and get the control's from that row and set them to Visible = True. Like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound

If e.Row.RowState = DataControlRowState.Edit Then
    Dim saveBtn As ImageButton
    saveBtn = e.Row.FindControl("btnGridViewSave")
    saveBtn .Visible = True

    Dim cancelBtn As ImageButton
    cancelBtn = e.Row.FindControl("btnGridViewCancel")
    cancelBtn .Visible = True
ElseIf e.Row.RowState = DataControlRowState.Normal Then
    Dim deleteBtn As ImageButton
    deleteBtn = e.Row.FindControl("btnGridViewDelete")
    deleteBtn.Visible = True
End If

End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
In this example I have 3 controls inside the rows, btnGridViewDelete, btnGridViewSave, and btnGridViewEdit that have Visible = False. Whenever data binds to the control, it checks each row's state to see if it is in edit mode and sets the Edit Save And Cancel button's Visibility accordingly.&lt;br /&gt;
&lt;br /&gt;
Hope this helps,&lt;br /&gt;
Sean C</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/416320/416327/ReadMessage.aspx#416327</guid>
      <pubDate>Tue, 11 May 2010 05:32:37 -0700</pubDate>
    </item>
    <item>
      <title>Re: how to run aggregate function in expression</title>
      <link>http://www.programmersheaven.com/mb/VBNET/416298/416312/ReadMessage.aspx#416312</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/416298/416312/ReadMessage.aspx#416312"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I don't see anything wrong with the code. &lt;br /&gt;
&lt;br /&gt;
What line is it saying that information about? Is it saying that in the IDE as an error or warning? Is that message instead an Exception that is thrown at runtime when you click that button?&lt;br /&gt;
&lt;br /&gt;
If it is being thrown at run-time, I expect the error is in regards to your Select Statement being invalid. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;select * from car where carno=(select carno from sales where sum(num)=(select max(sum(num)) from sales group by carno) group by carno)&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I have a feeling this SQL Statement is very wrong... I don't see where 'num' is queried or aliased in the statement, yet you call SUM() against it a bunch of time... You should test that SQL Query inside of the Database Management Tool (looks like your using an Access DB based on the object you chose, so run that query through Access). If the Query works there, it should work through code, so as a general rule of thumb, I test my SQL Queries through a SQL Management Client before I stick them into code.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
After analyzing your statement, I cannot find any logical reason why you have constructed it this way, without more knowledge about how your data is structured I cannot rewrite it for you.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
It should look more like this:
SELECT CarNo FROM Car WHERE CarNo = (SELECT Sum(Num) as SumNum, CarNo From Sales WHERE SumNum = (SELECT CarNo, MAX(SUM(Num)) as MaxSum FROM Sales GROUP BY CarNo, MaxSum) GROUP BY CarNo, SumNum)

Notes:
SUM of a field is called in the Select portion of the statement, and no anywhere else (in your case you call it as a function inside of the Where Condition Declarations, which won't work.

SUM'd fields need an Alias (AS SumNum aliases the field as SumNum and you can see that I reference that Field Alias later in the statement)

GROUP BY clause requires ALL FIELDS IN THE SELECT DECLARATION to be grouped on, or the statement will fail. Therefore, I have to Group on SumNum and MaxSum in the two associated Select statements because they were "selected" as returned fields

I am not even sure if the statement would work at all even if I did know your data structure... I suggest posting the Data schema of your database (what fields are in each table, which field is the primary key, and what fields are foreign keys for Relational Data purposes) and a word description of what data you are trying to Select from the database and we can go from there.


&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/416298/416312/ReadMessage.aspx#416312</guid>
      <pubDate>Mon, 10 May 2010 10:51:46 -0700</pubDate>
    </item>
    <item>
      <title>Re: Picture in TextBox background</title>
      <link>http://www.programmersheaven.com/mb/VBNET/415930/416202/ReadMessage.aspx#416202</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/415930/416202/ReadMessage.aspx#416202"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;Believe it or not, I have never deployed software through an installer package. &lt;br /&gt;
&lt;br /&gt;
Sometimes, When I install a new piece of software, it checks for .Net Framework and will install the necessary version of .Net if it isn't already installed. So I assume that this is do-able, I will look around for more information on this subject for you.&lt;br /&gt;
&lt;br /&gt;
-Sean Campbell</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/415930/416202/ReadMessage.aspx#416202</guid>
      <pubDate>Thu, 06 May 2010 08:22:35 -0700</pubDate>
    </item>
    <item>
      <title>Re: Picture in TextBox background</title>
      <link>http://www.programmersheaven.com/mb/VBNET/415930/416159/ReadMessage.aspx#416159</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/seancampbell/"&gt;seancampbell&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/415930/416159/ReadMessage.aspx#416159"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;&lt;a href="http://www.firesickle.com/files/AlphaBlendTextboxvb.zip"&gt;http://www.firesickle.com/files/AlphaBlendTextboxvb.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I converted the source files for the textbox to VB and included a form with an example of adding the Textbox dynamically on the load function.&lt;br /&gt;
&lt;br /&gt;
Looking at the original project, you could choose to include the DLL compiled from C# and use that in a VB Project (there is an example in the original Source project from the codeproject link I sent) in case you prefer to use the original.&lt;br /&gt;
&lt;br /&gt;
I used a code converter here: &lt;a href="http://www.developerfusion.com/tools/convert/csharp-to-vb/"&gt;http://www.developerfusion.com/tools/convert/csharp-to-vb/&lt;/a&gt; to convert the source in both win32.cs and AlphaTextBox.cs (I had to change a couple things after I converted it to get it to run, namely changing UInteger to Integer and removing the Namespace declaration)&lt;br /&gt;
&lt;br /&gt;
Happy coding, let me know when you download that so I can remove it from my server</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/415930/416159/ReadMessage.aspx#416159</guid>
      <pubDate>Wed, 05 May 2010 05:51:01 -0700</pubDate>
    </item>
    <item>
      <title>Re: Picture in TextBox background</title>
      <link>http://www.programmersheaven.com/mb/VBNET/415930/416149/ReadMessage.aspx#416149</link>
      <description>&lt;p&gt;&lt;a href="http://www.programmersheaven.com/user/honest_dude/"&gt;honest_dude&lt;/a&gt; posted a &lt;a href="http://www.programmersheaven.com/mb/VBNET/415930/416149/ReadMessage.aspx#416149"&gt;reply&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/VBNET/Board.aspx"&gt;VB.NET&lt;/a&gt; forum.&lt;/p&gt;I am using vb.net 2003 and .xml as database, i am still waiting seancampbell help here&lt;br /&gt;
&lt;br /&gt;
zela.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/VBNET/415930/416149/ReadMessage.aspx#416149</guid>
      <pubDate>Tue, 04 May 2010 23:38:12 -0700</pubDate>
    </item>
  </channel>
</rss>