Connect BluePrism to Database

#1
Hi, (@sahil_raina_91, @Pete_L )

I want to ask you kindly which are the steps necessary to connect BluePrism to a Table in SqlServerExpress and execute a query on it.
What are the steps involved?
CAn you please provide me an example of workflow that does this?

Thank you so much,
CAmilla.
 
#2
Hi, (@sahil_raina_91, @Pete_L )

I want to ask you kindly which are the steps necessary to connect BluePrism to a Table in SqlServerExpress and execute a query on it.
What are the steps involved?
CAn you please provide me an example of workflow that does this?

Thank you so much,
CAmilla.
1610564447641.png

In VBO : Utility - Data - SQL Server, use Action : Set Connection.
Enter the details from SQLServerExpress into above 4 fields, to connect to the specific Database.
Next use Action : Execute to run your queries.
 

Attachments

#3
Thank you so much @sahil_raina_91.
I've tried the SQL server data - Set Connection and it works.
Now I ask you another question:
I need to Read an Excel File , Read the Collection of rows associated to it and insert the rows (without duplicates) in a Datatable inside the Database.
How can I do the insertion of rows inside the Datatable?

The collection from the excel has this columns:
Tipo fattura,
Tipo documento
Numero fattura
Data emissione

while the Datatable has these:
Tipo fattura,
Tipo documento
Numero fattura
Data emissione
PIVA Società?
CAn you help me please?
Thank you so much
CAmilla.
 
#4
Thank you so much @sahil_raina_91.
I've tried the SQL server data - Set Connection and it works.
Now I ask you another question:
I need to Read an Excel File , Read the Collection of rows associated to it and insert the rows (without duplicates) in a Datatable inside the Database.
How can I do the insertion of rows inside the Datatable?

The collection from the excel has this columns:
Tipo fattura,
Tipo documento
Numero fattura
Data emissione

while the Datatable has these:
Tipo fattura,
Tipo documento
Numero fattura
Data emissione
PIVA Società?
CAn you help me please?
Thank you so much
CAmilla.
1. Read the collection from excel
2. Remove duplicates from collection
2. Run a loop on the collection
3. Inside the loop, call Action : Execute with statement : "Insert into TABLENAME values ('"&[1]&"','"&[2]&"','"&[3]&"')"

Replace
[1] = [collection.Tipo fattura]
[2] = [collection.Tipo documento]
[3] = [collection.Numero fattura]

Based on the same way, you can add values to other columns
 
#5
Thank you so much @sahil_raina_91 .
The file is a csv and not an Excel.
I'm getting this error when using this action:
1610639260382.png
'Get Worksheet as Collection' Process: 'Test' Subsheet: 'Get Collection From Csv' ERROR: Internal : Could not execute code stage because exception thrown by code stage: Illegal characters in path.have you got any ideas?
Thank you so much,
Camilla
 
#6
Thank you so much @sahil_raina_91 .
The file is a csv and not an Excel.
I'm getting this error when using this action:
View attachment 5835
'Get Worksheet as Collection' Process: 'Test' Subsheet: 'Get Collection From Csv' ERROR: Internal : Could not execute code stage because exception thrown by code stage: Illegal characters in path.have you got any ideas?
Thank you so much,
Camilla
You need to give complete file path and not just the file name as input.
If you still can't figure out, please show us the value of [File Name] data item
 
Last edited:
#9
Thanks a lot.
Can I send you a message with the csv I'm trying to read?
I'm having problems in reading the values of the rows in the correct columns.
1610641087470.png
Many
Thanks,
Camilla.
 
Top