MySQL Adapter Update question
Posted on 2004-11-09
I'm using the byteFX derived ASP.NET compliant MySQL components in Visual Studio 2003 to talk to several tables including a coupt of joined tables. My problem is in updating data and how to form the command text of the Update command for my adapter. My Select command for instance, is easy
SELECT * FROM table_01t
My Inser Statement is easy
INSERT INTO table_01t (x,y,z) VALUES (Stringx,Stringy,Stringz)
My update gets tricky, and i'm not certain how to make my update command work properly... The adapter apparently wants it in this form MySQLAdaptert01.Update(DataSet,Tablename); and then somehow uses the update command I've included to update the datatable. My problem is in generating the update command on the fly so I can update the right table, the right fields and from the right dataset based upon the users inputs. I'm just not comfortable building the update string when I can't see how it will be used.
I have three tables with 75 columns aggregate(ie 21, 26, 28), and in the worst case scenario, I'd update every field in every table except for the ID strings of each, and in the simplest situation, i'd only be changing 1 field, in one column, in one table.