Subject | query creating "Malformed String" when it worked before |
---|---|
Author | Chuck Belanger |
Post date | 2012-11-01T21:57:09Z |
Hello:
Below is a query using in XE2, IBO 5+ beta. Originally, IBOQuery, then
tried IB_Query both threw a "Malformed String" error followed by a I/O
32 Error. Interestingly, this did not trigger a madExcept error.
This query works just fine off the same DB within the SQL Editor of
IB_Expert.
SQL.Add('Select pt_id, F_Str2Str(Name_Last,'+InttoStr(TV.HPW)+')||'',
''||');
SQL.Add('f_str2str(Name_First,'+inttoStr(TV.HPW)+') as FullName FROM
Patients');
SQL.Add('order by Name_Last');
Open;
If I remove the concantenation and separate the last and first names
then it opens fine.
SQL.Add('Select pt_id, F_Str2Str(Name_Last,'+InttoStr(TV.HPW)+'), ');
SQL.Add('f_str2str(Name_First,'+inttoStr(TV.HPW)+') as FullName FROM
Patients');
SQL.Add('order by Name_Last');
f_str2str() is a udf to scramble the patient table columns.
This has worked fine in D2007/Win7 environment and even with other DBs
in this newer XE2 version of my application. The only difference is that
this Patient table does have Hispanic names in it with the various
characters to support that.
What's going on?
Thank you,
Chuck Belanger
Below is a query using in XE2, IBO 5+ beta. Originally, IBOQuery, then
tried IB_Query both threw a "Malformed String" error followed by a I/O
32 Error. Interestingly, this did not trigger a madExcept error.
This query works just fine off the same DB within the SQL Editor of
IB_Expert.
SQL.Add('Select pt_id, F_Str2Str(Name_Last,'+InttoStr(TV.HPW)+')||'',
''||');
SQL.Add('f_str2str(Name_First,'+inttoStr(TV.HPW)+') as FullName FROM
Patients');
SQL.Add('order by Name_Last');
Open;
If I remove the concantenation and separate the last and first names
then it opens fine.
SQL.Add('Select pt_id, F_Str2Str(Name_Last,'+InttoStr(TV.HPW)+'), ');
SQL.Add('f_str2str(Name_First,'+inttoStr(TV.HPW)+') as FullName FROM
Patients');
SQL.Add('order by Name_Last');
f_str2str() is a udf to scramble the patient table columns.
This has worked fine in D2007/Win7 environment and even with other DBs
in this newer XE2 version of my application. The only difference is that
this Patient table does have Hispanic names in it with the various
characters to support that.
What's going on?
Thank you,
Chuck Belanger