returning proper case in asp query results for better display

Posted on 2006-05-29
Last Modified: 2010-04-07
I have an intranet for my practice. I had several .asp pages developed so employees and docotors can see patient data in realtime. The .asp pages run various  queries that return data basically diplayed in table format.  The table is created with HTML.  The data is written cell by cell via response.write as follows:

 Do While Not rsData.EOF
  response.write "<tr>"
  response.write " <td>" & rsData("doctype") & "</td>"
  response.write " <td>" & rsData("acctno") & "</td>"
  response.write " <td>" & rsData("patln") & ", " & rsData("patfn") & "</td>"
  response.write " <td>" & rsData("dateinj") & "</td>"  etc

All data is displayed in uppercase -- I would like to find a way to see proper case -- as most data should be for the sake of my intranet. I have tried to use the "transform-text: capitalize" however this only effects the HTML / table and has no effect on the data that is rendered after the .asp query runs. I would appreciate any advice. Thank You!
Question by:drfjf
    LVL 7

    Expert Comment

    I typically write a server side ASP function called PCase that converts strings to proper case.

    If you tell me which version of ASP you are using (6, .Net), I will give you an example to use.

    LVL 35

    Accepted Solution

    You need to realize that you can never get 100% accurate.

    However, what I use is a function in SQL server that proper cases the data as it is pulled from the server.,289483,sid8_gci800354,00.html

    I started with the above and massaged to include more cases that our organization needed.  You can do the same.
    LVL 7

    Assisted Solution

    mrichmon is right. There will be cases where there is a title (Such as DVM, DDM, etc) that will end up being Dvm & Ddm. The only way I have found to handle this is with an exceptions list that must be maintained. So there isn't a simple way to create a foolproof Proper Case function.

    LVL 7

    Expert Comment

    Sounds good.


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
    Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
    The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
    The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

    728 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

    18 Experts available now in Live!

    Get 1:1 Help Now