 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
pcerdaz Guest
|
Posted: Tue Jan 16, 2007 5:00 pm Post subject: How to use ModifySQL in IBDataSet |
|
|
Hello,
I don't understand how can I use ModifySQL. There is a way to define the SQL sentence on desing time but after that, on runtime I need to make an update passing parameters, the same ones that use the insert sentence, so how can I made the difference between those two sentence? Is there some guide to learn? The help does not explain this matter.
Thank you,
pcerdaz |
|
| Back to top |
|
 |
Wayne Niddery [TeamB] Guest
|
Posted: Wed Jan 17, 2007 12:21 am Post subject: Re: How to use ModifySQL in IBDataSet |
|
|
pcerdaz wrote:
| Quote: |
I don't understand how can I use ModifySQL. There is a way to define
the SQL sentence on desing time but after that, on runtime I need to
make an update passing parameters, the same ones that use the insert
sentence, so how can I made the difference between those two
sentence? Is there some guide to learn? The help does not explain
this matter.
|
You never use the Modify (or other) SQL statements directly, IBDataset uses
them in response to you calling Edit or Insert or Delete. Just assign the
field values you know are needed to be set and IBDataset will take care of
assigning parameters for the statement it is executing. You only need to set
parameters for any you have specified in the Select statement.
E.g.
IBDataset.Edit;
IBDataset.FieldByName('Name').AsString := 'Wayne';
IBDataset.FieldByName('Salary').AsFloat := '1000000';
IBDataset.Post;
On calling Post, the IBDataset will assign the corresponding parameters for
the Update SQL and execute it.
--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"The two most abundant elements in the universe are hydrogen and
stupidity." - Harlan Ellison |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|