How to solve insert query error

After my process reads data from excell sheet I separate it and store it in some variables.
Now , I have to insert that data from variables into my database.
I have connected to database and I am using Execute Non -Query activity, but getting error i guess I am missing something so it is not able to insert. i attached my process and excel sheet
help me to solve this problem??
Main.xaml (57.5 KB) aaa - Copy.xls (25 KB)

1 Like

when i run above process occur following error

This is my database in sql server

can you put the whole query up please

1 Like

Hi @Mahesha_Mendis

Just post your insert query here which you wrote in execute query activity.

1 Like

hi @Karun @Jersey_Practical_Sho
" Insert Into [epic_icr].[dbo].[ndb] (
values ( RM_AgentName,RM_AgentCode,SELECTSERVICE,SelectTypeof__Account,AccountHolderName_Primary,Customer__IdentificationNoCIN_Primary,AccountHolderName_Joint,Customer__IdentificationNoCIN_Joint,AccountNickname,Obtaincustodialservice,CustodianBankName,RegularSavingsorRegularWithdrawals,TransferallWithdrawalsto,NameoftheBank,NameoftheBankBranch,BankAccountNo,BankAccount__Name)"

Needs to be formatted as the below example

"Insert Into UiPath.EmailLog (Email_id,Sender,Received,No_Attachments) Values ('"+EmailID.tostring+"','"+EmailSender.tostring+"','"+EmailRec.tostring+"','"+NoAttach.tostring+"')"

1 Like

I guess you need to keep RM_AgentName,RM_AgentCode,SELECTSERVICE,…etc values in single quotes.


you use [epic_icr].[dbo].[ndb] table or [epic_icr].[dbo].[ndb1]

as per shown in screen shot you had used ndb1 table and in query you use ndb table.

Sunil Patel.

Try with this also but same error occurred

Can you change the datatype from nvarchar to varchar in database?

and give it a try with the same single quote formatted query…

1 Like

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