Solved

Make Data proper Case before Insertion

Posted on 2011-02-15
5
332 Views
Last Modified: 2012-05-11
I have an asp.net formview built where text boxes are bound to different columns.  On several of the fields, I need to have the information put into proper case before inserting it into the database.

I've read about the str(conv), but not really sure how/where it should go.  Could someone give an easy exampl?   I'm just learning.....Thanks!
0
Comment
Question by:kellysmith120
  • 4
5 Comments
 
LVL 8

Accepted Solution

by:
PagodNaUtak earned 500 total points
ID: 34902526

Dim sText As String = "Hello World"
' Returns "hello world".
Dim sNewText As String = StrConv(sText, VbStrConv.ProperCase)

Open in new window

0
 

Author Comment

by:kellysmith120
ID: 34907170
Thanks, Pago, I think I understand that code.  The silliness that's causing me trouble is Where should it go?  For instance, my text box on my Formview looks like this

<asp:TextBox ID="testcolumnTextBox" runat="server"
                            Text='<%# Bind("testcolumn") %>' />

and my Insert Statement looks like this:

 InsertCommand="INSERT INTO [Table1] ([testcolumn]) VALUES (@testcolumn)"

There are several fields that will need this done to.  I know this must be SO simple, but I've got this great big mental block for some reason.  THANKS!
0
 

Author Comment

by:kellysmith120
ID: 34946934
Can anyone else tell me where this code should go in my example?
0
 

Author Comment

by:kellysmith120
ID: 34965586

The code given doesn't work for my example, as I'm using a Formview and parameters and bound fields.  Anyone?

0
 

Author Closing Comment

by:kellysmith120
ID: 35833981
Although technically accurate, did not work with my circumstances using Formview.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Scripting 3 97
SQL best practice question 3 36
ICACL switch help. How to include current folder 2 36
IIS Authorization for Web Service 2 21
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now