TrimStringFields does not work

rmathur

Member²
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

------------------
 
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
 
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...


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.

------------------
 
I tried this with the ENAME field for the DeptEmp demo project, and it works just fine...

------------------
Marco Kalter
Allround Automations
 
Originally posted by mkalter:
I tried this with the ENAME field for the DeptEmp demo project, and it works just fine...


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?

------------------
 
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
 
Can u email me a SQL for creating the data? It does not work for the table I have!
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.


------------------
 
Back
Top