473,770 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Capital Letters

I have a form which people use to register in a database. The form passes
the input data to an asp page that then updates the database.

The thing is, people often don't bother starting their firstname & surname
with a capital letter on the form. When this data is dispalyed on other
pages it would look so much better if they did.

Does anybody know a way of manipulating the input so that I can substitute
the first letter of an input string for a capital letter before I update the
database?

Some code would be great.

Cheers.
Jul 19 '05 #1
7 6629
"Miguel Orrego" <mi****@stresse dmonkey.net-nospam> wrote in message
news:3f******** *************** @news.dial.pipe x.com...
I have a form which people use to register in a database. The form passes
the input data to an asp page that then updates the database.

The thing is, people often don't bother starting their firstname & surname
with a capital letter on the form. When this data is dispalyed on other
pages it would look so much better if they did.

Does anybody know a way of manipulating the input so that I can substitute
the first letter of an input string for a capital letter before I update the database?

Some code would be great.


fname = ucase(left(firs tname, 1)) & right(firstname , len(firstname)-1)

Seems kinda sloppy, but it should work. Any quicker methods?

--
Mike
Jul 19 '05 #2
> Does anybody know a way of manipulating the input so that I can substitute
the first letter of an input string for a capital letter before I update the database?


firstname = capit(firstname )

function capit(str)
str = ucase(left(str, 1)) & mid(str,2)
end function
Jul 19 '05 #3
Mike wrote:
"Miguel Orrego" <mi****@stresse dmonkey.net-nospam> wrote in message
news:3f******** *************** @news.dial.pipe x.com...
...
Does anybody know a way of manipulating the input so that I can
substitute the first letter of an input string for a capital letter
before I update the database?

Some code would be great.


fname = ucase(left(firs tname, 1)) & right(firstname , len(firstname)-1)

Seems kinda sloppy, but it should work. Any quicker methods?


depends on what use the data is required for.

To output to HTML one could employ CSS: see 'text-transform' and
'first-letter' in your favourite search engine.

--
William Tasso - http://WilliamTasso.com
Jul 19 '05 #4
> function capit(str)
str = ucase(left(str, 1)) & mid(str,2)
end function


Oops... this should read..

function capit(str)
capit= ucase(left(str, 1)) & mid(str,2)
end function
Jul 19 '05 #5
Randy Rahbar wrote on 19 aug 2003 in
microsoft.publi c.inetserver.as p.general:
function capit(str)
str = ucase(left(str, 1)) & mid(str,2)
end function


Oops... this should read..

function capit(str)
capit= ucase(left(str, 1)) & mid(str,2)
end function


capit= ucase(left(str, 1)) & lcase(mid(str,2 ))

Some people are called O'Brian:

=============== ======

Function ProperCase(a)
b=""
notyet=true
For i=1 to Len(a)
m=mid(a,i,1)
If notyet Then
b=b+Ucase(m)
Else
b=b+Lcase(m)
End If
If Ucase(m)=Lcase( m) Then
notyet= true
Else
notyet=false
End If
Next
ProperCase=b
End Function

=============== ======

For a Dutch site,
the lowering of "van", de", "der" should be considered.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #6
In news:3f******** *************** @news.dial.pipe x.com,
Miguel Orrego <mi****@stresse dmonkey.net-nospam> typed:
: I have a form which people use to register in a database. The form
: passes the input data to an asp page that then updates the database.
:
: The thing is, people often don't bother starting their firstname &
: surname with a capital letter on the form. When this data is
: dispalyed on other pages it would look so much better if they did.

Not to be too coy, but it would look better to *you*. Why decide? Let the
user type the name in how they want to it appear (with obvious limitations
on "special/extended" characters). Give the user the ability to change the
way their name appears and leave it at that.

As mentioned in another post a dutch name with "de" should be left in lower
case, you would suggest changing it to:

Hans de Husen to Hans De Husen, which to the user, would not "look much
better" if you did.

My 2 cents, don't sweat the small stuff.

Don Verhagen
Tandem Staffing Solutions, Inc.


: Does anybody know a way of manipulating the input so that I can
: substitute the first letter of an input string for a capital letter
: before I update the database?
:
: Some code would be great.
:
: Cheers.
Jul 19 '05 #7
"Evertjan." wrote:

Yes, empty strings exist.

No, you cannot type them in.


I am, for better or worse, stuck with a mind that accepts nothing at face
value, so I gave this some thought, and concur.

I note, however, that (a) you can un-type a non-empty string (thus making it
empty), and (b) you can type a NULL value in Enterprise Manager (CTRL+0).
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11003
by: Jeff | last post by:
Hi, I am trying to insert a space before all capital letters in a string except the first occurrence. For example: FirstSecondThird would become First Second Third Is there a regular expression or short function that can do this?
4
10772
by: Carlos Marangon | last post by:
Hello! People go to sign my guestbook and wrote all text in capital letters. Did you know any script that shows an window alert when one types the second capital letter? Best regards,
1
3138
by: thomaz | last post by:
How I can place in capital letters the text of a COMBOBOX? For TEXTBOX I use: textBox1.CharacterCasing = CharacterCasing.Upper;... How to make the same for a COMBOBOX? There isnt a CharacterCasing metod for a COMBOBOX...
3
3010
by: Bertha94 | last post by:
I am trying to set certain cells to capitalize any input whethere they have the caps lock on or not. I have toyed with "Private Sub Workbook_SheetChange" to turn all changes into an object with capital letters, but I am afraid if anyone ever removed the protection, that could be dangerous. I have also set the font on some of my worksheets to Perpetua Titling MT, which works well except that the font is a little funky. For some reason, on my...
0
2693
by: wbosw | last post by:
I'm trying to create a regex to find more than one capital letter position within a word. The below regex, finds the first capital letter in the word and returns the index for that character. I would like to find both capital letter positions in the word heLLo and return both positions. Does anyone have any suggestions. Thanks in advance, Wbos Public Function FindPosition(ByVal word As String) ' Create a new Regex object....
2
3999
by: inferi9 | last post by:
hi, I am writng a program that takes a string and it must output if it is a palindrome, A palindrome is a string that is spelled and read the same way forward and backward, it workes fine with one word but if there is spaces or capital lettersor commas it won't work I used getline but without any effect.here is the code. #include <iostream> #include <string> using namespace std; int main () {
3
3092
by: phpmel | last post by:
I have a username that is Joined together as follows JohnSmith The first letter in each of the first and last name is Capital Can some one help me write a php function to split the name and get John Smith. I am not sure what functions to use.
5
16991
Presto731
by: Presto731 | last post by:
HOW do i make the letters in various fields on a form always be capital no matter if they used capital letters or not when typing?
1
2332
by: minimatrix | last post by:
Hi guys just wandering if I could get a little help! , I have wrote a Perl script to sort out some data in my database, I am saving into an sql file but having a few problems executing the sql because of capital letters. I have been given a list of 'From' and 'To' names, as there are multiple entries in my DB eg. Fred Bloggs, Bloggs Fred, F Bloggs are all the same person but I have organised the list like so. Bloggs Fred, Fred Bloggs F...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.