before_import sequence

I created a before_import solution to empty tables before I import the sample data on the server.
The problem I have is that the sample Data are imported before my before_import solution is called.
How do I start the before_import solution first and the sample date import?

Regards
Ttmgybta

Do you do run the code in the onOpen method of the before_import solution?

Is the method executed correctly in the end? So now you end up with a couple of empty tables when the import is finished?

The method is executed correctly and I end up whit a bunch of empty tables.

My function is called “onSolutionOpen()”. If I change it to onOpen I have an error in the code which says that onOpen is divined twice.

The name of the method doesn’t matter, but it should be attached to the onOpen event of the before_import solution.

The function is attached to the onOpen event and is is also fired, but as I said after the import of the sample data.

Also with the Servoy 6.0.0 rc1 build 1212 is the sequence in my opinion wrong.
The before import gets fired after the sample data import.
Is that right or do I have to place my before import somewhere else.

ttmgybta,

The before_import hook should run before any db access, so also before importing sample data.
Please file a case in our support system.

Rob

This is fixed in rc3.

Rob