al4629740
asked on
Can't save value from vb6 to db
The following DateCompleted column does not save. Is there anything wrong with my syntax?
esql = "select * from tblOrgMonthlyReport where MonthlyID = " & MonthlyID
rec.CursorLocation = adUseClient
rec.Open (esql), conn, adOpenDynamic, adLockOptimistic
If rec!DateCompleted Is Nothing Then
rec!DateCompleted = ServerTime
End If
rec.Update
rec.Close
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I fixed it. Here is the change.
If IsNull(rec!DateCompleted) Then
If IsNull(rec!DateCompleted) Then
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for al4629740's comment #a40295837
for the following reason:
I answered the question
Accepted answer: 0 points for al4629740's comment #a40295837
for the following reason:
I answered the question
If the author can honestly say that it wasn't my suggestion in post ID: 40295827 that he set a breakpoint as he said he did in post ID: 40295833, then I don't have any objection.
ASKER
It did help. I will reward the points to him...
Thanks to you both.
ASKER
And when I put a breakpoint, line 8 is not executed. There is a null value, so it SHOULD execute, but does not...