-
Dao
i get the Error : Record is deleted.
but i looked at:
http://support.microsoft.com/support.../Q270/1/16.ASP but it
doesn't work !!
----------------------------------------------------------------------------
----------------------
Sub Main
Set FileDB = DBEngine.Workspaces(0).OpenDatabase(FilesMDB_Path, False,
False, "MS Access;PWD=")
Set FileRS = FileDB.OpenRecordset("File", dbOpenDynaset)
End Sub
----------------------------------------------------------------------------
----------------------
Sub .........
MySql = "DELETE * FROM file WHERE FileName = '" & ListFileName & ";"
FileDB.Execute MySql
If FileRS.EOF = True Then: FileRS.MoveFirst
FileRS.Update
End sub .............
----------------------------------------------------------------------------
----------------------
Sub Frm_load
On Error GoTo 1:
FileDB.Recordsets.Refresh
If FileRS.EOF = True Then: FileRS.MoveFirst
Do Until FileRS.EOF
DoEvents
Set xitem = ListView1.ListItems.Add(, , FileRS!FileName)
xitem.SubItems(1) = FileRS!FromTime
xitem.SubItems(2) = FileRS!EndTime
xitem.SubItems(3) = FileRS!fileSize
FileRS.MoveNext
Loop
exit sub
1:
Msgbox err.description
End sub........
----------------------------------------------------------------------------
----------------------
-
Where is the error being generated??? If it is in the subroutine that contains the Delete sql statement, then that is the cause... deleting all the records for a table will cause the Eof indicator to be true... it also sets the Bof property to True as well... then if you attempt to edit anything in this table, it will give you that error... tell me if I am missing something here
Regards