TreeView Control with MySQL

Submitted by: 
Visitors have accessed this post 19066 times.

While I was trying to convert TreeView Control to work with MySQL I encounter an error with concurrent connection using DataReader. The error message was “There is already an open DataReader associated with this Connection which must be closed first”.

Even the Microsoft KB does not help in solving this problem. The workaround on this problem is to create another connection to avoid this error.

After searching the internet for known issues some are reporting that this is a bug in MySQL Connector/Net. But of course some disagree because they said that you cannot create a concurrent connection with DataReader.


In order to run this tutorial successfully you need to import two files included in the zip file. First import Creates.sql, second import Inserts.sql, third import Views.sql using Toad. For more information on the software requirements please read Visual Basic and MySQL article.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


i need to try it first

Wow that's great. I didn't heard about MARS.

By the way do you have a source code on this? Can you share it here?

basically u could not do 2 datareader open in revised your sql statement or stored procedure. ( :) work on me) , anyway there is also called MARS in SQL Server (not in mySQL) that allow you to open multiple datareader. but unfortunately i have no idea how to used MARS ( hehehe! ).

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.