Hi, I have this sql statement in the VB application as follow:
Dim sql As String
Set rsForm = Nothing
Set rsForm = New ADODB.Recordset
sql = " update StaffItem" & _
" set Measure_Date = '" & "'" & _
" where Cust_Code = '" & modVariable.custCode & "'" & _
" and Branch_Code = '916'" & _
" and Staff_Code = '24'" & _
" and (isnull(DN_No) or DN_No = '')"
' rsForm.Open sql, cnnForm, adOpenDynamic, adLockOptimistic, adCmdText
cnnForm.Execute sql
When I try to execute, it said wrong type. I think the problem is in the Measure_Date format. I don't know how to set the date in the access db to as '' or null. My access db date format is "dd/mm/yyyy". What I should to? Thank you very much!
kyon
Dim sql As String
Set rsForm = Nothing
Set rsForm = New ADODB.Recordset
sql = " update StaffItem" & _
" set Measure_Date = '" & "'" & _
" where Cust_Code = '" & modVariable.custCode & "'" & _
" and Branch_Code = '916'" & _
" and Staff_Code = '24'" & _
" and (isnull(DN_No) or DN_No = '')"
' rsForm.Open sql, cnnForm, adOpenDynamic, adLockOptimistic, adCmdText
cnnForm.Execute sql
When I try to execute, it said wrong type. I think the problem is in the Measure_Date format. I don't know how to set the date in the access db to as '' or null. My access db date format is "dd/mm/yyyy". What I should to? Thank you very much!
kyon