Results 1 to 2 of 2

Thread: Dao

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Montreal
    Posts
    59

    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........
    ----------------------------------------------------------------------------
    ----------------------

  2. #2
    Addicted Member PsudoLogical's Avatar
    Join Date
    Dec 2000
    Location
    Upstate N.Y.
    Posts
    144
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width