Re: Power Objects Question

From: Michael Kranzdorf <mikek_at_krt.com>
Date: 1995/12/15
Message-ID: <mikek-1512951058110001_at_franklin-tty16.jvnc.net>#1/1


In article <4ar6r4$k8_at_peg.apc.org>, gordonh_at_acslink.net.au wrote:

> 1. If you set the format string for a string value (say to upper case)
> that value is not sent back to the database in upper case.
>
> I can't see for the life of me why you can't set the string to upper
> or lower case and not expect it to put in the database as upper
> or lower case. (That is why you set a format mask at the front
> end).

I disagree - format is a display property, not a field property. What if you retrieve a lowercase string from the database - what should happen? How would dates and currency work?

how about using something like:
  postchange()
   self.value=ucase(self.value) 'this will convert and commit data in the db    inherited.postchange()

> 2. The property DATASIZE returns rubbish...
>
> I was trying to use the field property DATASIZE in a
> PostChange() method to test the size of a string entered.
> With a DATASIZE on a string field set to 5 the value returned
> was 41. To prove this point I entered the following Oracle Basic
> code to a click method for a button on the form.
>

You want LEN() not DATASIZE()

From the OPO ehelp:

"DATASIZE: (the number of bytes reserved for the value held in the control). The default DataSize is 41. If you enter no value for DataSize, or if you enter a value less than 41, the DataSize property is set to 41 bytes."

Michael Kranzdorf                                    mikek_at_krt.com
Kranzco Realty Trust       http://www.krt.com         610.941.9292
Received on Fri Dec 15 1995 - 00:00:00 CET

Original text of this message