Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Error when Text Box Max Length to big
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Error when Text Box Max Length to big

 Post Reply Post Reply Page  12>
Author
WookMaster View Drop Down
Newbie
Newbie


Joined: 29 November 2003
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote WookMaster Quote  Post ReplyReply Direct Link To This Post Topic: Error when Text Box Max Length to big
    Posted: 29 November 2003 at 9:12pm
I am writing a database where you enter data through text boxes then add them with a submit button.  When the max length is 35,  it works great but if I increase it to lets say 100 for a detailes message It will not work,  anyone know anything about this?  thanks
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 29 November 2003 at 10:41pm
the filed length in the database needs to be able to hold that amount of data.
Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2003 at 6:33am

Yeah, Wook, there are two places where you can specify maxlenght, the textbox itself, in which case input will stop when it reaches the maximum lenght, it doesn't generate any errors here, and the DB fields also can have a maxlenght, this will generate errors if the inserted data is bigger than the field allowance.

If you really need to have limits like (100), you must parse user input before inserting it into the DB, here's an example:

<%
dbALLOWANCE = 100
parsedMSG = Request.Form("txtMSG")

If Len(parsedMSG) > dbALLOWANCE Then
    Response.Write "Too Big!"
End If
%>

Hope it helps.

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2003 at 9:30am
open your table in access in design view (Right click>design view) and click on the field whose max length you want to change. at the bottom of the window there will be a value in the list called "max length" change it to a bigger integer
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2003 at 9:31am
i think that's what your problem is...
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2003 at 10:48am
standard length is 50 on text field in access so you have to increase that before increasing in the textbox in your form
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2003 at 10:53am
The maximum length for a Textfield in access is 255 so you can't store lots of data in it. Try a Memo field.
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2003 at 10:56am

there you can store up to 65 535 characters

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.