12 Replies Latest reply on Jul 26, 2018 2:28 PM by gregor

    Getting a insert query working for a linked server with PI OLE DB

    David Golverdingen

      The following query is working to insert a value in de test tag:

       

      INSERT OPENQUERY(PI_SERVER_T, 'SELECT * FROM piarchive..picomp') (tag, value)

      VALUES('DavidTest', 50.0)


      But when I try to include the values in the Pass-Through Query I get an error (following the manual here).

       

      SELECT * FROM OPENQUERY(PI_SERVER_T, 'INSERT piarchive..picomp2 (tag, value)

      VALUES (''DavidTest'', 50.0)')


      Msg 7357, Level 16, State 2, Line 2

      Cannot process the object "INSERT piarchive..picomp2 (tag, value)

      VALUES ('DavidTest', 50.0)". The OLE DB provider "PIOLEDB" for linked server "PI_SERVER_T" indicates that either the object has no columns or the current user does not have permissions on that object.


      Anyone having some clues? Security seems ok.