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. Problem Querying MSysObjects(ms-access table)

Problem Querying MSysObjects(ms-access table)

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpc++
3 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.
  • A Offline
    A Offline
    Ankush Mehta
    wrote on last edited by
    #1

    Hi all, When i try to query MsysObjects table following error is caught(try-catch). [B]Database error: Too few parameters.Expected 2.[/B] These are the two lines used to run the SQL query in vc++. // Build the SQL statement SqlString = "SELECT Name FROM MSysObjects where type = 1 AND (Left([Name],4) <> \"Msys\") AND (Left([Name],1) <> \"~\")"; // Execute the query recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly); I am using CDatabase class. Please Help! Regards, Ankush Mehta Ankush Mehta

    R 1 Reply Last reply
    0
    • A Ankush Mehta

      Hi all, When i try to query MsysObjects table following error is caught(try-catch). [B]Database error: Too few parameters.Expected 2.[/B] These are the two lines used to run the SQL query in vc++. // Build the SQL statement SqlString = "SELECT Name FROM MSysObjects where type = 1 AND (Left([Name],4) <> \"Msys\") AND (Left([Name],1) <> \"~\")"; // Execute the query recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly); I am using CDatabase class. Please Help! Regards, Ankush Mehta Ankush Mehta

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      "SELECT Name FROM MySysObjects WHERE type=1 AND((Left([Name],4)<>\'Mysys\')AND(Left([Name],1)<>\'~\'))"; Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.

      A 1 Reply Last reply
      0
      • R Rajesh R Subramanian

        "SELECT Name FROM MySysObjects WHERE type=1 AND((Left([Name],4)<>\'Mysys\')AND(Left([Name],1)<>\'~\'))"; Rajesh R. Subramanian You have an apple and me too. We exchange those and We have an apple each. You have an idea and me too. We exchange those and We have two ideas each.

        A Offline
        A Offline
        Ankush Mehta
        wrote on last edited by
        #3

        Thanks a lot Subramaniyam . it works, just a little modification is required: SqlString ="SELECT Name FROM MSysObjects WHERE type = 1 AND((Left([Name],4) <> \'MSys\')AND(Left([Name],1) <> \'~\'))"; Heartfelt thanks, Ankush Mehta Ankush Mehta

        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