Print Thread
TOracleDataSet and Locate by blanks
#6143 03/03/04 06:59 PM
Joined: Apr 2003
Posts: 12
M
Member
OP Offline
Member
M
Joined: Apr 2003
Posts: 12
Hi,

i just encountered a problem using the Locate-function of the OracleDataSet. I've field which sometimes contains 10 blanks. The method will fail because the search criteria is trimmed and the original value in the dataset not (see function NullField).

What would you suggest?

kindly regards,

Matt

Re: TOracleDataSet and Locate by blanks
#6144 03/03/04 10:28 PM
Joined: Aug 1999
Posts: 22,226
Member
Offline
Member
Joined: Aug 1999
Posts: 22,226
If spaces are significant, you can set TOracleSession.Preferences.TrimStringFields to False. This way all trailing spaces will be preserved in the result set of a dataset.


Marco Kalter
Allround Automations
Re: TOracleDataSet and Locate by blanks
#6145 03/04/04 01:43 PM
Joined: Apr 2003
Posts: 12
M
Member
OP Offline
Member
M
Joined: Apr 2003
Posts: 12
Hi Marco,

thanks for your answer. But I already set TrimFields to false. As far as I can see it concerns the method SearchRecord where you're iterating through the FieldList. If the criteria is a ftString you do a StringArray[f] := TrimRight(Value); The trim method which cares about the setting is TrimString, I think.

Well, hope this will help. Thanks for your answer.

kindly Regards,

Matthias

Re: TOracleDataSet and Locate by blanks
#6146 03/04/04 10:58 PM
Joined: Aug 1999
Posts: 22,226
Member
Offline
Member
Joined: Aug 1999
Posts: 22,226
Hmm, I think this should be:

StringArray[f] := TrimString(Value);

Can you try this?


Marco Kalter
Allround Automations
Re: TOracleDataSet and Locate by blanks
#6147 03/08/04 01:15 PM
Joined: Apr 2003
Posts: 12
M
Member
OP Offline
Member
M
Joined: Apr 2003
Posts: 12
Hi Marco,

well, this is working - as expected. Are you going to fix this in your package?

thanks,

Matthias

Re: TOracleDataSet and Locate by blanks
#6148 03/08/04 11:05 PM
Joined: Aug 1999
Posts: 22,226
Member
Offline
Member
Joined: Aug 1999
Posts: 22,226
Of course smile


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.024s Queries: 13 (0.005s) Memory: 2.5185 MB (Peak: 3.0422 MB) Data Comp: Off Server Time: 2024-06-03 00:07:58 UTC
Valid HTML 5 and Valid CSS