Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Data from Form to SQL in UPPER case
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

15 Posts

Posted - 11/30/2012 :  10:48:26  Show Profile  Reply with Quote
I have a form where customer data is entered. To speed up productivity, I want the users to be able to just type names and addresses and such and not worry about upper and lower case. I want it to convert to all UPPER when the user clickes submit on the form. I have an insert query and I have tried to add the UPPER function to it as well as the UCase, but it will not work. Here is what the query looks like and it works, but does not convert to UPPER case.

myConn.execute "INSERT INTO TFSRequests (LogonUser, cFirstName, cLastName, MaskedNum, PhnNum, Addr, City, State, Zip, Amt, ReasonFK, rcdCreateDate) Values ('" & request.form("strEntUser") & "', '" & request.form("strcFirstName") & "', '" & request.form("strcLastName") & "', '" & request.form("strMaskedNum") & "', '" & request.form("strPhnNum") & "', '" & request.form("strAddr") & "', '" & request.form("strCity") & "', '" & request.form("strState") & "', '" & request.form("strZip") & "', " & request.form("strAmt") & ", '" & request.form("strReasonID") & "', '" & Now() & "')"

Any assistance is greatly appreciated.
David V

Elizabeth B. Darcy
Starting Member

United Kingdom
39 Posts

Posted - 11/30/2012 :  17:56:12  Show Profile  Reply with Quote
If you would like to convert it to upper case in SQL, change each value in your values clause like shown below:
Values (UPPER('"& request.form("strEntUser") & "'), 
UPPER('" & request.form("strcFirstName") & "'),p

-- Yes, I am indeed a fictional character.
Go to Top of Page

Starting Member

15 Posts

Posted - 12/04/2012 :  17:49:38  Show Profile  Reply with Quote
Thanks Elizabeth, that did work.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000