Error while trying to add updated Fields in Clientdataset

Asked

Viewed 126 times

1

I am trying to update my Clientdataset’s Fields with the new variables of the bank, but I came across the following error:

inserir a descrição da imagem aqui

Why this could be happening?

Join of the Tsqldataset:

select E.*, S.Suprimento from Estoque E, Suprimento S 
  Where S.Codigo = E.CodigoSuprimento 
    and E.Usado = 0
   Order by S.Suprimento

After editing Fields the following error Occurs:

inserir a descrição da imagem aqui

  • Your BD is postgresql?

  • Yes, the application previously used the Firebird Database is now Postgresql

  • 1

    Everything indicates that it is a "Where" or "Join" where you compare a varchar with an integer. It can also be the type of parameter you entered into the component. Check if there is parameter, otherwise change remove the "Where" for verification, so you check the actual problem by deletion

  • @Sorack I looked at the code and did not find an error in any "Where" or "Join" I will edit the question with the "Join" that is in my TSQLDataSet

  • I was able to access the Fields now, the error was in E.Usado = 0 that being a String would have to be E.Usado = '0'

  • Try to change the line "and E.Used = 0" to "and E.Used = '0'"

  • Precisely. I will put this answer and thank you if you give me a +1 ^^

Show 3 more comments

1 answer

2


Everything indicates that it is a where or join where you compare a varchar with a inteiro. It can also be the type of parameter you entered in the component. Check if there is parameter, otherwise change the where for verification, thus you check the actual problem by deletion. Based on your SQL probably the error will no longer occur if you use the following:

select E.*,
       S.Suprimento
  from Estoque E,
       Suprimento S 
 Where S.Codigo = E.CodigoSuprimento
   and E.Usado = '0'
 Order by S.Suprimento desc;
  • I edited my question so I can show you the mistake that started now after editing the Fields, if you can help me

  • I converted the comments of the question into chat so we can try to identify the problem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.