Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
01-14-2007, 12:48 PM #1
- Join Date
- Jan 2007
- Chennai, Tamil Nadu, India
- Thanked 0 Times in 0 Posts
Access no error if string length > 255
i have a database and in that a field name desc for storing lengthy text...
actually the text length in access is 255 but i tried to store more that 255
i didnt get any error at the same time the data didnt get stored...
str="insert into table1 values('sa',' text more that 255 letterx')
on error resume next
if err.Number<>0 then
the above code didnt show any error and it didnt get saved...
how to know whether an operation is successful in access or asp...
Last edited by jayapalchandran; 01-14-2007 at 12:49 PM. Reason: an errorhttp://vikku.info/
- யானைக்கும் அடிசறுக்கும்
01-14-2007, 09:06 PM #2
- Join Date
- Dec 2002
- Arlington, Texas USA
- Thanked 8 Times in 8 Posts
Why would you wait to see if you get an error? Why not validate before you try to do the insert? Then there is no error
Also if you know that there will be a lot of times where the value can be more than 255 characters, limit the input on the client side to 255 characters or change the data type to memo which allows for more than 255 charactersCode:If Len(somevariable) > 255 Then 'Handle before an error ocurs Else 'Do your insert End IF
Last edited by miranda; 01-14-2007 at 09:09 PM.