Execute Non Query: Input string was not in a correct format

i want to insert string value to database integer column
Capture1
but following error occurred


here i attached my process and excel sheetabc.xlsx (8.1 KB)
Main.xaml (26.1 KB)
can you please help me to solve this problem ?

you are telling “insert string value to database integer column”

Obviously it will throw an error because data types are not matching.
Make sure all input values match with the database types.

@KarthikByggari
when i try to read excel integer value by using Get Row Item
it returns following error
Get Row Item: Int32Converter cannot convert from System.Double.

Are you converting the value to Integer?

@KarthikByggari
here my process
Main.xaml (27.5 KB)

Main.xaml (27.5 KB)

hope this will work for you.
Thanks!

hi @Deepak94
no its not work

Create a variable lets say ‘newage’ and assign a default value to it.
newage=Convert.ToInt32(“age”)
And now use newage in insert query

ok.
what error you got this time ?

@Deepak94

Ok.
Try one more time…
Main.xaml (28.2 KB)

@Deepak94

can you check your column type of sql table ?
Try to change to varchar.

@Deepak94
i need to insert int data in database table
Capture

Yes.
Change the data type of radioval from varbinary to varchar

1 Like

@Deepak94
solve
thank you very much :smiling_face_with_three_hearts:

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