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. Database & SysAdmin
  3. Database
  4. Using where condition in Linked server with ms access in sql server.

Using where condition in Linked server with ms access in sql server.

Scheduled Pinned Locked Moved Database
databasesql-servercomsysadminhelp
3 Posts 3 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.
  • Y Offline
    Y Offline
    yesu prakash
    wrote on last edited by
    #1

    Hi How to write a where condition in the OPENQUERY to get data from ms access using linked server. select * from openquery(AccessDB,'select * from TblEmp where EmpPK=1'). This query show the following error message " OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDB" returned message "No value given for one or more required parameters.". Msg 7320, Level 16, State 2, Line 1 Cannot execute the query "select * from TblEmp where EmpPK=1" against OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDB". " With out where condition its working fine Thankyou YPKI

    C L 2 Replies Last reply
    0
    • Y yesu prakash

      Hi How to write a where condition in the OPENQUERY to get data from ms access using linked server. select * from openquery(AccessDB,'select * from TblEmp where EmpPK=1'). This query show the following error message " OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDB" returned message "No value given for one or more required parameters.". Msg 7320, Level 16, State 2, Line 1 Cannot execute the query "select * from TblEmp where EmpPK=1" against OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDB". " With out where condition its working fine Thankyou YPKI

      C Offline
      C Offline
      coded007
      wrote on last edited by
      #2

      Had you added server to sql server

      1 Reply Last reply
      0
      • Y yesu prakash

        Hi How to write a where condition in the OPENQUERY to get data from ms access using linked server. select * from openquery(AccessDB,'select * from TblEmp where EmpPK=1'). This query show the following error message " OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDB" returned message "No value given for one or more required parameters.". Msg 7320, Level 16, State 2, Line 1 Cannot execute the query "select * from TblEmp where EmpPK=1" against OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "AccessDB". " With out where condition its working fine Thankyou YPKI

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Access gives you the error message "No value given for one or more required parameters." when you specify a non-existent column name. It assumes that it is a query parameter and complains that its value has not been supplied. Check if the TblEmp table in the Access database contains an EmpPK column. Most probably, it does not. You might have misspelled the column name.

        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