inserting a textarea text into a db

liunx

Guest
i have tried to insert a text from a textaread to a DB where the col defined as nvarchar(4000)
when i try to do this i have 2 problem :
1)characters like (') or (") make me problem with the insert string
2)i am getting a message that max cgars allowed to insert is 128
(i am trying to insert hebrew text)
what can be the problem?
thnaks i nadvance
pelegI'm not sure about your request, buy make the sure that the MaxLength attribute of the textbox is set to "4000"what kind of db are you using? If it is access make s ure the db field type is memo.I'm not sure about your request, buy make the sure that the MaxLength attribute of the textbox is set to "4000"
there is no maxlength attribute for a text area, textbox yes, but this is a text area.i think asp tags have maxlength?! i'm not sure but i guess soI don't believe so. I think there is but it only works with a single line one and does nothing for multiline and oyu have to do it manually with an if statement.You should be using SQL parameters, doing so will solve both of your problems and add some protection against SQL injection. The asp textbox accepts a Maxlength attribute for both single and multiple line text boxes however it only works for the single line textbox. For multiline textboxes you should manually check the max length is not exceeded on each postback. If your users exceed the 4000 character size then SQL will throw an error about truncating strings.ok thanks alot
 
Back
Top