Hi again everyone.
We have Firebird 2.5.7 with the ODBC driver (ISO8859_1, en_uk collation) as the back end. Still using C5PE.
We have a table of postcodes (suburb, state and postcode) which we have populated from our postal service. The fields are all in upper case, as is the text.
Today I stumbled across an unusual error.
Using the data in TPS when I perform a GET, regardless of the case, the GET() succeeds. When I attempt the same using ODBC and Firebird, the GET() succeeds when the text is upper case and fails for all other cases (CAPitalisation, lower case, camel case etc) and the failure returns no error() or fileerror()
with TPS files (works as expected):
attempting with: BURWOOD/VIC/3125
get succeeded
returned: BURWOOD/VIC/3125
attempting with: Burwood/VIC/3125
get succeeded
returned: BURWOOD/VIC/3125
attempting with: burwood/VIC/3125
get succeeded
returned: BURWOOD/VIC/3125
attempting with: BURWOOD/vic/3125
get succeeded
returned: BURWOOD/VIC/3125
attempting with: burwood/vic/3125
get succeeded
returned: BURWOOD/VIC/3125
with ODBC/Firebird (fails):
attempting with: BURWOOD/VIC/3125
get succeeded
returned: BURWOOD/VIC/3125
attempting with: Burwood/VIC/3125
get failed
error: 0 -
fileerror: -
returned: Burwood/VIC/3125
attempting with: burwood/VIC/3125
get failed
error: 0 -
fileerror: -
returned: burwood/VIC/3125
attempting with: BURWOOD/vic/3125
get failed
error: 0 -
fileerror: -
returned: BURWOOD/vic/3125
attempting with: burwood/vic/3125
get failed
error: 0 -
fileerror: -
returned: burwood/vic/3125
Now I suspect that FB is the issue, but the fact that I get no meaningful error, any error, concerns me.
I have checked my ODBC connection settings, nothing unusual.
Does anyone have any idea what has gone amiss, how I might fix it (with the exception of the obvious UPPER() command)?
FYI, the testing code used. debugmessage outputs text to a file.
POSTCODE:Suburb = 'BURWOOD'
POSTCODE:State_Territory = 'VIC'
POSTCODE:Postcode = '3125'
DO GetPostcode
POSTCODE:Suburb = 'Burwood'
POSTCODE:State_Territory = 'VIC'
POSTCODE:Postcode = '3125'
DO GetPostcode
POSTCODE:Suburb = 'burwood'
POSTCODE:State_Territory = 'VIC'
POSTCODE:Postcode = '3125'
DO GetPostcode
POSTCODE:Suburb = 'BURWOOD'
POSTCODE:State_Territory = 'vic'
POSTCODE:Postcode = '3125'
DO GetPostcode
POSTCODE:Suburb = 'burwood'
POSTCODE:State_Territory = 'vic'
POSTCODE:Postcode = '3125'
DO GetPostcode
GetPostcode ROUTINE
debugmessage(' attempting with: ' & clip(left(POSTCODE:Suburb)) & '/' & CLIP(LEFT(POSTCODE:State_Territory)) & '/' & CLIP(LEFT(POSTCODE:Postcode)))
GET(POSTCODE,POSTCODE:POSTCODE_PK)
IF ERRORCODE()
debugmessage(' get failed')
debugmessage(' error: ' & errorcode() & ' - ' & clip(error()))
debugmessage(' fileerror: ' & fileerrorcode() & ' - ' & clip(fileerror()))
ELSE
debugmessage(' get succeeded')
END
debugmessage(' returned: ' & clip(left(POSTCODE:Suburb)) & '/' & CLIP(LEFT(POSTCODE:State_Territory)) & '/' & CLIP(LEFT(POSTCODE:Postcode)))
debugmessage('')
It’s a kooky one, (almost) any ideas or suggestions will be tested.
Cheers,
Andrew.