FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro-Support
Wissen
Community
Über Uns
Referenzen
Jobs
Allgemeiner Kontakt
Händlerverzeichnis
FlexPro-Support
DE
EN
FR
Placeholder
Produkte und Lösungen
Support und Downloads
Unternehmen
Magazin
Kontakt
Sprache
MyWeisang

Account Einstellungen

Topic

Error deleting dataset

Startseite ' Community ' Automation and VBA ' Error deleting dataset

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Autor
    Beiträge
  • #35064
    Norbert Bakkers
    Teilnehmer

    In an automation loop I want to delete some redundant datasets. The programme crashes every time at one dataset. That dataset icon looks like it is dashed and I can not delete it (not even manually).
    The error is: “Method ‘Delete’ of object ‘IDataSet’ failed

    The code used is:
    If ActiveDatabase.ActiveFolder.ObjectExists(GroupName & “Count” & FreqName) Then
    ActiveDatabase.ActiveFolder.Object(GroupName & “Count” & FreqName).Delete
    End If

    What could cause this error ?

    #35062
    Norbert Bakkers
    Teilnehmer

    In an automation loop I want to delete some redundant datasets. The programme crashes every time at one dataset. That dataset icon looks like it is dashed and I can not delete it (not even manually).
    The error is: “Method ‘Delete’ of object ‘IDataSet’ failed

    The code used is:
    If ActiveDatabase.ActiveFolder.ObjectExists(GroupName & “Count” & FreqName) Then
    ActiveDatabase.ActiveFolder.Object(GroupName & “Count” & FreqName).Delete
    End If

    What could cause this error ?

    #35063
    Bernhard Kantz
    Teilnehmer

    Objects that have a dashed icon are normally overridden by objects with the same name and type that are located in the active folder. In FPScript this means that these objects can be addressed only by a absolute path name. Using only the name will refer to the object in the active folder. This applies also in VBA. So if you have an active folder in [b]ActiveDatabase.ActiveFolder[/b] and there is also an object (dataset or formula object) named [b]GroupName & “Count” & FreqName[/b] in the active folder you will access and delete this object. You should prefix your names with the absolute path to avoid problems here.

    On the other hand the manual deleting of objects should always be possible (given you do not open your database in read-only mode) and we could not reproduce the behavior you describe. Please try to isolate this issue, put it into a small database and send it to support@weisang.com. Don’t forget to include the exact version number of the FlexPro version in use.

    Support
    support@weisang.com

Anzeigen von 3-Stellen - 1 bis 3 (von insgesamt 3)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.