Subject Re: [ib-support] IBX QUESTION
Author ibrahim bulut
I think you did't understant my sql statement.

if I pass 999999 to parameter Id, Query returns all records.

Parameter ID=9999999 ==> Returns all records
Parameter ID=1 ==> Returns Only id=1 records.


I often use this property.
This sql statement is very useful for me.

I Think Ann Harrison know this.
Because she is developer of ib/fb.




----- Original Message -----
From: "Vinicius Barreira" <vinibarr@...>
To: <ib-support@yahoogroups.com>
Sent: Friday, December 27, 2002 1:38 PM
Subject: Re: [ib-support] IBX QUESTION



Can you show me your stored procedure "test" ?
Try This:
SELECT ID, NAME, INVOICE_DATE FROM INVOICE
WHERE ID IN (:ID,999999) <<== must be in order
ORDER BY ID, INVOICE_DATE


or

SELECT ID, NAME, INVOICE_DATE FROM INVOICE
WHERE (ID = :ID1) OR (999999 = :ID2))
ORDER BY ID, INVOICE_DATE

ParamByName('ID1').AsInteger := xxxx

ParamByName('ID2').AsInteger := xxxx

This problem must be two identical parameters ":ID"; try two diferent !


ibrahim bulut <ibrahim@...> wrote:Hi,

My sql statement is not wrong.
If I do it in a stored procedure, everything is working.
There isn't any problem.

But if I do it with a Query component I get the same error message.
I think that: Problem=Query component. (IBX)

If my sql statement wrong, I can't do it in a sored procedure.

I Don't want to do a stored procedure for this.
I must run it with a query component.



----- Original Message -----
From: "Vinicius Barreira" <vinibarr@...>
To: <ib-support@yahoogroups.com>
Sent: Thursday, December 26, 2002 1:19 PM
Subject: Re: [ib-support] IBX QUESTION



You have two ")" after 999999
Change
WHERE (ID = :ID) OR (999999 = :ID))

to


WHERE (ID = :ID) OR (999999 = :ID)



ibrahim bulut <ibrahim@...> wrote:Hi,

I am using IBX.
I get this error message.
"Dynamic Sql Error"
"Sql Error Code= -804"
"Incorrect Values Within SQLDA structure"

My sql is that:
===========
SELECT ID, NAME, INVOICE_DATE FROM INVOICE
WHERE (ID = :ID) OR (999999 = :ID))
ORDER BY ID, INVOICE_DATE

When I write this sql statement to a query component,
query component builds 2 parameters.
Parameter 1=ID,
Parameter 2=ID

Parameter name is the same, So I get this error message.
If I change manually parameter two's name, there isn't any difference.
I get the same error message.

How Can I Solve This Problem.


ibrahim Bulut
Software Developer
Republic Of Turkey


[Non-text portions of this message have been removed]


Yahoo! Groups SponsorADVERTISEMENT

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Vinicius Barreira
Check-In Informática
Automação de Hotéis
São Bernardo do Campo - SP


---------------------------------
Busca Yahoo!
O melhor lugar para encontrar tudo o que você procura na Internet

[Non-text portions of this message have been removed]



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/






Yahoo! Groups SponsorADVERTISEMENT

To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Vinicius Barreira
Check-In Informática
Automação de Hotéis
São Bernardo do Campo - SP


---------------------------------
Busca Yahoo!
O melhor lugar para encontrar tudo o que você procura na Internet

[Non-text portions of this message have been removed]



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/