Jump to content

[SOLVED] PHP + Database Text + Size


GroundVibes

Recommended Posts

Hello all!
This is my first time on this forum so hello to you all!

I usually search on google when I get errors but this one I don't exactly know...
See I've got apache installed in French for some odd reason on my computer (maybe because I am in quebec and I don't know hehe!) and well my errors are pasted in french, so most of the time I can simply paste it on google and find my solution...

Error goes like this:
[quote]Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Microsoft JET Database Engine<br/><b>Description:</b> Le champ est trop petit pour accepter la quantité de données que vous voulez ajouter. Essayez d'insérer ou de coller moins de données.' in C:\Program Files\Apache Group\Apache2\htdocs\MesPensees\addMessage.php:16 Stack trace: #0 C:\Program Files\Apache Group\Apache2\htdocs\MesPensees\addMessage.php(16): com->Execute('INSERT INTO Mes...') #1 {main} thrown in C:\Program Files\Apache Group\Apache2\htdocs\MesPensees\addMessage.php on line 16[/quote]

This line "Le champ est trop petit pour accepter la quantité de données que vous voulez ajouter. Essayez d'insérer ou de coller moins de données." Says in other words : "The input field is too small to accept the quantity of data that you wish to add. Try and insert or paste less data".

Alright, so i'll give you a brief description of whats going on...

I am making a website that get user submitted text and then displays them on the main page.
Right now, what happens is that There is a "textarea" which accepts text from the user...
It adds the message to my database in a text field with the size of "255" as it is the biggest it can hold (I think).

The problem is, it works with a message under around 220 characters... When it should work with 255 like I think it should... And when the characters exceed the 220, I get this error and so forth... So right now I'dd like to know how I can really get it to be 255 and not 220 and also how I can make it to have maybe at most 1000 characters? Do I need to make 4 text fields within my database and divide the text or there is something really easy I am not seeing?

Anyway, I thank you all for your patience and help.
Have a good day!


Link to comment
https://forums.phpfreaks.com/topic/32110-solved-php-database-text-size/
Share on other sites

Well, I have an Access database and well, my field is defined as "Text" and the note I get by definining the Field Size is that "The largest maximum you can set is 255".

I also managed to fix my error, I set a character maximum of 254 in my textarea box... with this "onKeyPress="return ( this.value.length < 254 );"

But If anyone can tell me how I can set my access database to be able to accept more than 255 characters, I would really appreciate it... I am not working with Oracle or anything, simply Access.

Anyway, thx you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.