|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
cfqueryparam maxlength
hiRichard White 05/17/08 05:13 A Short of looking at it myself, I'd double check the value you're using isn'tAdrian Lynch 05/17/08 03:06 P >Short of looking at it myself, I'd double check the value you're using isn'tRichard White 05/17/08 04:52 P hi i have set my cfgueryparam's maxlength value to the length in the database. for example first name in the db is varchar 20 - so when i query it i code it to say where firstName = <cfqueryparam ... maxlength="20".. but when i pass in a first name of exactly 20 characters, it displays an error saying it is 20 chars long and therefore not valid. the way i have had to get round it is to set the maxlength to 21 is this normal? am i missing something? or is there a big in the cfqueryparam? thanks for your help Short of looking at it myself, I'd double check the value you're using isn't 21 in length maybe because of a space. Above the cfqueryparam, output Len(yourValue). Or try trimming. Adrian http://www.adrianlynch.co.uk/ hi i have set my cfgueryparam's maxlength value to the length in the database. for example first name in the db is varchar 20 - so when i query it i code it to say where firstName = <cfqueryparam ... maxlength="20".. but when i pass in a first name of exactly 20 characters, it displays an error saying it is 20 chars long and therefore not valid. the way i have had to get round it is to set the maxlength to 21 is this normal? am i missing something? or is there a big in the cfqueryparam? thanks for your help >Short of looking at it myself, I'd double check the value you're using isn't >21 in length maybe because of a space. your absolutely right, i had a space - which brought me to an error in another part of my code!!! thanks very much adrian
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||