Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Char vs Oracle Varchar2 data question
Message
From
25/10/2006 18:18:15
 
 
To
25/10/2006 12:22:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01164448
Message ID:
01164593
Views:
10
This message has been marked as the solution to the initial question of the thread.
>Hi all,
>I have a question regarding the storing and retrieving of character data into and from Oracle. Given that I have this table in Oracle:
>
>MyTable.MyField Varchar2(10) NOT NULL
>
>
>From an updateable view in VFP, these behaviors are observed.
>
>select vw_MyTable
>append blank
>replace MyField with 'X' && will send and store 'X         ' to Oracle.
>tableupdate()
>* and such
>requery('vw_MyTable')
>? len(MyField) && 10
>? MyField + "YZ" && 'X        YZ'
>
>
>This example shows that VFP padded the spaces when the data was sent to Oracle. Is there a way (maybe a setting) that will autotrim the data when sending back to Oracle? VFP9 solution is acceptable.
>The desired results will be:
>1. Data is sent/stored in Oracle as 'X' with no spaces padded, thereby optimizing physical data storage - which is the reason for the Varchar2 Oracle data type.
>2. Data comes back (as it is right now) as C(10).

try, into the datasession:
CURSORSETPROP("MapVarchar",.T.,0)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform