Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. BindingSource question, help me

BindingSource question, help me

Scheduled Pinned Locked Moved C#
databasehelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    phantanagu
    wrote on last edited by
    #1

    Hi, I want to filter the productID that starts with "MDF", so I use bindingsource1.filter = "productID like 'NAPLE 5'-02'" (look like sql query), but it's not working. After that I corrected bindingsource1.filter = bindingsource1.filter ="productID like 'NAPLE 5%-02'", it's also not working and appear error "The expression contains an invalid string constant:'. " Somebody could correct the code will be appreciated. Thanks in advance.

    It seem to be a solution or an answer.

    R 1 Reply Last reply
    0
    • P phantanagu

      Hi, I want to filter the productID that starts with "MDF", so I use bindingsource1.filter = "productID like 'NAPLE 5'-02'" (look like sql query), but it's not working. After that I corrected bindingsource1.filter = bindingsource1.filter ="productID like 'NAPLE 5%-02'", it's also not working and appear error "The expression contains an invalid string constant:'. " Somebody could correct the code will be appreciated. Thanks in advance.

      It seem to be a solution or an answer.

      R Offline
      R Offline
      Rocky
      wrote on last edited by
      #2

      phantanagu wrote:

      I want to filter the productID that starts with "MDF"

      for what ur saying here it should be something like this, I think.. bindingsource1.Filter = "ProductID LIKE 'MDF%'";

      phantanagu wrote:

      bindingsource1.filter = "productID like 'NAPLE 5'-02'"

      What ur trying to do here is a ? for me hope it helps Rocky

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups