upper and lower case (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


pd_it_guy -> upper and lower case (6/18/2008 12:55:17)

In an FP database, one of the fields is for license number. The data entry people find it easiest to just enter numbers and lower case letters so as not to have to shift, but for appearance and convention, all text characters in a license number are upper case. At some point therefore I want to make all alphas upper. Since the new record addition is a database generated routine there is not much chance to edit. Whats the best way to get the text to upper before or as it is written as a new record.

Here's the segment where it appears the form variable gets set up to do an INSERT INTO, but any attempt to add a Vb UPPER to this gets wiped out when I save the page. Is there any way to modify this or is this even where it needs ot happen. Thanks.

arFormFields0(6) = "license_number"
arFormDBFields0(6) = "license_number"
arFormValues0(6) = Request("license_number")




rdouglass -> RE: upper and lower case (6/18/2008 12:58:28)

quote:

arFormValues0(6) = Request("license_number")


You can't do this?

arFormValues0(6) = ucase(Request("license_number") & "")




pd_it_guy -> RE: upper and lower case (6/18/2008 13:01:44)

Thanks for the almost instant reply. Let me try it and I will report back.




pd_it_guy -> RE: upper and lower case (6/18/2008 13:07:04)

When I added the code you suggested, and tried to save it, it rejected the change. This has happened every time I try to edit any pre generated code. Should I put this on <the diet> and just do an INSERT INTO. Or, how can I save it. Thanks




rdouglass -> RE: upper and lower case (6/18/2008 15:03:35)

quote:

Should I put this on <the diet> and just do an INSERT INTO.


Oh yes, sorry. Didn't realize it was a DRW. Make a backup and do the diet. At least that would be what I'd do. I don't use the DRW anymore but the ucase should work otherwise.

Hope it helps.




pd_it_guy -> RE: upper and lower case (6/18/2008 15:15:40)

That is what I thought. I will post back.




pd_it_guy -> RE: upper and lower case (6/18/2008 16:24:57)

Diet and exercise can work wonders.

We now have only about 1/10 the lines of code as compared to the DR region we started with and the UCASE command works perfectly. Whatta great way to clean up sloppy entry, before it gets in to the DB.

I do thank you once again...




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.882813E-02