Subject Re: [IBO] Problem with param value
Author Holger Klemt
i found it :-)

the error code was 335544321
and i googled it on
http://www.delphifaq.com/fq/q0053.shtml

i found, that there were some inserts from generator values
in a table with a 32-Bit integer field.

The strange thing was: the generator was set on the server
to 10 billion and locally to 1 billion. On the Server, there
was a problem, locally not.


just to let everybody know: read error message numbers


--
IBExpert - The most Expert for InterBase --- http://www.ibexpert.com
HK Software - Holger Klemt - Huntestrasse 15 - D-26135 Oldenburg
Telefon Telefax +49 700 IBEXPERT (42397378) www.h-k.de
Schulungen - Projektunterst�tzung - Delphi - InterBase - AS/400

""Helen Borrie (TeamIBO)"" <helebor@...> schrieb im Newsbeitrag
news:5.1.0.14.2.20020801090311.04067400@......
> At 03:53 PM 31-07-02 +0200, you wrote:
> >i have one problem:
> >
> >i need a query for a table, which is created automatically
> >(for any table structure)
> >
> >for example
> >
> >select id,field1,field2,field3 from tbl where id=123
> >
> >this is opened in q1:TIB_Query
> >
> >
> >
> >with the next SQL i want to create automatically an insert statement
> >(using q2:TIB_Query)
> >
> >insert into tbl(id,field1,field2,field3)
values(:id,:field1,:field2,:field3)
> >
> >
> >now i want to send each value from the first query
> >
> >for i:=0 to q1.fieldcount-1 do q2.params[i].value:=q1.fields[i].value;
> >
> >and execute this.
> >
> >
> >
> >When i was using ibx, it was no problem, when when i was
> >using ibo, it gave me a arithmeitc truncation, ..... error, but i don4t
> >know, on which field.
> >
> >ibx version runs fine with all datatypes (also blob and other).
> >
> >
> >any idea ?
>
> Just ideas to consider - there's not enough information here to pinpoint
> the exact problem.
>
> The pertinent difference between IBX and native IBO here is that IBX will
> reference a TField descendant, whereas IBO doesn't use persistent field
> objects at all. You are getting the potential for run-time casting errors
> because your code is using the Value method of the params[] and fields[]
> objects of two different dataset objects. Value delivers variants, not
> typed values; and by separating the first dataset from the second, the
> second dataset has nothing to refer to when it needs to typecast the
values.
>
> As a guess, it's possible that you have an integer overflow here - perhaps
> the second dataset is trying to push a 64-bit integer into a parameter
> which it thinks is 32-bit...but it might well be a string overflow if you
> are using Firebird 1 with large varchars...or a miscasting of a numeric or
> integer to a float or double.
>
> If possible, you should keep the Insert operation inside the context of
the
> first dataset and use its InsertSQL property to perform your
> insert. Passing parameters from one dataset to another in order to
perform
> a DML operation on the same row is not very IBO-like. Is there any
special
> reason why you need a scrollable dataset to perform a DML query?
>
>
> regards,
> Helen Borrie (TeamIBO Support)
>
> ** Please don't email your support questions privately **
> Ask on the list and everyone benefits
> Don't forget the IB Objects online FAQ - link from any page at
> www.ibobjects.com
>
>
>
>
___________________________________________________________________________
> 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/
>
>
>