Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot perform 'like' operation on system.double and system.string

Status
Not open for further replies.

mjassalina

Programmer
Nov 29, 2020
19
PH
Hi, Im experiencing this error, Can anyone help me regarding this?

Here's the code:


LstTableBindingSource.Filter = "(Convert([Defect ID], 'System.String') LIKE '" & txtSearch.Text & "')" &
"OR (Sen LIKE '" & txtSearch.Text & "')"


Thank you.
 
Which bit of this question relates to VB6?

System.String suggests this to be related to VB.NET, and thus better asked in forum1867
 
Pure syntax logic: missing space before OR.

combo
 
>missing space before OR.

Nope. As I say, this is a VB.NET question, and system.data filter doesn't barf on a missing space after a closing parenthesis. And if it DID, then it would produce a different system.data runtime error to the one being reported here.

But the error is in the OR clause, and the error is pretty specific about what the problem is: Sen is clearly a double (or is being coerced to one somewhere), and needs to be converted - just like [Defect ID]- to a string.

As I say, would have been better to ask this in forum1867
 
IM so sorry. I'm new to programming. I will closed this thread. Thank you for the guidance. I appreciated your replies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top