odbc datacomponent problems

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

I have used typed datasets by creating a Data Component (data.vb) by
creating a new component in a vb or asp/vb.net project, dragging data tables
onto the component, which generates the connection and adapters for me.
After getting everything set up the way I like it, I then tell it to
generate a dataset (let's call that ds.xsd) and place that on the component
as well. Then all I need to do is add the fill method, update method, etc
for the dataset in the code for the data component.

This always seemed to work well with Microsoft SQL Server, but now I am
doing it with mysql and I am very frustrated. I can drag the tables over
and I get odbc connection object and odbc data adapters. I can rapidly fix
the incorrect sql statements generated. This is not even the problem. I
can also generate the dataset - AFTER I go into each and every data adapter
and configure a table mapping.

But what happens quite often, is the Visual Studio IDE loses table mappings
and I have to REENTER all of them. Sometimes I have to delete the dataset
and renter all the table mappings and regenerate. And, once in a while,
I've even had to recreate the datacomponent and go through the whole thing
again!

This is cost me tons of time. I am trying to find a better way to get the
typed datasets and KEEP them, and if I need to make a change, I don't want
to have to blow it all away and reconfigure everything!

Any ideas or information appreciated.

Scott Emick
 
news.microsoft.com said:
I have used typed datasets by creating a Data Component (data.vb) by
creating a new component in a vb or asp/vb.net project, dragging data tables
onto the component, which generates the connection and adapters for me.
After getting everything set up the way I like it, I then tell it to
generate a dataset (let's call that ds.xsd) and place that on the component
as well. Then all I need to do is add the fill method, update method, etc
for the dataset in the code for the data component.

This always seemed to work well with Microsoft SQL Server, but now I am
doing it with mysql and I am very frustrated. I can drag the tables over
and I get odbc connection object and odbc data adapters. I can rapidly fix
the incorrect sql statements generated. This is not even the problem. I
can also generate the dataset - AFTER I go into each and every data adapter
and configure a table mapping.

But what happens quite often, is the Visual Studio IDE loses table mappings
and I have to REENTER all of them. Sometimes I have to delete the dataset
and renter all the table mappings and regenerate. And, once in a while,
I've even had to recreate the datacomponent and go through the whole thing
again!

This is cost me tons of time. I am trying to find a better way to get the
typed datasets and KEEP them, and if I need to make a change, I don't want
to have to blow it all away and reconfigure everything!

Any ideas or information appreciated.

Scott Emick


What I did here was eventually create some code to read all the tables
I want into a dataset (or at least get the schema) and then did a
writexmlschema to create an xsd file. (after setting the
MissingSchemaAction to AddWithKey) I then used the XSD.exe tool to
generate the typed dataset object.

Things are much more stable now, and I learned quite a bit.

Scott
 
Back
Top