Page 1 of 1

How add records to a file associated with an external dictionary

Posted: June 2nd, 2019, 12:27 am
by dduarte05
Dear colleagues, good evening.

In addition to reading and writing in a file associated with an external dictionary, can I add records?

The Sqlquery function with the INSERT INTO statement table1 (column1, column2, ..) VALUES
(value1, value2, ...); Can it be used for that purpose?

regards

Re: How add records to a file associated with an external dictionary

Posted: June 2nd, 2019, 5:18 pm
by htuser
In CSPro logic, there's two way to insert items values, not all records item's, in an external CSDB files or a Sqlite files.

1.- Writecase function: http://www.csprousers.org/help/CSPro/wr ... ction.html , this specially for CSDB associate with external dictionary;

2.- Sqlquery with insert into for any CSDB or Sqlite file. However, Josh doesn't advise to create table and insert into in a CSDB files. So, it will be
very important to create a new Sqlite DB file and insert into any values. In the past, usualy i'm using this way for storing items, records values
(one by one). In the future this will be more easy in CSPro logic since we could have:
a) A way for sqlquery to extract records so do items values, so we'll be able to insert a whole records in any sqlite table;
(http://csprousers.org/forum/viewtopic.php?f=10&t=2592)
b) A way to create new secure sqlite DB (with credentials).

However, we can't smart sync sqlite DB in CSPro logic, so it's important to know if you want inserted values locally.
Best Regards,

Re: How add records to a file associated with an external dictionary

Posted: June 3rd, 2019, 7:14 am
by josh
You can use the insert() function in CSPro logic to insert a new occurrence of a record into a case in an external dictionary. You can then use writecase to save the case.

Re: How add records to a file associated with an external dictionary

Posted: June 9th, 2019, 12:24 am
by dduarte05
Thanks;