When i am trying to display grid view it raises this error pls help me out

My Column DataType In DB
amount numeric(18,2) When i am trying to display grid view it raises this error pls help me out

My Column DataType In DB
amount numeric(18,2) Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Mar 7, 2023, 6:26 AM
Hello Jaya,
does you newtable table has only one column?
if it has more than one colum you need to select specific filed in query otherwise it it will throw error if datatype is different.
try to below query at lin no 38.
select amount from newtable
Thanks
Naimish Makwana
Jaya PrakashPosted Mar 7, 2023, 9:36 AM
its working thank you all
Vishal JoshiPosted Mar 7, 2023, 9:27 AM
Hello Jaya,
There can be nullable field issue. if value in null in specific cell then it can throw error like this.
Please replace below code with error line code to chek null value.
Thanks
Vishal
Jignesh KumarPosted Mar 7, 2023, 9:09 AM
Hello Jaya prakash,
Your select statement must have thirdcolumn as decimal value.
When ever you use select statement in query we should use column name as best practice
As above you need to check datatype of your column
Amit MohantyPosted Mar 7, 2023, 7:05 AM
Make sure your newtable third column has decimal value. Bcoz you are passing Field(2).