I am trying to find a solution on how to insert a lot of data into a Firebird database using Firebird embedded server v2.5 and TUniLoader component.
I have a string list of data (mixed types - integer, string, etc.) formatted like this:
Code: Select all
123,abc,1,2
456,def,2,3
...Code: Select all
EXECUTE BLOCK AS BEGIN
INSERT OR UPDATE INTO table_name VALUES (.....);
...
ENDAnyway, I wanted to give TUniLoader a try. Accordgin to the documentation, it should do basically the same I do, but I thought maybe I miss something and TUniLoader will be quicker.
The problem is that I am not able to load data that I have into some dataset which can be used with TUniLoader.LoadFromDataSet. As I said, I have a string list with data of various types. I tried to create TVirtualTable, added needed number of fields of ftBlob type - then I was able to populate TVirtualTable. But when I call LoadFromDataSet, it crashes. I would be very grateful if someone could help me and post some piece of code which shows how can I add data from delimitered string list into a database using TUniLoader.
Thank you!