On 12/12/2007, Joost van der Sluis <[EMAIL PROTECTED]> wrote:
>
> > Step 2:
> You don't need to do this. It is used when the TIBConnection tries to
> execute some sql-statements itself. If has to know which transaction it
> should use. You have to see this as the 'default transaction'. If you do
> TIBConnection.ExecuteDirect, this transaction is used. This transaction
> is also used when you use ApplyUpdates.
>

<....snip....>

> > Step 5b: (optional)
> > ======
> > TSQLQuery  ->  TDatasource via the 'DataSource' property.  It can be
> > done, but wasn't needed to get my example project to work. Not sure
> > what's the rules about this one.
>
> I've been mistaken about this one more then once. Also my collegues had
> problems with this.
> iirc it's renamed to something else in recent versions. What it does is
> handling the master-detail relationships.


I have to beg to differ on both counts!  They are both required, see below.

I could send you my project if it might help.


As for Step 5. Well in my simple example I have a query: "Select * from users".
No master-detail relationship there! Yet if I try to set the
TSQLQuery.Active = True I get a "Database not assigned!" error.
Assign the "Database" property to IBConnection1 and try Active = True again.

This time I get the following error:  "Transaction of connection not
set".  Now I go to the IBConnection1 and set the Transaction (doubly
link madness) and no I'm not trying to execute anything directly via
the IBConnection.  Go back to SQLQuery and set Active = True.  Now
everything works and I get results in the DBGrid.

So bottom line - all the steps from my first email *are* required to
get results in a DBGrid.



Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to