Subject Re: Helen - Getting Started.
Author delphiman
>> // connect ib_queries I don't understand.
>What don't you understand?

What am I supposed to do with this line? Presumably I should remove the remark-out lines (i.e.//) And then? What code am I expected to have at this point??.

Anyway I still get exceptions with the rest of your suggested code - and am getting very frustrated at the amount of time I am have wasted in merely getting IBO installed (through no fault of my own) for Delphi 4 Professional - and now to be able to do anything sensible with it.

At this moment in time all I need is a very (very) simple and very (very) basic application of IBO which I can demonstrate to students - and I can "grow" from. I am taking the liberty of sending you the simple and very basic Project which I have created - by seperate e-mail. You can then include whatever is supposed to go at //connect ib_queries.

Of course you remain at liberty to refuse assist in this manner. Whilst I remain at liberty to get on with something else - far removed from IBO. Because I am now really getting fed-up with IBO!

Mobile: (Australia) 0407-007-159
Phone: ( Australia (02) 6041-1036)
ICQ 63345769

----- Original Message -----
From: Helen Borrie
Sent: Monday, September 10, 2001 5:06 PM
Subject: Re: [IBO] Getting Started Guide.

At 04:22 PM 10-09-01 +1000, you wrote:

>I do want the datasets to be open when I start the application ... and I tried the following - but it raises exceptions as indicated ....
>procedure TmyDatamodule.myDatamoduleCreate(Sender: TObject);
> ii: integer;
> with myDatamodule do
> begin
> if not Connection.connected then
> Connection.Connect;

> // connect ib_queries I don't understand.

What don't you understand?

> for ii := 0 to ComponentCount - 1 do
> begin
> if Components[ii] is TIB_BDataset then <-- try changing to tib_Query
> with Components[ii] as TIB_BDataset do <-- try changing to tib_Query
> Components[ii].Open // Undeclared identifier "Open"
> else if Components[ii] is TIB_Cursor do <-- change 'do' to 'then' (bad pasting!)

(* you might need this too *)
with Components[ii] as TIB_Cursor do
> Components[ii].First;
> end;
> ...
> end;

The point of the difference is that you call Open to open a bi-directional dataset, whereas you call First on a unidirectional one to open it.

If you don't have any tib_cursors that you want to open, don't include the ELSE clause - it's just unnecessary code clutter.

An alternative syntax for casting the component would be


If you have already established the class of the object with 'IS', Delphi is supposed to allow you to call the methods of the class without explicitly casting it with 'AS'. For some reason, it doesn't always allow it, which is why I gave you the more verbose syntax - that should always work.

Also, you mentioned previously that you had dropped an ib_transaction (named Transaction) into your datamodule. Are you using that transaction? If so, make it the default transaction of your connection object and, for now, link your datasets to it via their ib_transaction property.


All for Open and Open for All
InterBase Developer Initiative ยท

Your use of Yahoo! Groups is subject to

[Non-text portions of this message have been removed]