Print Thread
Don't update string field
#7099 12/15/04 06:18 PM
Joined: Jan 2000
Posts: 9
France
C
cadotp Offline OP
Member
OP Offline
Member
C
Joined: Jan 2000
Posts: 9
France
I am using a TDBEdit for a string field of my DataSet. When the dataset is in edit mode, I change value of field string by deleting end spaces of the string. In the database, my string field type is VARCHAR2(19).
But when I post (and commit), spaces at the end of the string are still there !
When I set Debug property of dataset to True, I can see that my string field is not updated.

Why does string field seem to be trimed before verifying if it is necessary to be updated ?

How can I force my field to be flagged as a field to be updated ?

Thanks a lot.

Oracle 8.1.7, OCI 8.1, DOA 4.0.6, Delphi 7 Ent.

Re: Don't update string field
#7100 12/15/04 10:20 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
By default trailing spaces will be ignored by the dataset. You can set TOracleSession.Preferences.TrimStringFields to False to omit this.


Marco Kalter
Allround Automations
Re: Don't update string field
#7101 12/16/04 01:40 PM
Joined: Jan 2000
Posts: 9
France
C
cadotp Offline OP
Member
OP Offline
Member
C
Joined: Jan 2000
Posts: 9
France
Thanks a lot Marco !

It works as I want by modifying this property cool .
I've looked around StringField properties eek , DataSet properties eek , but not until OracleSession properties confused .

I was sure you got the answer... wink


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.029s Queries: 13 (0.008s) Memory: 2.5050 MB (Peak: 3.0428 MB) Data Comp: Off Server Time: 2024-05-17 02:18:25 UTC
Valid HTML 5 and Valid CSS