395
Views
7
Comments
Solved
Error in advanced query SQL1: Input string was not in a correct format.
Application Type
Reactive

I'm getting error for this query. 

2022-11-15 06-40-09
Manimaran Selvam
Solution

Dears,

I have fixed the issue by Rearranging the Entity Attribute Order.


Thanks for the support.

UserImage.jpg
Narendra Maheshwari

Hi, 

Can you share the error?

2022-11-15 06-40-09
Manimaran Selvam

Hi Narendra,

Please find the Error below:

Database returned the following error: Error in advanced query SQL1: Input string was not in a correct format. 

UserImage.jpg
Narendra Maheshwari

Have you tried to execute your SQL without Input? 


Just follow the two-step verification:

1. Remove your input variable and execute your SQL and See what is being returned in ID column.

2. After that, try to match ID column value type with your input variable 

2025-12-15 09-29-24
Thibaut G

With the information provided i would guess that you are trying to pass a different data type in the inputvariable of the query. Are you passing a LongInteger as value for the Id inputparameter?if you are passing an  Identifier, you can use the following code to convert it to a LongInteger:


IdentifierToLongInteger(variable)

2022-11-15 06-40-09
Manimaran Selvam

Hi Thibaut,

I have tried both LongInteger & Identifier.

Seems nothing working for me.

2025-12-15 09-29-24
Thibaut G

does the query work when you remove the WHERE clause ?
(WHERE C.Id = @Id)

2022-11-15 06-40-09
Manimaran Selvam
Solution

Dears,

I have fixed the issue by Rearranging the Entity Attribute Order.


Thanks for the support.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.