Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Limitation in Database

Status
Not open for further replies.

DeZiner

Programmer
Joined
May 17, 2001
Messages
815
Location
US
I am playing with a 'news' type site and want to pull full news columns from the database. If I set up a user interface to log on to a site and enter the story (writing the info to the database through a form) then pull the info to write to the web page, am I limited to the number of characters in each 'story'?

If yes: Is this the database (currently using access)?
How about mySQL server, any limits?
Any suggestions? DeZiner
gear.gif width=45 align=left
When the gears stop turning,
we all stop learning.
 
Hi,
the simplest table definition for this type of application is

CREATE TABLE newsitems
(
article CHAR(30),
LineNumber INT,
text varCHAR(4096)
)
PRIMARY INDEX( article );

then the SQL would be something like

sel text from newsitems
where article = 'users request'
order by linenumber;

This will allow you to have an infinite size article.

Now how you break the articles into "LINES" to insert them into this table is up to you. At a minimum they sould be broke on EOLN ( "\n" ) so that when you select them out of they format properly.

Maybe paragraph boundaries if you can determine that when you insert them.
 
If you are going to use Access as your database(not recommended!) you can set the column to "memo" attribute and will allow over 2million characters for that record column.

MySQL will work better as it is not a desktop app. There are good tutorials available on the subject.

Peace out. D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top