|
TrimStringFields does not work
|
Joined: Mar 2000
Posts: 13 Bellerose, NY USA
Member
|
OP
Member
Joined: Mar 2000
Posts: 13 Bellerose, NY USA |
Hi Marco, TrimStringFields in the OraSession Preferences does not work. This is killing me. I am exporting some string data into XML and using the TOracleDataset or TOracleQuery and it trims the string, so I am getting wrong values. Is there a quick fix for this? I am essentially writing the value of each column to an XML CDataSection. Thanx, Raj Mathur Complex Corporation
------------------
|
|
|
Re: TrimStringFields does not work
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
The TOracleQuery component will never trim strings. The TrimStringFields property only affects dataset fields. There must be some other issue here...
------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
Re: TrimStringFields does not work
|
Joined: Mar 2000
Posts: 13 Bellerose, NY USA
Member
|
OP
Member
Joined: Mar 2000
Posts: 13 Bellerose, NY USA |
[quote]Originally posted by mkalter: The TOracleQuery component will never trim strings. The TrimStringFields property only affects dataset fields. There must be some other issue here...
[/quote]
I know, I am tried TOracleDataset also, you can test this very simply, just do a select * from a table and look at any column that has a space as the last character. Even when you turn off TrimFields, it takes the space out.
------------------
|
|
|
Re: TrimStringFields does not work
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
I tried this with the ENAME field for the DeptEmp demo project, and it works just fine...
------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
Re: TrimStringFields does not work
|
Joined: Mar 2000
Posts: 13 Bellerose, NY USA
Member
|
OP
Member
Joined: Mar 2000
Posts: 13 Bellerose, NY USA |
[quote]Originally posted by mkalter: I tried this with the ENAME field for the DeptEmp demo project, and it works just fine...
[/quote]
I dunno, I have a table where one of the columns has "FAMILY " as its value and it trims the space. All I do is to copy the field to a string variable, sTempStr := FieldAsString('COLUMN'). What was your query that u ran, can u send me a sample script?
------------------
|
|
|
Re: TrimStringFields does not work
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
I tried the DeptEmp demo project. Change an employee name from "SMITH" to "SMITH ", requery it, and display the field's value. Try this with and without TrimStringFields. This works as expected for me.
------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
Re: TrimStringFields does not work
|
Joined: Mar 2000
Posts: 13 Bellerose, NY USA
Member
|
OP
Member
Joined: Mar 2000
Posts: 13 Bellerose, NY USA |
Can u email me a SQL for creating the data? It does not work for the table I have! [quote]Originally posted by mkalter: I tried the DeptEmp demo project. Change an employee name from "SMITH" to "SMITH ", requery it, and display the field's value. Try this with and without TrimStringFields. This works as expected for me.
[/quote]
------------------
|
|
|
Re: TrimStringFields does not work
|
Joined: Aug 1999
Posts: 22,221
Member
|
Member
Joined: Aug 1999
Posts: 22,221 |
You can download the script here . ------------------ Marco Kalter Allround Automations
Marco Kalter Allround Automations
|
|
|
|
|
|