Could you let us know what was the command/Query used ? And are you able to connect to Oracle database and get the connection ? Or is the Test Connection successful ?
thank you for your reply
yes i am connected to the database
and basically this issue occured when i execute run command i
in that run command i have written the tables that i want to transfer from pdf to oracle db
“insert into MaryamSaeed ('”+dataSet.Tables(2).rows(vLineNum).item(“Color”).ToString+
“‘,’” + dataSet.Tables(2).rows(vLineNum).item(“Size”).ToString+
“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“Pattern/Length”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“SKU Code”).ToString+
“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“Sample Code”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“FOB”).ToString+
“',”+dataSet.Tables(2).rows(vLineNum).item(“Amount Per Piece”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“This Time Order Qty(pcs)”).ToString+
“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“This Time Size%”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“Last Time Order Qty(pcs)”).ToString+“)”
Could you try writing this Expression to a Text File using Write Text File activity ?
This way we should be able to identify if there is a syntax error in the Expression used.
Alternatively, Also try with the below modified Expression (Found two Missing Single Quotes) :
"insert into MaryamSaeed Values ('"+dataSet.Tables(2).rows(vLineNum).item("Color").ToString+
"','" + dataSet.Tables(2).rows(vLineNum).item("Size").ToString+
"','"+dataSet.Tables(2).rows(vLineNum).item("Pattern/Length").ToString+"','"+dataSet.Tables(2).rows(vLineNum).item("SKU Code").ToString+
"','"+dataSet.Tables(2).rows(vLineNum).item("Sample Code").ToString+"','"+dataSet.Tables(2).rows(vLineNum).item("FOB").ToString+
"','"+dataSet.Tables(2).rows(vLineNum).item("Amount Per Piece").ToString+"','"+dataSet.Tables(2).rows(vLineNum).item("This Time Order Qty(pcs)").ToString+
"','"+dataSet.Tables(2).rows(vLineNum).item("This Time Size%").ToString+"','"+dataSet.Tables(2).rows(vLineNum).item("Last Time Order Qty(pcs)").ToString+"')"
i have used the expressions you suggested and now this is the error
23.6.1-beta.13324+Branch.release-v23.6.1.Sha.52787b786620e97cba5555379da6e6bb423b3e6b
Oracle.ManagedDataAccess.Client.OracleException: ORA-00913: too many values at UiPath.Database.Activities.ExecuteNonQuery.HandleException(Exception ex, Boolean continueOnError)
at UiPath.Database.Activities.ExecuteNonQuery.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Database.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
And i have also used write text file it is printing the header and the values both but the problem is that it is nt working in run command
Actually i want to extract values from pdf to oracle database
AND here is the command i running
“insert into MaryamSaeed1 Values ('”+dataSet.Tables(2).rows(vLineNum).item(“Color”).ToString+
“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“Pattern/Length”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“SKU Code”).ToString+
“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“Sample Code”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“FOB”).ToString+
“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“Amount Per Piece”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“This Time Order Qty(pcs)”).ToString+
“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“This Time Size%”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“Last Time Order Qty(pcs)”).ToString+“‘,’”+dataSet.Tables(2).rows(vLineNum).item(“size”).ToString+“')”
(and now the error is there is no row at position 8)
We would ask you to test with Hard coded values if the Insert Query with the Run Command works. So that we will be able to understand if the error/issue happens with the prepared data or the command itself.
You could check with the Hard codes values Query something like below just for two values and check if it is able to work :
Insert Into MaryamSaeed1 Values ('Hello','Bye')
Also, if you could check this Query directly in your DB Application, we could also confirm the working,
there are so many errors in this that error doesn’t resolved and now next error is this
23.8.0-beta.13817+Branch.release-v23.8.0.Sha.120cd3ec54f082511b48105e2cfb52f8897346a8
Oracle.ManagedDataAccess.Client.OracleException: ORA-00947: not enough values at UiPath.Database.Activities.ExecuteNonQuery.HandleException(Exception ex, Boolean continueOnError)
at UiPath.Database.Activities.ExecuteNonQuery.ExecuteAsync(AsyncCodeActivityContext context, CancellationToken cancellationToken)
at UiPath.Database.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
(what do you think is this file corrupt or there are some other problem)
No the problem is just the syntax of your query.
You want to execute a relatively simple inset query, but you overcomplicate things with your query format.
Put the entire query in a variable, and output that variable as static text. That makes it a lot easier to find where you have missed a quote, a comma or are using garbage alltogether.
In the end, just as @supermanPunch posted, it should be nothing more than this:
Don’t try random things untill it works. Analyse your query, and read the error messages. They usually provide proper hints (Just ignore everything below the exception type, that’ll just confuse you)
Actually there are many error one is
There is no row at position 8
And the other one is of value decreased amd when i will solve there there will be next issue
By the way is this the last step to run the command and all the data of the pdf will be transferred to database and that’s it?