DateTimePicker Datepart problem **Super Urgent**

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anybody really help with the following please please....

I have a DateTimePicker called customer_picker
I use it and then want to insert it to a table OrderHdr.DUEDATE which is data type DateTime on my SQLCE DB
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 appreciated

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 + "')"
 
marcmc said:
Can anybody really help with the following please please....

Yes. I did so last night. Please read the response to your previous
question.
 
Back
Top