QueryExecute maxlength

Can’t figure out how to set a maxlength for queryexecute or query in
cfscript?

tried
qry=queryExecute(“select * from ttbl where fname =
:fn”,{fn={value=url.fname, cfsqltype=“CF_SQL_VARCHAR”, maxlength=2 }});
dump(qry);

and
userParams = [{ value: url.fn, cfsqltype: “cf_sql_varchar”, maxlength:
2 }];

qry = "select * from ttbl where fname = ?" ;

dbo = queryExecute(qry, userParams);

and numerous other combinations and maxlength get ignored.

Am I doing it wrong?

thanks.

Mark.

Couldn’t you just left() the value instead ?

TomOn Monday, September 21, 2015 at 9:15:36 PM UTC+1, mark wrote:

Can’t figure out how to set a maxlength for queryexecute or query in
cfscript?

tried
qry=queryExecute(“select * from ttbl where fname =
:fn”,{fn={value=url.fname, cfsqltype=“CF_SQL_VARCHAR”, maxlength=2 }});
dump(qry);

and
userParams = [{ value: url.fn, cfsqltype: “cf_sql_varchar”, maxlength:
2 }];

qry = "select * from ttbl where fname = ?" ;

dbo = queryExecute(qry, userParams);

and numerous other combinations and maxlength get ignored.

Am I doing it wrong?

thanks.

Mark.