3 Replies - 903 Views - Last Post: 09 January 2010 - 06:08 PM Rate Topic: -----

#1 prof1990  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 01-January 10

Problem with retrieving data from my database

Posted 08 January 2010 - 02:56 PM

Hello Guys

I have a problem with my asp website I'm Coding with C# and i face a problem which disappointing me is that :

i'm retrieving a data from Column info form my database but the column contains a very large data and i want to customize this data by adding new line the the data and changing the color of some data

the data that i retrieving it appears in this form


Highly qualified and experienced medical staff (from German and Austria for 10 years ) after post graduation doctor degree and highly equipped medical service in the following pediatric subspecialties: \n1- Neonatology and Neonatal Intensive Care Unit: NICU 2- Pediatric intensive care unit: PICU 3- Intermediate or Transitional intensive care unit: TICU 4- Pediatric cardiology. 5- Pediatric Respiratory diseases. 6- Pediatric endocrinology. 7- Pediatric oncology. 8- Pediatric hematology. 9- Pediatric metabolic diseases 10- Pediatric Gastroenterology and Hepatology. 11- Pediatric Haematology. 12- Pediatric Nephrology. 13- Pediatric Urology. 14- Pediatric Dermatology. 15- Pediatric ENT. 16- Pediatric Infectious and Tropical Diseases. 17- Genetics and Congenital Anomalies. 18- Growth and Development. 19- Pediatric Allergic Diseases. 20- Pediatric Immunological Diseases. 21- Pediatric Psychiatry. 22- Pre and Post operative care in: Pediatric surgery, Pediatric Transplantation, Orthopaedics, Neurosurgeries. Follow up of pediatrics patients during the first year of life: The infants which will be included in this system will have:- 1- O.P.D visit once per month to consultant clinic. 2- All vaccines are free. 3- ER visits at many time are free. 4- Regular follow up of all stages of growth and development of the infant. 5- Giving all instructions to parents which is important for the infant in period of his life. Pediatric Asthma Clinic: Services in this clinic:- 1- Management of all pediatric patients with chest diseases and bronchial asthma. 2- Management of pulmonary functions of pediatric patients with chronic chest problems. 3- Training of children and parents on using inhaler devices. 4- Doing all investigations for diagnosing and follow up of chest problems in children. 5- Giving regular health education programs for children and parents regarding chest problems and pediatric bronchial asthma. For more information Call: 8406000 Ext: 5121



and i need it to appear in that form :


Highly qualified and experienced medical staff (from German and Austria for 10 years ) after post graduation doctor degree and highly equipped medical service in the following pediatric subspecialties:

1- Neonatology and Neonatal Intensive Care Unit: NICU
2- Pediatric intensive care unit: PICU
3- Intermediate or Transitional intensive care unit: TICU
4- Pediatric cardiology.
5- Pediatric Respiratory diseases.
6- Pediatric endocrinology.
7- Pediatric oncology.
8- Pediatric hematology.
9- Pediatric metabolic diseases
10- Pediatric Gastroenterology and Hepatology.
11- Pediatric Haematology.
12- Pediatric Nephrology.
13- Pediatric Urology.
14- Pediatric Dermatology.
15- Pediatric ENT.
16- Pediatric Infectious and Tropical Diseases.
17- Genetics and Congenital Anomalies.
18- Growth and Development.
19- Pediatric Allergic Diseases.
20- Pediatric Immunological Diseases.
21- Pediatric Psychiatry.
22- Pre and Post operative care in:
Pediatric surgery, Pediatric Transplantation, Orthopaedics, Neurosurgeries.

Follow up of pediatrics patients during the first year of life:

The infants which will be included in this system will have:-
1- O.P.D visit once per month to consultant clinic.
2- All vaccines are free.
3- ER visits at many time are free.
4- Regular follow up of all stages of growth and development of the infant.
5- Giving all instructions to parents which is important for the infant in period of his life.

Pediatric Asthma Clinic:

Services in this clinic:-


1- Management of all pediatric patients with chest diseases and bronchial asthma.
2- Management of pulmonary functions of pediatric patients with chronic chest problems.
3- Training of children and parents on using inhaler devices.
4- Doing all investigations for diagnosing and follow up of chest problems in children.
5- Giving regular health education programs for children and parents regarding chest problems and pediatric bronchial asthma.

For more information
Call: 8406000 Ext: 5121



so i need to customize this data to make a new line after the end of the line

Important note : I'm using a details list to preview the data

Is This A Good Question/Topic? 0
  • +

Replies To: Problem with retrieving data from my database

#2 itpro4470  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 156
  • Joined: 17-June 07

Re: Problem with retrieving data from my database

Posted 08 January 2010 - 03:08 PM

The data you're getting from your database... is it all in one long string? If it is then I'd say you'd have to use regular expressions to pull out the data. The pattern I notices is all of the numbered lines have an number then a - such as 4- or 11- those should be easy to pull out. Then look for a patern for the other paragraphs. Once you have everything in separate strings you can apply formatting.
Was This Post Helpful? 0
  • +
  • -

#3 prof1990  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 01-January 10

Re: Problem with retrieving data from my database

Posted 09 January 2010 - 02:08 PM

sorry i can't understand you :S

I'm beginner in ASP

and i'm getting the data from the database in a data type Text in SQl 2005

This post has been edited by prof1990: 09 January 2010 - 02:44 PM

Was This Post Helpful? 0
  • +
  • -

#4 June7  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 104
  • View blog
  • Posts: 904
  • Joined: 09-December 08

Re: Problem with retrieving data from my database

Posted 09 January 2010 - 06:08 PM

Use string manipulation functions to parse the string. As itpro4470 suggested, use the hyphen as reference in parsing. Unfortunately, you have two locations where a hyphen follows a colon. You will have to handle this or else modify the data stored in file to eliminate the extra hyphens.

Attempt code and post for analysis if you have specific problems.

This post has been edited by June7: 09 January 2010 - 06:09 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1