Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RS delete

Status
Not open for further replies.

jonybd

Programmer
Nov 3, 2002
166
0
0
BE
i am useing "rs.Delete adAffectCurrentrun" but why
run time error '-2147217864 (80040e38)':
Row Cannot be located for updateing.Some values may have been changed since it was last read.

 
1. What database and version?
2. Does the table have a primary key? If so, is an AutoIncrement field?
3. Is the rs.source include JOINed tables?
4. Is was the record being deleted, also added by the same recordset in the same session?
 
Note: When ever the """DATE"""" fields are empty
then the delete is rejected.

Note: ALl fields is need to be fillup , where i dont need to input some field.

currently : i fill up all fields , but which is wrong for me.

DATABAse MySql - latest download from
Table is under problem.

/*
Host: localhost
Database: atml
Table: 'db_timescale'

*/

CREATE TABLE `db_timescale` (
`EmployeeType` varchar(100) NOT NULL default '',
`CardNo` varchar(100) NOT NULL default '',
`EmployeeName` varchar(100) NOT NULL default '',
`Designation` varchar(100) NOT NULL default '',
`Section` varchar(100) default '',
`Shift` varchar(100) default '',
`Dateofjoin` date NOT NULL default '0000-00-00',
`PromotionDate` date default '0000-00-00',
`YearlySalaryIncrementDate` date default '0000-00-00',
`CountDate` date NOT NULL default '0000-00-00',
`GradeId` varchar(100) NOT NULL default '',
`TimeScale` varchar(100) NOT NULL default '',
`CurrentSalary` varchar(100) NOT NULL default '',
`YearlySalaryIncrement` varchar(100) NOT NULL default '',
`SalaryIncremented` varchar(100) NOT NULL default '',
`Comments` varchar(100) default ''
) TYPE=MyISAM;

vb code:

' Delete
Function db_Delete()
'On Error Resume Next
With rs
If .EOF = True Or .BOF = True Then
Else
.Delete adAffectCurrent
End If
TimeScale.Info.Caption = "Deleted SuccessFully Total Record: " & .RecordCount
End With
End Function

----------------------------------
Wish , i explained all now!
-----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top