Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Char vs Oracle Varchar2 data question
Message
From
25/10/2006 12:22:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
VFP Char vs Oracle Varchar2 data question
Miscellaneous
Thread ID:
01164448
Message ID:
01164448
Views:
48
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).
ramil
~~ learning to stand still
Next
Reply
Map
View

Click here to load this message in the networking platform