我在SQL
桌面应用程序错误问题是SQL查询Sytax错误。
问题是由于日期时间选择器..
查询是
MAcmd = MAconn.CreateCommand();
MAcmd.CommandText = "INSERT INTO maintable VALUES('" + txtfileno.Text + "','" + txtname.Text + "','" + txtfathername.Text + "','" + txtaddress.Text + "','" + dateTimePicker1.Text + "','" + txtperscription.Text + "'," + txtfee.Text + ")";
MAcmd.ExecuteNonQuery();
MessageBox.Show("Information Inserted Successfully");
MAconn.Close();
我做客户的日期格式为
{C}
在数据库中的日期字段是日期/时间类型的
其插入插入文本框日期查询工作不错,但我希望将它添加使用日期时间选择器。