Solved

Make Data proper Case before Insertion

Posted on 2011-02-15
5
330 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
Comment Utility

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
Comment Utility
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
Comment Utility
Can anyone else tell me where this code should go in my example?
0
 

Author Comment

by:kellysmith120
Comment Utility

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
Comment Utility
Although technically accurate, did not work with my circumstances using Formview.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

744 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

16 Experts available now in Live!

Get 1:1 Help Now