Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database control of input to fields
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00730885
Message ID:
00730988
Views:
15
Well I have a VFP 7 database with a User table. I want the UsrName to be stored in uppercase no matter what is being sent. I looked into the format of the field and tried !, but the help documentation states:
Format 
Specifies the expression for case, size, 
and style for display of the field in the 
Browse window, forms, or reports. 
Property settings within the form and 
report can override this expression. 
As you can see it is only for displaying the data back, not what is actually stored in the database for that field. When I do a '? Usrname' what is show from the command window is a lowercase UsrName and that will be what other applications will get that query the table in the database. I can overcome this problem by ensuring my middle tier changes everything to uppercase, but I thought that if I can get the database to do a few things it would be better.


>Yes. I am using it now with a VFP database that I call from ODBC. The ODBC is getting called from a wireless RF barcode scanner.
>
>I have to tell you that I would not have been able to work on this scanner project if it wasn't for VFP. The "programming language" for the scanner is so archaic. I rely on my database to do most of the work.
>
>
>>I think I should have stated 'I know that the database fields have a format area where I can put a !', but like I stated, this does not work for ensuring that the data istored correctly.
>>
>>
>>>You're on the right track. Just continue that thought into the database container. Open the database, modify the table, set the field property (format: !)
>>>
>>>
>>>>I was wondering if the database can be defined so that when a field is set up it automatically ensures that the field data is uppercased when stored. I would like the database to ensure some things happen when new data is entered into the tables. One thing is just to ensure that all UserNames are entered as uppercase. So I think that the Database can have some responsibility for ensuring this to happen, instead of a business rule or the presentation tier. I know that the fields have a format area where I can put a !, but this only displays the information as uppercase, it does not ensure that the data is stored in uppercase.
>>>>
>>>>Any suggestions please..
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform