EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-09-17 12:13 AM . Last Modified: 2023-05-03 12:10 AM
Hi,
from the schema for CDBObject I see the below.
AddRecord Add Row Adds a new record to a data table. Control [retval] Record (Long) : Record ID of the new record in the data table.
The below code works. However, I thought I would be able to use - obj.Interface.AddRecord(RecordId); to return the record id of the new record.
But, it does not allow me. Unless I am going about the syntax wrong? Thanks,
obj.Interface.AddRecord();
RecordId = obj.Interface.RecordCount(RecordId);
RecordId = RecordId - 1;
obj.Interface.SetValue("TestField", RecordId, "Test");
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-09-17 03:02 AM
The correct syntax is:
RecordId = obj.Interface.AddRecord();
obj.Interface.SetValue("TestField", RecordId, "Test");
The record ID is returned by the AddRecord() method.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-09-17 03:02 AM
The correct syntax is:
RecordId = obj.Interface.AddRecord();
obj.Interface.SetValue("TestField", RecordId, "Test");
The record ID is returned by the AddRecord() method.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.