Variable type error

hello i hope you are well

I need to get the id variable from a database and store it in a variable in the UiPath, it is auto-incremented within the database.

However, I’m getting this error, could you help me?

“id” INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
This is the bank id line

Hi,

Can you try the following expression?

ID = CInt(CurrentRow("id"))

Regards,

1 Like

Hi,

Can you check what is the variable type of ID?

hi, this is in the second image, it is int

You are trying to assign a string value to a int variable . Hence the error.
Please check this.

1 Like

Hi @Luca2

Instead of using CurrentRow("id").ToString try to use Cint

ID = CInt(CurrentRow("id").Tostring)

Regards
Gokul

1 Like

Look at the first line of the error in the Output. The problem is with your Execute Query activity, not the Assign.

1 Like

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