Please look into the code and help me ...
dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "mr_no"
dbInsert.Parameters.Item("mr_no").Value = 1
dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "mr_date"
dbInsert.Parameters.Item("mr_date").Value = DateTimePicker1.Value
dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "item_code"
dbInsert.Parameters.Item("item_code").Value = txtItemcode.Text
dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "qty"
dbInsert.Parameters.Item("qty").Value = txtQty.Text
dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "mr_status"
dbInsert.Parameters.Item("mr_status").Value = "N"
dbInsert.CommandText = "insert into mr_head values ('MBBK7490','2',DateTimePicker1.VALUE,txt_itemcode.text,txtQty.text,'N',NULL);"
dbInsert.CommandType = CommandType.Text
dbInsert.Connection = connection
dbInsert.ExecuteNonQuery()
MsgBox("Saved")
connection.Close()
The data is getting saved but some values are getting saved as date format.
Please check the data below
JOB_CODE : MBBK7490 (Correct)
MR_NO : 2 (CORRECT)
MR_DATE : 31-12-1899 (WRONG)
ITEM_CODE : MR_DATE (WRONG)
QTY : ITEMCODE (WRONG)
MR_STATUS : N (CORRECT)
Please help..
Vivek