am using nvarchar(200) in my table"movie" with col name "moviname".
when am entry i don't luve u.it gives run time error .that
Incorrect syntax near 't'.
Unclosed quotation mark after the character string ''.
cmd = new SqlCommand("Select distinct hallcode from Det_movie where Flag='Y' and MovieName='" + movie + "'", con);
i think problem arises becz of whe it matches the movie name it get a extra ' within sring(don't)
in MovieName='" + i don't+ "'"
so problem arise how to overcome this problem
Answers (4)
0
write this code in new class file and you can call it any form
0
I also write this code..
but how i will call this code on different form .
0
Regex pattern = new Regex(@"(?<!\d)\d{10}(?!\d)");
if(pattern.isMatch(socialSecNumber))
{
//Do something
return true;
}
else
{
return false;
}