G
Guest
I have a DateTimePicker called customer_picke
I use it and then want to insert it to a table OrderHdr.DUEDATE which is data type DateTime on my SQLCE D
The code i use to insert is as follows and i receive a datepart error on the insert: I insert the customer_picker as string, maybe that is why but i dont quite understand why the datepart error. Any help muchly appreciate
MessageBox.Show("insert"
MessageBox.Show(customer_picker.Text
Dim strSQL As String = "INSERT into OrderHdr ( " &
" REFRENCE, CUSTNMBR, DOCDATE, DUEDATE, " &
" SLPRSNID, TOTALQTY, " &
" PONUMBER, DELREP, DIVISION, COMMENT, CONTACT ) VALUES ( '" + txtHdrRefrence.Text + "', '" + txtCustNmbr.Text + "', " &
" getdate(), '" + customer_picker.Text + "', '" + SLPRSNID.Text + "', " &
" 0.00, '" + txtPO.Text + "', '" + DelRep + "', '" + cmbOHDiv.Text + "', '" + txtComment.Text + "', '" + tbContact.Text + "')
I use it and then want to insert it to a table OrderHdr.DUEDATE which is data type DateTime on my SQLCE D
The code i use to insert is as follows and i receive a datepart error on the insert: I insert the customer_picker as string, maybe that is why but i dont quite understand why the datepart error. Any help muchly appreciate
MessageBox.Show("insert"
MessageBox.Show(customer_picker.Text
Dim strSQL As String = "INSERT into OrderHdr ( " &
" REFRENCE, CUSTNMBR, DOCDATE, DUEDATE, " &
" SLPRSNID, TOTALQTY, " &
" PONUMBER, DELREP, DIVISION, COMMENT, CONTACT ) VALUES ( '" + txtHdrRefrence.Text + "', '" + txtCustNmbr.Text + "', " &
" getdate(), '" + customer_picker.Text + "', '" + SLPRSNID.Text + "', " &
" 0.00, '" + txtPO.Text + "', '" + DelRep + "', '" + cmbOHDiv.Text + "', '" + txtComment.Text + "', '" + tbContact.Text + "')