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

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

Vergy39
Starting Member

USA
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.
Thanks
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

Vergy39
Starting Member

USA
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  
 New 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.08 seconds. Powered By: Snitz Forums 2000