This topic is locked

UPPER CASE

8/27/2003 12:30:55 AM
ASPRunnerPro General questions
M
MaxLm author

How do I globally set ASPrunner to save ALL data in UPPER CASE only?
Thanks,

Sergey Kornilov admin 8/27/2003

Hi,
you can use UCase function to convert data to upper case before saving.

Open ..._edit.asp file in text editor and find this portion of code (lines 101-107):

        if (Request.Form("NeedQuotes")(i))="True" then

          strValue= "'" &  Replace( Request.Form(Request.Form("FieldName")(i)) , "'", "''") & "'"

        else

          if Request.Form(Request.Form("FieldName")(i))="" then

          strValue="0"

          else

          strValue=Request.Form(Request.Form("FieldName")(i))

          end if

        end if


replace it with this code:

        if (Request.Form("NeedQuotes")(i))="True" then

          strValue= "'" &  UCase(Replace( Request.Form(Request.Form("FieldName")(i)) ), "'", "''") & "'"

        else

          if Request.Form(Request.Form("FieldName")(i))="" then

          strValue="0"

          else

          strValue=UCase(Request.Form(Request.Form("FieldName")(i)))

          end if

        end if


That should do what you need.
Sergey Kornilov

Support team

L
laboria 10/15/2004

How do you perform this for individual fields instead of the entire database?

Thanks.
(I apologize for posting to the incorrect place earlier. I am new to message boards.)

Sergey Kornilov admin 10/15/2004

You need to add a check for some specific field names also. Here is the sample code:

if Request.Form("FieldName")(i)="Field1" or  Request.Form("FieldName")(i)="Field2" then

        if (Request.Form("NeedQuotes")(i))="True" then

          strValue= "'" &  UCase(Replace( Request.Form(Request.Form("FieldName")(i)) ), "'", "''") & "'"

        else

          if Request.Form(Request.Form("FieldName")(i))="" then

          strValue="0"

          else

          strValue=UCase(Request.Form(Request.Form("FieldName")(i)))

          end if

        end if

end if

L
laboria 10/18/2004

Is there a vbscript I can enter into the default field inside of asp runner for the fields I want to be in upper case?

Sergey Kornilov admin 10/19/2004

No, modifying default values won't help because default value is applied before you enter anything into the edit box.