How do I access a case from the non-external dictionary

Discussions about CSEntry
Post Reply
TudorPopescu
Posts: 7
Joined: December 11th, 2023, 6:59 am

How do I access a case from the non-external dictionary

Post by TudorPopescu »

Hello,

How do I access a case from the non-external dictionary. I have the HBS_REGISTRY_DICT dictionary. I want to access with the function loadcase, forcase, but it is not received, I get the error Invalid function call (external dictionary name expected). Who can help me ?
aaronw
Posts: 565
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: How do I access a case from the non-external dictionary

Post by aaronw »

When accessing an external dictionary you must add the external dictionary to the project (File > Add Files). Then when you call a function, provide the dictionary name (e.g., HBS_REGISTRY_DICT). If you have any questions take a look at the simple application that I attached which does a look up using an external dictionary.
Attachments
StateLookup.zip
(22.68 KiB) Downloaded 282 times
TudorPopescu
Posts: 7
Joined: December 11th, 2023, 6:59 am

Re: How do I access a case from the non-external dictionary

Post by TudorPopescu »

About this I know, but I would like to access the data of a case of the same dictionary. For example, 1 case is already finished and completed, the 2nd case is currently being completed. Is there any way to access the data of case 1 from case 2?
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: How do I access a case from the non-external dictionary

Post by htuser »

@TudorPopescu,
Is there any way to access the data of case 1 from case 2?
it's possible. But, the easiest way is to use SQLQuery (https://www.csprousers.org/help/CSPro/s ... ction.html).
Actual SQLQuery function have some limitations, among others:
a) Can't put the resulsets in an array having more than two or three dimensions;
b) No direct way to put resulsets in a mixed type array (hashmap);
c) Don't support scalar for strings;
But, the new CSPro 8.0 .Sqlite.exec is overcoming most of these limitations.
Hope this help!
Best
Last edited by htuser on December 12th, 2023, 2:13 pm, edited 1 time in total.
G.VOLNY, a CSProuser from Haiti, since 2004
aaronw
Posts: 565
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: How do I access a case from the non-external dictionary

Post by aaronw »

I misread your question. You can try SQLQuery as htuser suggests. Another approach is to load the case from the menu, write the case to external dictionary, open new case, access previous case data using the loadcase function.
Post Reply