Solved

Make Data proper Case before Insertion

Posted on 2011-02-15
5
345 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

Industry Leaders: 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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
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…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

626 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