cancel
Showing results for 
Search instead for 
Did you mean: 

database file

MohammedShilbay
Level 4
Hello everyone,

I have a SQLite database file .db that I need to get data from it as a collection,
can anyone tell me how can I do it?

Thanks,

25934.png

------------------------------
Mohammed Shilbayeh
Amman
+962785766991
------------------------------
6 REPLIES 6

Hi Mohammed

I'm not familiar with the use of the db files but im assuming this is an extracted file from and SQL database? If so is it not possible for you to use the OLEDB actions to extract the data directly from the database? If not can you convert the db file to a CSV file or get the database extract from sql in a csv file?

------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------

Hi @Mohammed Shilbayeh

I see that there is no VBO in the DX store.

I create you a special VBO to execute queries and get collections.

Attached to this post you have all the dlls that you need to use and the VBO.

​In the folder dlls you have all the libraries that you need to have in your Blue Prism installation folder (Usually >> C:\Program Files\Blue Prism Limited\Blue Prism Automate)

Import the VBO and use the action "Get Query as Collection".

As input parametter you need to indicate the file and the query that you want to get returned as collection

The code behind is very simple:

string cs = "Data Source=" + DataBaseFile + ";Version=3;";

string sql = Query;

var con = new SQLiteConnection(cs);
con.Open();

var cmd = new SQLiteCommand(sql, con);

DataTable dt = new DataTable();

dt.Load(cmd.ExecuteReader());

dtResult = dt;

Hope this helps you! If you need to add more actions here, let me know and I change the VBO

See you in the Community, bye 🙂

------------------------------
Pablo Sarabia
Solution Manager & Architect
Altamira Assets Management
Madrid
------------------------------

pls check if the below VBO is helping you.

https://digitalexchange.blueprism.com/dx/entry/3439/solution/oracle-mda---utility?_ga=2.133564302.1600082727.1655103133-1052292321.1645100355&_gl=1*1m10wx7*_ga*MTA1MjI5MjMyMS4xNjQ1MTAwMzU1*_ga_MFBQ2KF....



------------------------------
Neeraj Kumar
Technical Architect
------------------------------

Hi @Michael ONeil ,

that's what i tried to do ,to convert the .db file to CSV file but it didn't work
i found that there is an object in the digital exchange for importing data from SQLite DB.

Thank you for helping,



------------------------------
Mohammed Shilbayeh
Amman
+962785766991
------------------------------

Hi @PabloSarabia ,

Thank you so much for this VBO, I will try it now,
i think that only what i need.

Thanks,


------------------------------
Mohammed Shilbayeh
Amman
+962785766991
------------------------------

Hi @Neeraj Kumar ,

Thank you for your help,
I found a VBO called "Function for Data - SQLite - 1.0.0"  it work fine with me.

Thanks,


------------------------------
Mohammed Shilbayeh
Amman
+962785766991
------------------------------