BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use ModifySQL in IBDataSet

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (InterBase Express)
View previous topic :: View next topic  
Author Message
pcerdaz
Guest





PostPosted: Tue Jan 16, 2007 5:00 pm    Post subject: How to use ModifySQL in IBDataSet Reply with quote



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





PostPosted: Wed Jan 17, 2007 12:21 am    Post subject: Re: How to use ModifySQL in IBDataSet Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (InterBase Express) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.