Subject | RE: [IBO] Using rdb$db_key with IBO |
---|---|
Author | Svein Erling Tysvær |
Post date | 2008-02-13T13:03:50Z |
Sorry, forgot to say that the SQL of the TIB_DSQL is something like:
UPDATE <table>
SET <Field> = :Param1
WHERE RDB$DB_KEY = :Param2
and of the TIB_Cursor:
SELECT rdb$db_key FROM <table>
WHERE ...
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of Svein Erling Tysvær
Sent: 13. februar 2008 13:59
To: IBObjects@yahoogroups.com
Subject: [IBO] Using rdb$db_key with IBO
Making myself a little tool, I discovered a problem assigning rdb$db_key to a parameter. Basically, what I've got, is one TIB_Cursor that selects rdb$db_key, and then a TIB_DSQL that tries to update the same record using this rdb$db_key. Doing
TIB_DSQL1.Params[1].AsVariant:=TIB_Cursor1.Fields[0].AsVariant; //rdb$db_key
Assigns 'A1000000' to the parameter when the field contains 'A100000001000000', i.e. IBO trims away half the value! First I tried using .AsString, then changed to .AsVariant and then changed to IBO 4.8.7 (probably a beta version from 26 August 2007), but this behaviour was consistent. If it is of any relevance, I generally use ISO8859_1 as the character set and NO_NO as collation.
To me, it seems like the statement
if strLen > SQLLen then
strLen := SQLLen;
in TIB_ColumnText.SetValue shortens the string from 16 to 8 characters.
Any way to use rdb$db_key with IBO? Of course I normally have a primary key (PK) on my tables, but I would like this little tool to work even for tables that don't have a PK.
Using Borland Developer Studio 2006.
Thanks for any answers,
Set
[Non-text portions of this message have been removed]
___________________________________________________________________________
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 !
Yahoo! Groups Links
UPDATE <table>
SET <Field> = :Param1
WHERE RDB$DB_KEY = :Param2
and of the TIB_Cursor:
SELECT rdb$db_key FROM <table>
WHERE ...
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of Svein Erling Tysvær
Sent: 13. februar 2008 13:59
To: IBObjects@yahoogroups.com
Subject: [IBO] Using rdb$db_key with IBO
Making myself a little tool, I discovered a problem assigning rdb$db_key to a parameter. Basically, what I've got, is one TIB_Cursor that selects rdb$db_key, and then a TIB_DSQL that tries to update the same record using this rdb$db_key. Doing
TIB_DSQL1.Params[1].AsVariant:=TIB_Cursor1.Fields[0].AsVariant; //rdb$db_key
Assigns 'A1000000' to the parameter when the field contains 'A100000001000000', i.e. IBO trims away half the value! First I tried using .AsString, then changed to .AsVariant and then changed to IBO 4.8.7 (probably a beta version from 26 August 2007), but this behaviour was consistent. If it is of any relevance, I generally use ISO8859_1 as the character set and NO_NO as collation.
To me, it seems like the statement
if strLen > SQLLen then
strLen := SQLLen;
in TIB_ColumnText.SetValue shortens the string from 16 to 8 characters.
Any way to use rdb$db_key with IBO? Of course I normally have a primary key (PK) on my tables, but I would like this little tool to work even for tables that don't have a PK.
Using Borland Developer Studio 2006.
Thanks for any answers,
Set
[Non-text portions of this message have been removed]
___________________________________________________________________________
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 !
Yahoo! Groups Links