Subject | Re: [IBO] Hello and a question |
---|---|
Author | Helen Borrie |
Post date | 2008-02-12T04:35:27Z |
At 02:18 PM 12/02/2008, you wrote:
IB_DSQL1.Active := True;
Active is a deprecated property that's present in the base class for backward compatibility with ("naff") code ex VCL apps. Lose it. When you apply it to a DSQL statement, it does all the background stuff and executes the statement!
For real client/server programming, control everything and don't do it until you're ready to do it, i.e., don't do it in FormCreate.
For DSQL statements (including EXECUTE PROCEDURE) the call is Execute (or ExecSQL, if you must..) and you call it after you have lined up all your ducks.
For TIB_Query and the special case selectable SP, call Open.
For unidirectional sets (TIB_Cursor with a SELECT statement), you call First (not Open, not Execute, not setting the statement's Active property). Ask further about this, or search through the FAQ at the IBO website.
Later on, I'll try to whack out a quick and dirty demo of a simple Picture app that works both ways.
Helen
>http://slakers.net/filehost/download.php?file=1008ab6fc9f1064986acff3278e441bfThe immediate answer is ever so simple: comment out this line in your FormCreate:
IB_DSQL1.Active := True;
Active is a deprecated property that's present in the base class for backward compatibility with ("naff") code ex VCL apps. Lose it. When you apply it to a DSQL statement, it does all the background stuff and executes the statement!
For real client/server programming, control everything and don't do it until you're ready to do it, i.e., don't do it in FormCreate.
For DSQL statements (including EXECUTE PROCEDURE) the call is Execute (or ExecSQL, if you must..) and you call it after you have lined up all your ducks.
For TIB_Query and the special case selectable SP, call Open.
For unidirectional sets (TIB_Cursor with a SELECT statement), you call First (not Open, not Execute, not setting the statement's Active property). Ask further about this, or search through the FAQ at the IBO website.
Later on, I'll try to whack out a quick and dirty demo of a simple Picture app that works both ways.
Helen