Strongly typed MySQLDataset - fill methods not available ?
Posted: Sat 29 Dec 2007 00:03
Maybe I do not see obvious but I cannot overcome (simple I guess) problem.
Chapter "General Concepts in Database Application Development" documentation lists several advatages of typed MySqlDataSets over "The Standard Way" (DataSets)
Encoraged with nice features of MySqlDataSets compared to standard Dataset I played a bit with typed MySqlDatasets.
Using wizard I just select a table and put simple select string: "SELECT * FROM orders"
Wizard completes succesfully and typed dataset is created.
When I open it in editor I can see both:
i) data table ("orders")
ii) table adapter ("ordersTableAdapter")
Under table adapter I can see standard method Fill. Fine so far...
Then manually I try to add another select query to Table Adapter: "SELECT * FROM orders WHERE (id = :id)"
I enter the name of additional fill method: FillByID
All completes with no error.
I try to use this new MySqlDataset in the code.
In "The Standard Way" (DataSets) a/m fill methods were accessible as "Fill()" and "FillByID(int id)"
This is not however the case with MySqlDatasets...
I can see only (standartd) Fill() and Open() methods.
How can fill dataset with result of my paremetrised query: FillByID(int id) ?
Any hint will be appreciated.
Regards,
Wojtek
Chapter "General Concepts in Database Application Development" documentation lists several advatages of typed MySqlDataSets over "The Standard Way" (DataSets)
Encoraged with nice features of MySqlDataSets compared to standard Dataset I played a bit with typed MySqlDatasets.
Using wizard I just select a table and put simple select string: "SELECT * FROM orders"
Wizard completes succesfully and typed dataset is created.
When I open it in editor I can see both:
i) data table ("orders")
ii) table adapter ("ordersTableAdapter")
Under table adapter I can see standard method Fill. Fine so far...
Then manually I try to add another select query to Table Adapter: "SELECT * FROM orders WHERE (id = :id)"
I enter the name of additional fill method: FillByID
All completes with no error.
I try to use this new MySqlDataset in the code.
In "The Standard Way" (DataSets) a/m fill methods were accessible as "Fill()" and "FillByID(int id)"
This is not however the case with MySqlDatasets...
I can see only (standartd) Fill() and Open() methods.
How can fill dataset with result of my paremetrised query: FillByID(int id) ?
Any hint will be appreciated.
Regards,
Wojtek