System.FormatException: 'Input string was not in a correct format.'


I am posting following query to server, where it throws error like- System.FormatException: ‘Input string was not in a correct format.’ Actually this query is to search all records which contains XXX (cross column search).

Basically, the column which contains this kind of data is of type varchar in SQL (column-IPAddress), which can be anything like- or or
Surprisingly, above search works fine with query which contains more than decimal value, e.g.(.11.11.)-

Since this exception is getting generated on above line of code, I am not able to diagnose the issue-
AutoQuery.CreateQuery(req, Request.GetRequestParams());

Can you help me to figure out root cause of the issue and solution to overcome this ?

Thanks in Advance,

You can’t use a like/contains search on a number field and any number field requires a leading ‘0’ before the decimal point