Subscribing .
error in updating records in access db...
Collapse
X
-
HELLO Vikas,
Sorry for late,
This is the sample after doing all open the database you will see the changes.
Regards
>> ALI <<Attached FilesComment
-
Originally posted by lotus18Hope you got it right ^ ^ .
Problem finally solved.. Thanks all for helping..
[CODE=vb]addnew = True
On Error GoTo err1
If text1.Text = "" Then
MsgBox " enter the c name"
text1.SetFocus
Exit Sub
End If
If text2.Text = "" Then
MsgBox " enter the c addr"
text2.SetFocus
Exit Sub
End If
rsnew3.Open "select * from company", c, adOpenDynamic, adLockOptimisti c
rsnew3.addnew
rsnew3.Fields(" comp_name").Val ue = text1.Text
rsnew3.Fields(" comp_addr").Val ue = text2.Text
rsnew3.Update
rsnew3.Close
If addnew = True Then MsgBox " add new successful ", vbInformation, "successful "
If rsnew3.State = adStateOpen Then rsnew3.Close
Set rsnew3 = Nothing[/CODE]Last edited by Killer42; Mar 4 '08, 02:52 AM.Comment
Comment