Dear Sir
I have written a program in which i want to delete a particular record from the datagrid using select the record.
I am accesing a table and showing it into a datagrid using "Recordset". then i want to delete that record which i have selected through Datagrid. But its deleting only that record which is showing on the screen.If i scrolling the datagrid and selecting the last reocrd,its not deleting.
i am sending you the code.plz help me out
dim rsDelete as new Adodb.Recordset
rsDelete.CurserLocation = adUseClient
rsDelete.open "Main_Item",db,adopendynamic,adlockoptimistic
rsDelete.Move Datagrid1.Row
if Datagrid1.RecordSelector = True Then
rsDelete.Delete adAffectCurrent
rsDelete.Update
End if
thanks and Regs
Smita
I have written a program in which i want to delete a particular record from the datagrid using select the record.
I am accesing a table and showing it into a datagrid using "Recordset". then i want to delete that record which i have selected through Datagrid. But its deleting only that record which is showing on the screen.If i scrolling the datagrid and selecting the last reocrd,its not deleting.
i am sending you the code.plz help me out
dim rsDelete as new Adodb.Recordset
rsDelete.CurserLocation = adUseClient
rsDelete.open "Main_Item",db,adopendynamic,adlockoptimistic
rsDelete.Move Datagrid1.Row
if Datagrid1.RecordSelector = True Then
rsDelete.Delete adAffectCurrent
rsDelete.Update
End if
thanks and Regs
Smita