Solved

Make Data proper Case before Insertion

Posted on 2011-02-15
5
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

734 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