Print Thread
TrimStringFields does not work
#3324 04/19/02 03:50 AM
Joined: Mar 2000
Posts: 13
Bellerose, NY USA
R
rmathur Offline OP
Member
OP Offline
Member
R
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
#3325 04/19/02 07:22 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#3326 04/19/02 07:24 PM
Joined: Mar 2000
Posts: 13
Bellerose, NY USA
R
rmathur Offline OP
Member
OP Offline
Member
R
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
#3327 04/19/02 08:16 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#3328 04/19/02 08:30 PM
Joined: Mar 2000
Posts: 13
Bellerose, NY USA
R
rmathur Offline OP
Member
OP Offline
Member
R
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
#3329 04/24/02 10:33 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
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
#3330 04/29/02 10:14 PM
Joined: Mar 2000
Posts: 13
Bellerose, NY USA
R
rmathur Offline OP
Member
OP Offline
Member
R
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
#3331 04/30/02 08:42 PM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
You can download the script here .

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.032s Queries: 12 (0.012s) Memory: 2.5310 MB (Peak: 3.0421 MB) Data Comp: Off Server Time: 2024-05-21 21:13:54 UTC
Valid HTML 5 and Valid CSS