Formatting Text From Database

I have a text field i am pulling from a database that uses vbcrlf to create line breaks.

I used the following code to replace them:

response.write Replace(rs_classes.Fields.Item("DESCRIPTION").Value, VbCrLf, "<br />")

But ran into the problem that when the field is blank, I get an error that shows a problem w/ the "replace" function.

So I tried the follwoing: Code:

View Replies


ADVERTISEMENT

Formatting Of Text Inputed For Database

As i write this post i have a variety of options to format my post such as bold, changing font, font colour, font size, putting text into paragraphs etc.

I am able to then preview all of this by clicking on "Preview Post". When i click on "Submit New Thread", my post gets stored inside a database (fully intact with paragraphs.)

I would very much appreciate anyone that can point me to script (prefferably ASP and javascript) to be able to do all of this including storing all the text fully intact (paragraphs) inside an access 2000 database.

View Replies View Related

Formatting Text From Access Database

how to display data that I have in an Access Database to be formatted in paragraph style when I have it written to my asp page - but does anyone know how I can format text to display as bolded or to show http:// as a hyperlink?

View Replies View Related

Text Box Formatting

I have an ASP site pulling from a SQL Server. When I pull a text field from the database into a text area, it keeps the formatting. If I pull the data from the database on a response.write, all of the formatting is lost. how can I prevent this from occuring?

View Replies View Related

Text Formatting

I have been having problems with an ASP page that extracts a newsletter from an Access DB. The record in the database has the proper format, meaning that after a paragraph, you can see that the enter key was pressed twice.

Problem is that when the newsletter is shown on the internet, all of the paragraphs have been run together. I don't know why this is happening.

View Replies View Related

Formatting Text

I am currently using a combination of classic ASP and Access for coming up with a ride reports system for my cycling club - I have a control panel on the website which allows admin members to update the database via forms boxes (especially multi-line boxes)

However, the only problem I am having is that when in the control panel when I include text (with line spaces), and submit this to my Access database (in a Memo field), the output doesn't include any paragraphing or line spaces and it comes out in one unwieldy block of text. way that I can include paragraph formatting within this method?

View Replies View Related

ASP Text Formatting

I am new here and need some help in formating text stream coming out of MySQL database. Following is the row I have in MySql database.....

"one - two
Three four
five"

My asp code reads this string as...

"one - tow Three four five"

For some reason I am losing all the carriage returns and line feed. Asp puts the whole string in one line. Is there any asp function that I can use to keep my original text formating that I have in the database? Code:

View Replies View Related

Formatting Of Text In Access

I have a text area within a form that collects user data and enters this
into access db. Later this text is pulled out and put onto a page.

What I want to achieve is some formatting options for the user but I only
want CR and strong and no other formatting options available.

View Replies View Related

MS Access/ASP Text Formatting

I made a website using ASP and MS Access in the back-end. One of the functions of the website is to post some news by using a web based form. Copy, paste, submit and voila! It works fine, However, Since it is mainly text that is pasted on the form, I would like to be able to keep the original formatting of the text and not to have it displayed, as is now, all together without spaces. Can anyone tell me how to achieve that wonderfull thing. Is it an Access problem or an ASP thing?

View Replies View Related

Formatting Text Area With ASP

Can anyone help me format text in a text area using ASP? I am bringing in data from a database and need to format headers for the data. Is there anyway to format this in a text area using ASP?

View Replies View Related

Text Area Formatting

I have an from that emails @ the mo But I have to insert e variables into the <boby>.

useing asp this works fine but the formatting is all over the shop I have looked on the net and can't seem to find anything that formats a textarea any ideas????

View Replies View Related

Formatting Dates From Database

The following takes from the database a list of date and displays them in a table on an asp page

...........

<td align = center><font color = "black" size = 2><b><%=trim(rs.Fields (2))%></b></font></td>

..............................

however it displayes it in this format: May 12 2003 12:00AM

Is there a simple way of getting it in the mm/dd/yyyy format without reading it in as a string first? I mean can I just change something in the above code to do this?

I was trying the following but couldnt get it working, could you tell me how to use it in this context? Code:

View Replies View Related

Formatting Database Results

I have a query that i have been having trouble with for some weeks and i am desperate to get working.

What i want to do is construct a statement from the values i pull from the database.

for example, i have 2 rows in the database, one field, called dbValue that has the values "Value 1" and "Value 2"

I want to pull the values from the database and construct an if statement like the following

if testing = Value 1 OR Value 2 then
else
end if

Could someone please help me out, the values have to be pulled from the database as they will be dynamic.

View Replies View Related

Formatting Date Field From Access Database

I am pulling legislation information and expiry dates from an access database and posting to the web. The expiry dates in access are formatted as Month Day, Year (EG.. January 1, 2006) But when they are pulled from the database to the web, they come out as 01/01/06. I know that the format we have in access is simply a mask, however we require that format be carried through.

This is likely a simple solution, however I am new to ASP and can't seem to locate any information on this. I have searched the forum for related info on this but can't find anything that relates to my specific situation.

Here's the code we are using so far...

Code:

<%
Do While NOT Recordset.Eof 'i.e. carry on looping through while there are records
Response.write "<tr><td>"'open row and first cell
Response.write Recordset("Legislation")
Response.write "</td>"'close first cell
Response.write "<td>"'open second cell
Response.write Recordset("Repealed")
Response.write "&nbsp;"
Response.write Recordset("Expiry_Date")
Response.write "</td></tr>" 'close row
Recordset.MoveNext 'move on to the next record
Loop
%>

I have also found and implemented the following code:

Code:

dt=recordset("Expiry_date")
dt=Month(dt)&"/"&day(dt)&"/"&year(dt)
response.write(dt)


This lets me change the positions of the numbers, but I can't figure out how to make it display the full month name and full year.

View Replies View Related

Text For Database

I want o create a small site and I dont see the need for a database. So I want to use a text file for this site but I don't know how!
I know I can use Mysql or Access, but I don't want to. I simply want to use a flat file as it is called.
My site is an ASP site, so can anyone guide me on how to use "flat files" for databases

View Replies View Related

Format Database Value Into Text

how can i format text so it can be read by a database? for example, for numbers i do cint(whatever). whats the equivalent for text?

View Replies View Related

Get Data Into Text Box From The Database.

I have 2 textboxes. In first text box i need to enter name, the second text box shud be automatically filled with the person'd id.

Both the name and id is coming from database. I tried using this code, but i'm getting error saying System.NullReferenceException: Object reference not set to an instance of an object. at line 1 Code:

View Replies View Related

Find Text In Database

i am building a search form by word from text field in a table. for example the table has

1. ID
2. Price
3. Note

the Note field of a record could have sentence that contains words or jargon. What sort of method or approach can i use to solve the problem? can we use sql statement? if yes what sort of?

View Replies View Related

Format Text From Database

Is it possible to store html tags in a database field so that when data is retrieved from this field the formating is retained? For example I have an address field in my database, which I return using:

<p><%=(rsType.Fields.Item("DAT_Address").Value)%>

However they are times where I may want to have my city, state etc on seperate lines by using <br>, but right now if I store a <br> in my database it does not affect the formating of my displayed address.

View Replies View Related

Text Or Include File Vs. Using Database

Question about the performance of using an include file or reading from a text file compared to hitting the database.

I set up a client's web site so they can post a weekly message and also post a "of special interest" message on their home page. Originally these messages were stored in and retrieved from an Access 2000 database. I decided to try writing the messages to a text file then retrieving it through include file and also tried the text streaming object.

I used netmechanic.com to gauge the download times for all three methods on a 56K modem. According to the results, using the database was around 4 seconds quicker. Does this sound right? The site is on a shared hosting package using Win2000.

View Replies View Related

Cleaning Up Text For Database Insertion

I'm trying to write a page that will accept form POST method variables from another page and save them to an Access database via a DSN connection. I'm using code like this:

<%
SQL = "INSERT INTO myTable (postVar1,postVar2,postVar3)"
SQL = SQL & " VALUES ('" & request.form("postVar1") & "','" & request.form("postVar2") & "','" & request.form("postVar3") & "')"

dsnConn.execute(mySQL)
%>

I'd like to make sure that I clean up the text that the user inputs before trying to send it to the database. Can someone please give me an example of what ASP code I need use to get rid of quotes, slashes, and anything else a user could enter that might mess up the SQL insert?

View Replies View Related

Inserting Messy Text Into Database?

I'm trying to put some text into the database using ADODB.Command object. Seems like a reasonable thing to do and I can do it. But in this instance my text is an HTML code which contains many quotes. But i have to save it as is into the database field.

I use:

INSERT INTO (f1, f2) VALUES (v1, v2) comand. But since my v2 contains some quotes in it, (many quotes), I get an error. (it works otherwise). Is there any way ?

View Replies View Related

Open/read A Text Database

I have a database that was originally in Excel. After modifying it, I have saved it with .txt and another one with .csv format. DB.txt (Text (Tabl delimited)(*.txt)
DB.csv (Text Comma Separated Value) (*.csv). What is the command/statement in oppening database record for these formats?

View Replies View Related

Adding Text To Database Via Browser

I am trying to make a guestbook, wich should be accessable through a executable exe. I think, the easyest way to do this, is through your browser. I am looking how to add text to a database without entering text in a form, but only text in the address bar of your browser.

View Replies View Related

Large Piece Of Text In Database?

I am looking for a script in which I can replace any word in one table
(which corresponds) to other table with a link....

To for example when the name Bill Clinton is in a large piece of text in
TABLE1 and Bill Clinton is a row in TABLE2 then I want Bill Clinton in the
text to display as a link leading to a page where there's more info on Bill
Clinton from TABLE2

I was thinking something allong the way of: Code:

View Replies View Related

Handling Text Input To Database

how do i allow the user to add in a value that has a ' in it (e.g int'l) in the form. apperantly if i do that there will be an error... how do i go about this?

View Replies View Related

Populate Dropdown With Image AND Text From The Database?

I have two columns in my microsoft access database.

1st column is company_logo (jpg image)
2nd column is company_name (text)

I want to build a form, a dropdown box which I would populate with the help of a sql statement from my database. The both columns from up there are associated.

When the user clicks on that dropdown box, I need that company_logo and company_name to be shown one beside another. It should list all the companies availible (taken from that sql statement or recordset).

Does anyone knows if this could be done?

Maybe I should stick just with the textual part?

View Replies View Related

ASP With Access Database (Input Text - Value Display)

I'm using Access Database with ASP. There is one particular thing that I
have issue with.

My purpose is for user to update their own profile. Their existing profile
information will be display in Edit Form format. The problem is if the field
has space, the second word will not display, when I display in input text
format.

E.g if My first name "User_FirstName" in my table has entry, let say "David
Johnson" as FirstName, when I execute following code and do a input text, it
will display "David" only. Code:

View Replies View Related

To Transfer The Data From Database To The Text Boxes In ASP

I need some ideas in this if you can please help me.The folllowing is the scenerio:

I have a form which is the normal html with some validations and scripting done in javascript and i have a text box by name ticket no when the user enters a ticket no which exists in my database I need to update all my other form textboxes and textboxes with the data in the database else I need to show a alert that this doent exist in the database.

usually the event handling is done in javascript but now i have to call server side connection I have no clue how to do this.

View Replies View Related

Searching Database With Multiple Text Boxes?

The user can search the database when they put in a date, that works fine, but when i put in another text box to search the database for a certain date range Code:

View Replies View Related

Parse Csv Text File Using ASP And Insert It Into Database

I am trying to create an application feature for an inventory database and I am
wondering about the most efficient way to process the updates. Here's the background information: Code:

View Replies View Related

Inserting Dynamic Text Box Data Into A Database

Does anyone know how I can insert daynamic text box data into a SQL Server database? I have text boxes that are being generated dynamically and I want each of those values inserted into the database that hold the results. I'm not sure how to write my loop statement.

View Replies View Related

Display Japanese Text On Web Page From Access Database

I've got a simple template based ASP page which pulls information in one of several different languages from an Access database.

The copy I have in the database is fine. All languages - including the Japanese are displaying correctly when I look at them in Access. However, when I pull the Japanese text from the database, each character renders in the browser as '???????'.

I've tried different HTML encoding, but nothing seems to make a difference.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved