
December 21st, 2004, 03:26 AM
|
|
Contributing User
|
|
Join Date: Sep 2003
Location: The Little Red Dot
Posts: 149
Time spent in forums: 1 h 23 m 6 sec
Reputation Power: 6
|
|
|
My VB.NET->MS Access Update statment doesnt work
Code:
sql(5) = "UPDATE tblEmploymentDetails SET ClientNRIC='" & CNRIC & "',EffectiveDate='" & DateN & "',Company='" & CCN & "',Industry='" & CI & "',Occupation='" & COccu & "',OfficeNum='" & COP & "',CPFRate='" & CCPF & "',OfficeFax='" & CFax & "',BusAddress='" & CBA & "',Postal='" & CPostal & "' WHERE ClientNRIC = '" & CNRIC & "' AND EffectiveDate = '" & DateN & "'"
w = sql(5)
Dim myOleDBCommand As New OleDbCommand(w, DBcon1)
myOleDBCommand.Connection.Open()
myOleDBCommand.ExecuteNonQuery()
i did a msgbox(sql(5))
Its shows the correct values and no errors were captured but the db doesnt get updated..
|