Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 981
  • Last Modified:

Error: invalid operands to binary

Here is the one line of code:  
NSMutableString *insertCommand = @"INSERT INTO CardData (CARD_ID, CARD_NAME, CODE_VAL) VALUES ('" + symbol.data + @"', 'Test Card'," + symbol.typeName + @"'";

Open in new window


I don't see anything wrong with it.. can someone please give me a hint?

Thanks...
0
rmmarsh
Asked:
rmmarsh
  • 2
2 Solutions
 
QlemoC++ DeveloperCommented:
You are missing a single quote in front of symbol.typeName:

NSMutableString *insertCommand = @"INSERT INTO CardData (CARD_ID, CARD_NAME, CODE_VAL) VALUES ('" + symbol.data + @"', 'Test Card','" + symbol.typeName + @"'";

Open in new window

0
 
aikimarkCommented:
you're missing a right parenthesis to complete your Values (
0
 
QlemoC++ DeveloperCommented:
Absolutely correct. So there are (at least) two errors in that string ...
0
 
rmmarshAuthor Commented:
Thanks, both of you... I knew about the missing right paren, but didn't see the missing single quote...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now