<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The VB.NET-MySQL Tutorial &#8211; Part 4</title>
	<atom:link href="http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vbmysql.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Fri, 07 Jan 2011 12:23:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Dennis</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-515</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Sun, 21 Nov 2010 14:12:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-515</guid>
		<description># Dennis Says:
November 21st, 2010 at 1:55 pm

Hello, i find your article very helpful to like me who is starting to do the programming.
I am stuck right now with connecting to database at the frmMain – its prompting access denied PASSWORD: No.
I did remove my password in mysql in attempting to connect but still not working.
Appreciate your help on this.
Many thanks.

Hi further to my above query. I find it better to send you my codes:

Imports MySql.Data.MySqlClient
Imports System.Data

Public Class FrmMain
    Private myConnString As String
    Private myUserID As Integer

    Public WriteOnly Property connectionString() As String
        Set(ByVal value As String)
            myConnString = value
        End Set
    End Property
    Private Sub cmdRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRefresh.Click
        Dim conn As New MySqlConnection
        Dim myCommand As New MySqlCommand
        Dim myAdapter As New MySqlDataAdapter
        Dim myData As New DataTable
        Dim SQL As String

        SQL = &quot;SELECT CONCAT(u.lastname, &#039;, &#039;, u.firstname) AS Name, s.message AS Message, &quot; _
        &amp; &quot;DATE_FORMAT(e.timestamp,&#039;%b %d %Y - %r&#039;) AS DateTime, e.status AS Status &quot; _
        &amp; &quot;FROM event e LEFT JOIN status s ON e.message_id = s.message_id, user u &quot; _
        &amp; &quot;WHERE(e.user_id = u.user_id) &quot; _
        &amp; &quot;AND event_id IN( &quot; _
        &amp; &quot;SELECT MAX(e.event_id) &quot; _
        &amp; &quot;FROM event e &quot; _
        &amp; &quot;GROUP BY e.user_id) &quot; _
        &amp; &quot;ORDER BY name&quot;

        conn.ConnectionString = myConnString

        Try
            conn.Open()

            Try
                myCommand.Connection = conn
                myCommand.CommandText = SQL

                myAdapter.SelectCommand = myCommand
                myAdapter.Fill(myData)

                dgvStatus.DataSource = myData
                dgvStatus.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells

            Catch myerror As MySqlException
                MsgBox(&quot;There was an error reading from the database: &quot; &amp; myerror.Message)

            End Try

        Catch myerror As MySqlException
            MessageBox.Show(&quot;Error Connecting to Database: &quot; &amp; myerror.Message)
        Finally
            If conn.State  ConnectionState.Closed Then conn.Close()
        End Try

    End Sub
End Class</description>
		<content:encoded><![CDATA[<p># Dennis Says:<br />
November 21st, 2010 at 1:55 pm</p>
<p>Hello, i find your article very helpful to like me who is starting to do the programming.<br />
I am stuck right now with connecting to database at the frmMain – its prompting access denied PASSWORD: No.<br />
I did remove my password in mysql in attempting to connect but still not working.<br />
Appreciate your help on this.<br />
Many thanks.</p>
<p>Hi further to my above query. I find it better to send you my codes:</p>
<p>Imports MySql.Data.MySqlClient<br />
Imports System.Data</p>
<p>Public Class FrmMain<br />
    Private myConnString As String<br />
    Private myUserID As Integer</p>
<p>    Public WriteOnly Property connectionString() As String<br />
        Set(ByVal value As String)<br />
            myConnString = value<br />
        End Set<br />
    End Property<br />
    Private Sub cmdRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRefresh.Click<br />
        Dim conn As New MySqlConnection<br />
        Dim myCommand As New MySqlCommand<br />
        Dim myAdapter As New MySqlDataAdapter<br />
        Dim myData As New DataTable<br />
        Dim SQL As String</p>
<p>        SQL = &#8220;SELECT CONCAT(u.lastname, &#8216;, &#8216;, u.firstname) AS Name, s.message AS Message, &#8221; _<br />
        &amp; &#8220;DATE_FORMAT(e.timestamp,&#8217;%b %d %Y &#8211; %r&#8217;) AS DateTime, e.status AS Status &#8221; _<br />
        &amp; &#8220;FROM event e LEFT JOIN status s ON e.message_id = s.message_id, user u &#8221; _<br />
        &amp; &#8220;WHERE(e.user_id = u.user_id) &#8221; _<br />
        &amp; &#8220;AND event_id IN( &#8221; _<br />
        &amp; &#8220;SELECT MAX(e.event_id) &#8221; _<br />
        &amp; &#8220;FROM event e &#8221; _<br />
        &amp; &#8220;GROUP BY e.user_id) &#8221; _<br />
        &amp; &#8220;ORDER BY name&#8221;</p>
<p>        conn.ConnectionString = myConnString</p>
<p>        Try<br />
            conn.Open()</p>
<p>            Try<br />
                myCommand.Connection = conn<br />
                myCommand.CommandText = SQL</p>
<p>                myAdapter.SelectCommand = myCommand<br />
                myAdapter.Fill(myData)</p>
<p>                dgvStatus.DataSource = myData<br />
                dgvStatus.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells</p>
<p>            Catch myerror As MySqlException<br />
                MsgBox(&#8220;There was an error reading from the database: &#8221; &amp; myerror.Message)</p>
<p>            End Try</p>
<p>        Catch myerror As MySqlException<br />
            MessageBox.Show(&#8220;Error Connecting to Database: &#8221; &amp; myerror.Message)<br />
        Finally<br />
            If conn.State  ConnectionState.Closed Then conn.Close()<br />
        End Try</p>
<p>    End Sub<br />
End Class</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-514</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Sun, 21 Nov 2010 13:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-514</guid>
		<description>Hello, i find your article very helpful to like me who is starting to do the programming.
I am stuck right now with connecting to database at the frmMain - its prompting access denied PASSWORD: No.
I did remove my password in mysql in attempting to connect but still not working.
Appreciate your help on this.
Many thanks.</description>
		<content:encoded><![CDATA[<p>Hello, i find your article very helpful to like me who is starting to do the programming.<br />
I am stuck right now with connecting to database at the frmMain &#8211; its prompting access denied PASSWORD: No.<br />
I did remove my password in mysql in attempting to connect but still not working.<br />
Appreciate your help on this.<br />
Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pengen eksis</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-513</link>
		<dc:creator>pengen eksis</dc:creator>
		<pubDate>Fri, 12 Nov 2010 05:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-513</guid>
		<description>this is tutorial that i looked for... thank you very much</description>
		<content:encoded><![CDATA[<p>this is tutorial that i looked for&#8230; thank you very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benni</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-512</link>
		<dc:creator>Benni</dc:creator>
		<pubDate>Thu, 28 Oct 2010 14:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-512</guid>
		<description>Thank you very much for this perfect tutorial.</description>
		<content:encoded><![CDATA[<p>Thank you very much for this perfect tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steffi</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-511</link>
		<dc:creator>Steffi</dc:creator>
		<pubDate>Wed, 21 Jul 2010 14:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-511</guid>
		<description>Hi!

I&#039;m just going through your very very good tutorial, but unfortunately I&#039;m stuck when it comes to the point &quot;Creating a Status Form&quot;.

I do the same you do in your tutorial, but I get a NullReference-Exception telling me that the link to the object wasn&#039;t appointed to an object instance (I don&#039;t know if these are the correct terms as this is a translation from German into English)).

{&quot;Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.&quot;}

Did I miss anything here??

Hope you can help!

Thanks, Steffi</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I&#8217;m just going through your very very good tutorial, but unfortunately I&#8217;m stuck when it comes to the point &#8220;Creating a Status Form&#8221;.</p>
<p>I do the same you do in your tutorial, but I get a NullReference-Exception telling me that the link to the object wasn&#8217;t appointed to an object instance (I don&#8217;t know if these are the correct terms as this is a translation from German into English)).</p>
<p>{&#8220;Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.&#8221;}</p>
<p>Did I miss anything here??</p>
<p>Hope you can help!</p>
<p>Thanks, Steffi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinal</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-510</link>
		<dc:creator>Dinal</dc:creator>
		<pubDate>Fri, 25 Jun 2010 06:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-510</guid>
		<description>Hi Ernest


Im a newbie of visual basic programing. after read this, Your tutorial is really useful for me and very briliant. But i have a problem to delete the rows on the datagrid.
in my project i add the delete button at my form from the example that u gave on this tutorial. so when i click the delete button after choose a row on the datagrid, it will be deleted.
hows the code to choose the row and delete it.

thankyou</description>
		<content:encoded><![CDATA[<p>Hi Ernest</p>
<p>Im a newbie of visual basic programing. after read this, Your tutorial is really useful for me and very briliant. But i have a problem to delete the rows on the datagrid.<br />
in my project i add the delete button at my form from the example that u gave on this tutorial. so when i click the delete button after choose a row on the datagrid, it will be deleted.<br />
hows the code to choose the row and delete it.</p>
<p>thankyou</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pham Quang Dzung</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-509</link>
		<dc:creator>Pham Quang Dzung</dc:creator>
		<pubDate>Fri, 21 May 2010 10:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-509</guid>
		<description>How excellent!!!</description>
		<content:encoded><![CDATA[<p>How excellent!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piyush Vishvas</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-508</link>
		<dc:creator>Piyush Vishvas</dc:creator>
		<pubDate>Fri, 07 May 2010 05:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-508</guid>
		<description>The tutorial is really excellent. Anyone with basic understanding of database application can go advance using this tutorial. I have searched the net for long (appx 6 months) and now got this best helper with all the step by step instructions.

Thanks to the creators...</description>
		<content:encoded><![CDATA[<p>The tutorial is really excellent. Anyone with basic understanding of database application can go advance using this tutorial. I have searched the net for long (appx 6 months) and now got this best helper with all the step by step instructions.</p>
<p>Thanks to the creators&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maka</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-507</link>
		<dc:creator>Maka</dc:creator>
		<pubDate>Mon, 15 Mar 2010 13:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-507</guid>
		<description>Thanks this Tutorial is really helpfull. best regards</description>
		<content:encoded><![CDATA[<p>Thanks this Tutorial is really helpfull. best regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Touch Up Paint Kit</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4#comment-506</link>
		<dc:creator>Touch Up Paint Kit</dc:creator>
		<pubDate>Fri, 29 Jan 2010 09:16:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-4/#comment-506</guid>
		<description>I&#039;ve been searching for this exact information on this subject for a long time.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been searching for this exact information on this subject for a long time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

