Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
It should also be obvious from looking at the table and the SP design which columns are at risk.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: MikerRoo
Also, You can get this when stuffing nvarchar into varchar or bigint into int, etc..
If you send a number or date as a string and it gets automatically stuffed into a non-varchar variable, this warning could get triggered. So keep the types consistent and use the CFSQLType attribute well.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: AjasHadi
do you think I should have start_date declared as smalldatetime in SP ??? the reason i had to stick to this bad method of varchar datatype is because client was sending all kinds of junk data and i could only proceed further with varchar datatype, & other datatype like int,date etc would have caused serious troubles....
Copy link to clipboard
Copied
quote:
Originally posted by: MikerRoo
Yes, if the database column is smalldatetime then then @start_date should be smalldatetime.
However, the SP's input variable (call it say, "RawStartDate") can still be varchar for the reasons you stated. Just be sure to return the appropriate error and/or insert a valid smalldatetime always.
Copy link to clipboard
Copied