Skip to content
DataMiner Dojo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about Agile
        • Agile Webspace
        • Everything Agile
          • The Agile Manifesto
          • Best Practices
          • Retro Recipes
        • Methodologies
          • The Scrum Framework
          • Kanban
          • Extreme Programming
        • Roles
          • The Product Owner
          • The Agile Coach
          • The Quality & UX Coach (QX)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
  • Swag Shop
  • Downloads
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

Difference between AddRow and SetRow

Solved68 views1 day agoAddRow ConcreteSLProtocol SetRow SLProtocol
0
Edib Šupić [SLC] [DevOps Catalyst]2.24K 1 day ago 0 Comments

Hi Dojo,

I've been trying to call SLProtocol.SetRow, from class that implements SimpleMessageExecutor, to update existing row and was getting the following exception:

Exception: System.InvalidOperationException: This type has a ComVisible(false) parent in its hierarchy, therefore QueryInterface calls for IDispatch or class interfaces are disallowed.
   at System.Runtime.InteropServices.Marshal.GetNativeVariantForObject(Object obj, IntPtr pDstNativeVariant)
   at Skyline.DataMiner.Scripting.ConcreteSLProtocol.SetRow(Int32 iPID, String key, Object row)
   at QAction_9000000.InterApp.Executors.RowRequestExecutor.TryExecute(Object dataSource, Object dataDestination, Message& response)

When I tried to call SLProtocol.AddRow it was working fine which got me wondering why. After digging for a bit I realised that AddRow and SetRow are implemented very differently in the ConcreteSLProtocol class.
AddRow simply calls NotifyProtocol while SetRow's implementation is this huge unsafe method.
After realising the difference I simply called NotifyProtocol myself for set row as well and that worked as expected.

I'm wondering why is this difference present between the two implementations and if it could be made more obvious that AddRow and SetRow are not similar methods, as one might expect based on the name?

Am I missing something important by not using the SetRow and instead calling NotifyProtocol manually?

I must point out that dealing with this has been quite frustrating and I would like to have learned something at least for my troubles.

Thank you,
Cheers

Edib Šupić [SLC] [DevOps Catalyst] Selected answer as best 1 day ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Pedro Debevere [SLC] [DevOps Enabler]2.16K Posted 1 day ago 1 Comment

Hi Edib, can you provide an example of the SetRow call that results in this exception?

Edib Šupić [SLC] [DevOps Catalyst] Selected answer as best 1 day ago
Edib Šupić [SLC] [DevOps Catalyst] commented 1 day ago

Hi Pedro,

Initially I was calling protocol.SetRow(TablePid, key, row); where TablePid is int, key is string and row is QActionTableRow.

In a moment of inspiration I tried calling row.ToObjectArray() and that fixes the issue.

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin