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 / C++ / MFC
  4. I cannot SELECT RECORD by CRecordset ?

I cannot SELECT RECORD by CRecordset ?

Scheduled Pinned Locked Moved C / C++ / MFC
helpdatabasequestion
1 Posts 1 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.
  • _ Offline
    _ Offline
    _skidrow_vn_
    wrote on last edited by
    #1

    I want to get a record from MyTable which GroupID=3 AND account='abc' AND usename='tom'" but it alway ERROR "Too few parameters" CMyRecordSet is; str.Format("GroupID=%d AND account=\'%s\' AND usename=\'%s\'" ,iGroupID ,theApp.m_strAccount ,theApp.m_strUsername); is.m_strFilter=str; is.Open(); :mad::mad::mad::mad: Too few parameters. Expected 1. <= ERROR :eek: help me :doh: I think I do not do anything wrong in this SQL it similars with is.Open(AFX_DB_USE_DEFAULT_TYPE,"SELECT * FROM MyTable WHERE GroupID=3 AND account='abc' AND usename='tom'"); both ERROR :((:((:((

    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