01.
02.
03.
04.
05.
06.
07.
08.
09.
10.
11.
12.
13.
String CommnadStr =
"INSERT INTO MYTABLE (Startdate) values ('"
14.
+ DatePicker.SelectedDate.Value.ToString() +
"')"
;
15.
16.
17.
18.
19.
String CommandStr =
"INSERT INTO MYTABLE (Startdate) values (@VAR_MYDATE)"
;
20.
SQLCommand myCommand =
new
SQLCommand ();
21.
22.
myCommand.CommandText = CommandStr ;
23.
myCommand.Parameters.AddWithValue (
"@VAR_MYDATE"
,DatePicker.SelectedDate.Value) ;