Unable to Insert Data into MYSQL Database

Hi all,
I am trying to insert data into MYSQL database using below query in a variable but the data is not uploading properly its shown as empty rows in DB. I have also passed the variables in parameters but don’t know why this happened.

“INSERT INTO RPA_FBL_UAT.Weekly_PDF_TABLE
(Job_ID, Cash and balances with treasury banks, Investments, Gross Advances, Provisions, Advances- net of provision,
Deposits and other accounts, File Date)
VALUES (@iDJOB, @cashbalanceotherbank, @Investmentsdata, @grossadvance, @Provisionsdata, @advancenetdata, @Depositsdata, @currentday);”

Hi @connect360

Replace “@value” with “?”

INSERT INTO RPA_FBL_UAT.Weekly_PDF_TABLE
(Job_ID, `Cash and balances with treasury banks`, Investments, `Gross Advances`, Provisions, `Advances- net of provision`,
`Deposits and other accounts`, `File Date`)
VALUES (?, ?, ?, ?, ?, ?, ?, ?);

In the “Parameters” property of the “Execute Non-Query” activity, provide a List of objects containing the values for the parameters in the order they appear in the query.
Parameters: {iDJOB, cashbalanceotherbank, Investmentsdata, grossadvance, Provisionsdata, advancenetdata, Depositsdata, currentday}

Hi , I have tried it but it shown the below error

image

@connect360

Check where the values in variables are really getting passed…use lcoals panel to check it

cheers

I have assign the values manually.

image

@connect360

can you check from locals panel…

also is the assign done before running the query?

also are there multiple variables with same name used?

cheers

Assign is before running query and all variables have different name.

yes i have validate it manually as well all the variable and sequence in parameter is as per DB. Is that the below pattern is ok??

Query:
“INSERT Into RPA_FBL_UAT.Weekly_PDF_TABLE
(‘Job_ID’, ‘Cash And balances With treasury banks’, ‘Investments’, ‘Gross Advances’, ‘Provisions’, ‘Advances- net Of provision’,
‘Deposits And other accounts’, ‘File Date’)
VALUES (?, ?, ?, ?, ?, ?, ?, ?);”

Parameter:
{iDJOB, cashbalanceotherbank, Investmentsdata, grossadvance, Provisionsdata, advancenetdata, Depositsdata, currentday}

image

image

@connect360

Try:
INSERT INTO RPA_FBL_UAT.Weekly_PDF_TABLE
(Job_ID, [Cash And balances With treasury banks], Investments, [Gross Advances], Provisions, [Advances- net Of provision],
[Deposits And other accounts], [File Date])
VALUES (?, ?, ?, ?, ?, ?, ?, ?);

And change the parameters ti string(object)

How to select string of object parameter type?

Throwing the same error

Run query: No mapping exists from object type System.String to a known managed provider native type.

image

Sorry, its an array of object

again same error can you please develop a process with this type of working.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.