Subject Re: [IBO] TIB_Query Update SQL
Author Don Gollahon
Why did it not work? Did you get an error?

Did you do a commit after the post? The data isn't save to the table until
a Commit is done unless you have autocommit turned on.

<mjcook@...> wrote in message
news:7110017E40F5D411825700105AE17E53013962@......
> Hi folks,
>
> Using Delphi 5.0, IBO 3.6D and the following TIB_Query:
>
> SELECT OTTYPE.OTTID
> , OTTYPE.NAME
> , OTTYPE.WATER
> , OTTYPE.DEFAULTSUMMARY
> , SUMMARYCAT.NAME as CatName
> FROM OTTYPE
> LEFT OUTER JOIN SUMMARYCAT on OTTYPE.DEFAULTSUMMARY = SUMMARYCAT.SCID
>
> I want to update the OTTYPE table (either insert or edit a current
record).
> I decided to use the UpDateSQL fields of the query and generated the SQL
> code, but could not figure out the to use the Query. I tried (among
others)
> the following
>
> ...
> with q do
> begin
> Insert;
> FieldByName(':OTTID').asInteger := RID; // obtained rid from a generator
> FieldByName(':NAME').asString := 'Name';
> FieldByName(':WATER').asString := 'T';
> FieldByName(':DEFAULTSUMMARY').asInteger := 99;
> Post;
> end;
>
> This did not work, but what would have?
>
> THIA
> Marv
>
>
>
>
>
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>