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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Data Type max size not working? (Enterprise Manager)

Status
Not open for further replies.

thisengineburns

Programmer
Joined
Nov 12, 2003
Messages
4
Location
US
Hello,
Im new at SQL and have Enterprise Manager to build my tables. I work with PHP and have a field that I need to hold a large amount of data (like a page of typed text). I set the field to be "TEXT" with a max size of "8000" but still it only saves the first 251 characters or so...

What am i doing wrong?

Thank you for your help!

michael wolff
 
If you don't need to store more than 8000 characters then use the varchar(8000) data type.

If you DO need to store more than that then use text. You can't actually specify a max length for this type - it can hold up to ~2GB of data. If you can't see it storing this much then it will be a problem either with how you are inserting the data or with how you are retrieving and displaying it, eg if you are using Query Analyzer then by default it will only show the first 256 characters of any data.

--James
 
im inserting it with either an INSERT or an UPDATE via PHP script.... and i display/retrieve it via a SELECT...

im new at SQL and havent had this problem using mySQL...

thank you James,

michael wolff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top