-
Data adapter objects
I'm using data adapters and datasets from the toolbox, rather than code for this project.
If I want the automatic Insert, Update & Delete statements, I can only put one table in the data adapter. I can add plenty to a single dataset, though. To get these statements, do I have to add a data adapter for each table, but can use just one dataset? There's probably ten tables. Thanks.
-
Hi,
I did not realise you could only update one table through the dataadapter from the toolbox. If this is so, you can construct your own custom UpdateCommand using normal SQL statements and then assign it to the UpdateCommand property of the DataAdapter.
-
Thanks taxes. The reason you can't update more than one table is that the data adapter generates the commands from the SELECT statement used in the data adapter. When there's more than one table in the statement, it doesn't know how to build the other commands. Maybe VS 2003 can do it, but not 2002.
I suppose I could build statements manually, but that sort of takes away a reason to use the toolbox data tools in the first place.
-
Hi,
"I suppose I could build statements manually, but that sort of takes away a reason to use the toolbox data tools in the first place."
Yes. Things like this do tend to move away from the "Visual" part of VB.NET. I thought the original idea if Visual programming languages was to move away from writing code
:cry: :cry: