Subject Re: [firebird-support] FB Newbie - data access components?
Author Lauchlan Mackinnon
Hi Graeme,

> You can set the parameters directly in the database component or you do it
> programmatically.
> I personally always turn off the login parameter screen and provide the
> login credentials
> programmatically.

ok, thanks.

> Obviously the programmatic approach is required is you wish users to
provide
> login details.

That makes sense.

> To make the IBQuery editable, you will need to attach a TIBUpdateSQL
> component to the query,
> set cachedupdates to true and generate the SQL statements necessary within
> the TIBUpdateSQL
> statement.

> The TIBUpdateSQL component can link to one of the tables in the query and
if
> the query would normally
> return a readonly dataset and will allow you to update this table.

ok, got that . . .

But I'm not sure how to actually code the update etc SQL statements.

Say I had the update needing to be something like this

Update Employees
set FirstName = :FirstName
where EmployeeID = :EmployeeID

is there some sort of convention for what the parameters need to be caleed
and how they are generated, since I'm not going to be apssing them in in
code?

> If you
> want to update more than one
> table, there are also less straightforward ways of doing this.

But not that. Could you expand a little on this?

> You will need to the applyupdates and Transaction.Commit commands at some
> point to actually save
> the edits you have made in the grid.

Do you always have to commit it, even for the IBTable? I found that it saved
anyway, even when I had no commit. Did it take care of it itself and make a
commit when I closed the form?

> We will be looking at new components in the near future to replace the IBX
> components as they depend
> on the patched gds32.dll file provided by the firebird install which fools
> IBX into thinking that it is running
> Interbase. I believe that support for this patched file will be dropped as
> of version 2 of firebird.
>
> There have been many past articles comparing the various options and IB
> Objects seems to come out ahead.
> We will be evaluating it ourselves within the next few months. I suggest
> that looking back through the newsgroup
> will provide plenty of information about comparisons between the different
> delphi components.

Thanks again!

Lauchlan Mackinnon