Subject | RE: [IBO] statement Union in a TIBO_Query |
---|---|
Author | Vahan Yoghoudjian |
Post date | 2004-08-30T10:33:37Z |
Hi Lester
Yes I have codes in the client table longer than 4 characters, as for the
NAME fields they have the same size but I tried with fields of different
size and I had no problem, I guess having this problem on the CODE fields is
because both fields are the primary keys in their tables. Ideally what I
should do is to convert the CODE field in operators table to char(8) same as
the CODE in Clients, but then I have to change my coding policy for
operators in my application.
What kind of errors do you expect for varchar to give later on?
Thank you
-----Original Message-----
From: Lester Caine [mailto:lester@...]
Sent: Monday, August 30, 2004 10:03 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] statement Union in a TIBO_Query
Vahan Yoghoudjian wrote:
same size !!!!
Error is a bit obscure, but the engine is trying to create a match
between an 8 character column and a 4 character column. Do you actually
have any codes in the CLIENTS that are more than 4 characters yet? I
suspect that VARCHAR is just hiding the difference at present, and may
give errors later.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
___________________________________________________________________________
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 Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
----
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/
b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Yes I have codes in the client table longer than 4 characters, as for the
NAME fields they have the same size but I tried with fields of different
size and I had no problem, I guess having this problem on the CODE fields is
because both fields are the primary keys in their tables. Ideally what I
should do is to convert the CODE field in operators table to char(8) same as
the CODE in Clients, but then I have to change my coding policy for
operators in my application.
What kind of errors do you expect for varchar to give later on?
Thank you
-----Original Message-----
From: Lester Caine [mailto:lester@...]
Sent: Monday, August 30, 2004 10:03 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] statement Union in a TIBO_Query
Vahan Yoghoudjian wrote:
> I found the source of the problem, the field CODE in the table CLIENTSis
> of type Char(8) while in table Operators is Char(4).-
> I converted the CODE fields to Varchar(8) and Varchar(4) and everything
> works fine now
>
> At 06:27 PM 27/08/2004 +0200, you wrote:
>
>>I'm using a TIBO_Query to run the following SQL statement
>>
>>SELECT CODE,NAME FROM CLIENTS
>>
>>UNION
>>
>>SELECT CODE,NAME FROM OPERATORS
>>
>>and I'm getting the following Error Message:
>>
>>--------------------------------------------------------------------------
>In order for a UNION to work correctly bot BODE and NAME must be the
> -
>
>>---
>>ISC ERROR CODE: 335544569
>>ISC ERROR MESSAGE:
>>Dynamic SQL error code = -104
>>Invalid Command
>>Data Type Unkown
>>
>>STATEMENT:
>>TIBOInternalDataset: "DataModuleForm.DModule.QrSearch.
>><TIBOInternalDataSet>."
same size !!!!
Error is a bit obscure, but the engine is trying to create a match
between an 8 character column and a 4 character column. Do you actually
have any codes in the CLIENTS that are more than 4 characters yet? I
suspect that VARCHAR is just hiding the difference at present, and may
give errors later.
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
___________________________________________________________________________
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 Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
----
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/IBObjects/
b.. To unsubscribe from this group, send an email to:
IBObjects-unsubscribe@yahoogroups.com
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]