Hi All,
SeaWolf helped me with some code for updating a Table but it is twice as much coding as a standard "Update" SQL script.
So why use an Update Object then?
Thanks
Bob
Why use an Update Object?
Moderators: gto, EgonHugeist
Why use an Update Object?
Thanks
Dyslexic Bob
Dyslexic Bob
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
Hello, IbeDBob,
If you have a simple query like 'select id, name from person' in a tzquery then the component is capable of performing inserts, updates and deletes. The problem occurs then the query gets complex (using several tables). In that case you would not be able to use methods like Insert, Edit, Post, Delete. To enable you using these TDataSet methods the Update component is provided. Using it you can change the default insert/update/delete operations too (if you are using stored procedure for editing some table for example).
You can always use your own TZQuery object with you INSERT or UPDATE SQL for data manipulations, but that way you lose some of functionality of data aware components like TDBGrid.
Good luck!
If you have a simple query like 'select id, name from person' in a tzquery then the component is capable of performing inserts, updates and deletes. The problem occurs then the query gets complex (using several tables). In that case you would not be able to use methods like Insert, Edit, Post, Delete. To enable you using these TDataSet methods the Update component is provided. Using it you can change the default insert/update/delete operations too (if you are using stored procedure for editing some table for example).
You can always use your own TZQuery object with you INSERT or UPDATE SQL for data manipulations, but that way you lose some of functionality of data aware components like TDBGrid.
Good luck!