Re: MySQL and strongl typed datasets
Posted by: John Haldi
Date: January 10, 2006 08:09AM

Here's what I've discovered working with this same problem in the last few days:

- The 5.0 alpha in VS 2005 craps out and won't display table schema information. Instead use the more stable 3.51 driver to add a new Data Connection.

- You can indeed use the new Table Adapter concept in VS 2005. Add a data source, choose the MyODBC 3.51 driver and pick the table(s) you want in the datasource.

- Yes, it will generate an error after the wizard tries to set things up. Here's what's happening: The wizard is inserting an extra '.' (dot) between the database name and the table name in the end of the SELECT statement it is trying to autogenerate. So it creates something akin to "SELECT * FROM MyDatabase..MyTable. Very stupid - don't know who owns this bug or who will fix it.

- After the Wizard fails, right click the new datasource and Edit Dataset with Designer. Click on the auto-generated "Fill, DetData()" query on the bottom of the Dataset in the designer window. Go to its properties and out the extra '.' in the CommandText. Now you should be able to do data bindings, etc. just by dragging the Dataset onto a form.

Some notes though:

- I believe that since the Wizard is initially crapping out, it is not generating the UPDATE, DELETE or INSERT methods for the dataset's primary query. I cannot get a dataset generated in this manner to store its results back to a database. If you can, please let me knnow what worked.

- Although I use the MyODBC 3.51 to create datasets and do design-time binding, etc., I've found that there are some unresolved bugs in the 3.51 production release which prevent some data transactions from working properly. To avoid it I use the MySQL Connector .NET and remove the auto-created dataset.fill commands, replacing it with the appropriate MySQLConnection and MySQLDataAdapter commands to fill the dataset at run-time.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL and strongl typed datasets
January 10, 2006 08:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.