the datatype in sql server is datetime but in my c# application i have to put the date in maskedtextbox1.tex = 31/03/2010 like "DD/MM/YYYY format and maskedtextbox returns strings that's why the problems occures in straightway like below.
"insert into dummy(date)values(convert(datetime,' " + maskedtextbox.text.tostring()+" ',103)";
it's works but in parameteriz it not accept. so how to do with same please tell me.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 2  Replies