B4J Question JRDC2 DBResult problem

makis_best

Well-Known Member
Licensed User
Longtime User
Hi all

I have a problem with DBresult returned from JRDC2
I have on config.properties file the sql script
B4X:
SELECT ESFINote1.RegistrationDate, ESFINote1.DocumentCode, \
ESFINote1.ESFITradeAccountPeriodics_Debit AS xreosi, ESFINote1.ESFITradeAccountPeriodics_Credit AS pistosi, \
Case ESFINote1.ESFITradeAccountPeriodics_Credit when 0 then 1 else -1 end AS TheSing, ESFITradeAccount.GID, \
ESFITradeAccount.Code, ESFITradeAccount.Name FROM ESFINoteEntry_TradeAccountEntry_TradeaccountPeriodics ESFINote1 \
LEFT JOIN ESFITradeAccount on ESFITradeAccount.GID = ESFINote1.fTradeAccountGID \
WHERE  ESFINote1.DocumentCode NOT LIKE 'ΑΧΕ%' AND ESFINote1.DocumentCode NOT LIKE 'ΑΧΓ%' \
AND ESFINote1.LineType in ('20', '25', '30') AND ESFINote1.DocumentCode NOT LIKE 'ΑΞΣ%' \
AND ESFINote1.fTradeAccountGID = ? ORDER BY ESFINote1.RegistrationDate

As you can see I exclude the records who have 'ΑΧΕ%' and 'ΑΧΓ%' and 'ΑΞΣ%'.
When I running the script on sql server I get the correct result.

But on my Android client I keep having records with 'ΑΧΕ%' and 'ΑΧΓ%' and 'ΑΞΣ%'.
Why that happening? I try all day to find out what is going on with it.

Any help appreciated.

Thank you
 

OliverA

Expert
Licensed User
Longtime User
Pure guess: Maybe an UTF-8 encoding issue? Java does not expect the properties file (which jRDC2's config.properties is) to be UTF-8 encoded, but ISO-8859-1. Maybe the editor you are using is encoding your LIKE parameters incorrectly. Looks like you can use \u prefix to encode UTF-8 characters within a properties file.

Links:
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
Dear @OliverA I use notepadd++ to avoid all that issues.
Inside config.properties I have many other scripts working fine.
Only this one has that strange behavior.
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
After testing and with B4J code I must say that the result is the same.
All filter like 'ΑΧΕ%' and 'ΑΧΓ%' and 'ΑΞΣ%' are not working, just ignored.
But I notice that if i pass these filters as parameters like
B4X:
Dim cmd As DBCommand = CreateCommand("Select_EGM_PROODEFTIKO", Array("ΑΞΣ%", "ΑΧΕ%", "ΑΧΓ%", TheClientGID))
then it is working fine.
So I decide to continue my project working that way.

I don't understand why but..... ;)
I am happy I find that way.
 
Upvote 0
Top