<?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 5</title>
	<atom:link href="http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/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: Bongs</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-753</link>
		<dc:creator>Bongs</dc:creator>
		<pubDate>Mon, 07 Jun 2010 19:27:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-753</guid>
		<description>I am connected to MySQL database using localhost, I keep getting an error that says CONNECTION MUST BE VALID AND OPEN when I am trying to add a new record. I am using INSERT INTO statement. I need help. The exception is on the Executenonquery statement, here is the code:

    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
        Dim ConnStr As String = &quot;server=localhost;user id=bongani;Password=bongs;persist security info=True;database=world&quot;
        Dim connection As New MySqlConnection(ConnStr)
        connection.Open()
        MyCommand = New MySqlCommand(&quot;INSERT INTO pals values (&#039;&quot; &amp; txtName.Text &amp; &quot;&#039;, &#039;&quot; &amp; txtSur.Text &amp; &quot;&#039; ,&#039;&quot; &amp; txtTel.Text &amp; &quot;&#039;)&quot;)
        If connection.State = ConnectionState.Open Then
            MsgBox(&quot;Connection is open&quot;)
            MyCommand.ExecuteNonQuery()
        Else
            MsgBox(&quot;Connection is closed&quot;)
        End If

        myData = New DataSet
        myAdapter.Fill(myData, &quot;pals&quot;)
        myAdapter.Update(myData, &quot;pals&quot;)
          End Sub</description>
		<content:encoded><![CDATA[<p>I am connected to MySQL database using localhost, I keep getting an error that says CONNECTION MUST BE VALID AND OPEN when I am trying to add a new record. I am using INSERT INTO statement. I need help. The exception is on the Executenonquery statement, here is the code:</p>
<p>    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click<br />
        Dim ConnStr As String = &#8220;server=localhost;user id=bongani;Password=bongs;persist security info=True;database=world&#8221;<br />
        Dim connection As New MySqlConnection(ConnStr)<br />
        connection.Open()<br />
        MyCommand = New MySqlCommand(&#8220;INSERT INTO pals values (&#8216;&#8221; &amp; txtName.Text &amp; &#8220;&#8216;, &#8216;&#8221; &amp; txtSur.Text &amp; &#8220;&#8216; ,&#8217;&#8221; &amp; txtTel.Text &amp; &#8220;&#8216;)&#8221;)<br />
        If connection.State = ConnectionState.Open Then<br />
            MsgBox(&#8220;Connection is open&#8221;)<br />
            MyCommand.ExecuteNonQuery()<br />
        Else<br />
            MsgBox(&#8220;Connection is closed&#8221;)<br />
        End If</p>
<p>        myData = New DataSet<br />
        myAdapter.Fill(myData, &#8220;pals&#8221;)<br />
        myAdapter.Update(myData, &#8220;pals&#8221;)<br />
          End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: methodman3130</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-752</link>
		<dc:creator>methodman3130</dc:creator>
		<pubDate>Thu, 13 May 2010 23:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-752</guid>
		<description>HOW TO DO CRYSTAL REPORTS WITH VB.NET AND MYSQL USING XML DATA? PLEASE HELP</description>
		<content:encoded><![CDATA[<p>HOW TO DO CRYSTAL REPORTS WITH VB.NET AND MYSQL USING XML DATA? PLEASE HELP</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nokia6230ivn</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-751</link>
		<dc:creator>Nokia6230ivn</dc:creator>
		<pubDate>Tue, 27 Apr 2010 14:54:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-751</guid>
		<description>Hi,

I have 2 matters in this lession.

1. I connected to my localhost many times and loading database is ok. But if I change it to my host, it has an error at section &quot;MyAdapt.Fill(myDataTable)&quot;.

2. If I connect to my database by localhost, &quot;Refresh&quot; button working very good, all chages of database update immediately (even frmMain had time control). But when the timer control working (automatic), it has an error: &quot;Error connecting to the database: Access denied for user &quot;@&#039;localhost&#039; (using password: NO)

Please tell me how to correct these errors???</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have 2 matters in this lession.</p>
<p>1. I connected to my localhost many times and loading database is ok. But if I change it to my host, it has an error at section &#8220;MyAdapt.Fill(myDataTable)&#8221;.</p>
<p>2. If I connect to my database by localhost, &#8220;Refresh&#8221; button working very good, all chages of database update immediately (even frmMain had time control). But when the timer control working (automatic), it has an error: &#8220;Error connecting to the database: Access denied for user &#8220;@&#8217;localhost&#8217; (using password: NO)</p>
<p>Please tell me how to correct these errors???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ethel Hupp</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-750</link>
		<dc:creator>Ethel Hupp</dc:creator>
		<pubDate>Tue, 06 Apr 2010 14:54:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-750</guid>
		<description>Try &amp; Preserve your iPad for Free! -&gt; http://bit.ly/cFBuis</description>
		<content:encoded><![CDATA[<p>Try &amp; Preserve your iPad for Free! -&gt; <a href="http://bit.ly/cFBuis" rel="nofollow">http://bit.ly/cFBuis</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: B. Balamanigandan</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-749</link>
		<dc:creator>B. Balamanigandan</dc:creator>
		<pubDate>Mon, 30 Nov 2009 08:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-749</guid>
		<description>How can i connect vb.net desktop application with remote mysql server?????????????????</description>
		<content:encoded><![CDATA[<p>How can i connect vb.net desktop application with remote mysql server?????????????????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhine</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-748</link>
		<dc:creator>Rhine</dc:creator>
		<pubDate>Mon, 30 Nov 2009 06:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-748</guid>
		<description>I will try to do this but the demand now is Java. Is it possible to work if my knowledge is only VB</description>
		<content:encoded><![CDATA[<p>I will try to do this but the demand now is Java. Is it possible to work if my knowledge is only VB</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie Childs</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-747</link>
		<dc:creator>Charlie Childs</dc:creator>
		<pubDate>Thu, 05 Nov 2009 12:09:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-747</guid>
		<description>Alfredo and Ferando - just remembered that it also says that if the connection is left open, the database may be left open when the user thinks they have finished with it and closed it.</description>
		<content:encoded><![CDATA[<p>Alfredo and Ferando &#8211; just remembered that it also says that if the connection is left open, the database may be left open when the user thinks they have finished with it and closed it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie Childs</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-746</link>
		<dc:creator>Charlie Childs</dc:creator>
		<pubDate>Thu, 05 Nov 2009 12:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-746</guid>
		<description>Alfredo and  Fernando,

I am a beginner but have read this tutorial quite a lot and I think I have read two things that may be of interest to you:

1) Somewhere in this tutorial it sates that it is best practice to close connections as soon as they are finished with in order to save resourses.

2)I think I have read that the closing of the connection is used to trigger something. If I am right about that I think I remember it being in a TRY CATCH block but I cannot be certain.

I think that you will probably find a more definate answer to your question by reading through lesson 3 or 4.

Might you know of any reason that may be causing my form to overwrite existing rows rather than provide a new row.

Good luck</description>
		<content:encoded><![CDATA[<p>Alfredo and  Fernando,</p>
<p>I am a beginner but have read this tutorial quite a lot and I think I have read two things that may be of interest to you:</p>
<p>1) Somewhere in this tutorial it sates that it is best practice to close connections as soon as they are finished with in order to save resourses.</p>
<p>2)I think I have read that the closing of the connection is used to trigger something. If I am right about that I think I remember it being in a TRY CATCH block but I cannot be certain.</p>
<p>I think that you will probably find a more definate answer to your question by reading through lesson 3 or 4.</p>
<p>Might you know of any reason that may be causing my form to overwrite existing rows rather than provide a new row.</p>
<p>Good luck</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fernando</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-745</link>
		<dc:creator>Fernando</dc:creator>
		<pubDate>Wed, 04 Nov 2009 07:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-745</guid>
		<description>HI,

I&#039;ve the same doubt as Alfredo Garza. Please, anyone ?</description>
		<content:encoded><![CDATA[<p>HI,</p>
<p>I&#8217;ve the same doubt as Alfredo Garza. Please, anyone ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alfredo Garza</title>
		<link>http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5#comment-744</link>
		<dc:creator>Alfredo Garza</dc:creator>
		<pubDate>Fri, 23 Oct 2009 22:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.vbmysql.com/articles/vbnet-mysql-tutorials/the-vbnet-mysql-tutorial-part-5/#comment-744</guid>
		<description>Hi,

I noticed that all of the connections to the database are open and closed right after finishing the data access. Is there any reason why not to leave the connection open until the aplication exits.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I noticed that all of the connections to the database are open and closed right after finishing the data access. Is there any reason why not to leave the connection open until the aplication exits.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

