c# - Masked textbox mask causes data type mismatch -
i have masked textbox mask zip codes(00000-9999) , access database field long type. when enter zipcode 27101 entry added(though in access -27101), works. if add full zip 27101-1111, data type mismatch error. tried removing mask , entering 271012222 , added database. ??
mycommand.parameters.addwithvalue("@zip", mskzipcode.text);
you have type mismatch not because of fact masking because entering invalid characters long type.
i add full zip 27101-1111, data type mismatch error. tried removing mask , entering 271012222 , added database. ??
this problem. type in access long entering non numeric character '-'. reason able enter 271012222 because avoided entering '-'. if going zip code field , want full zip code, suggest changing type of field in access varchar(10) (or access equivalent).
Comments
Post a Comment