Page 2 of 2
Re: How to read data from another database?
Posted: April 29th, 2015, 10:52 am
by R.is
yes I have, he's added a screenshot can see.
Maybe I do not understand something or translator translates badly but I still do not understand what I do

Re: How to read data from another database?
Posted: April 29th, 2015, 11:36 am
by josh
Why don't you use the pack tool to created a zip file of your application and post it as an attachment here so I can see what the problem is. It is hard to see the problem from just the screenshot.
What language are you translating from? I may be able to find someone who speaks it.
Re: How to read data from another database?
Posted: April 29th, 2015, 12:48 pm
by R.is
I translate it from Russian language
Thank you very much for the fact that despite the fact that I do not understand you continue to help me.
I repeat once again the problem
For example last year the survey was conducted by questionnaire diсt1 assume there was only one question:
What operating systems do you know?
and the first respondent said:
Windows
Mac os
Linux
and now I need to hold a new poll in a year I go to the first respondent and tell him:
You said a year ago that you know the operating systems Windows, Mac os, Linux and which one is your best?
and response options should appear what he told us a year ago:
Windows
Mac os
Linux
and select the best among them, in his view and record his response to diсt2
zip file
https://drive.google.com/file/d/0B10br0 ... sp=sharing
Re: How to read data from another database?
Posted: April 29th, 2015, 2:05 pm
by josh
There are a number of problems with the application you sent. As I mentioned before, the arguments to the command loadcase must the be id-items for the external dictionary. In your application NAME, SEX and AGE are not id-items. They are regular data items therefore you cannot use them as keys for the lookup. Secondly you are using D1_DICT as the first argument to loadcase which is the name of the main dictionary and connot be used in loadcase which expects the name of an external dictionary.
I modified your application to use the ID item as the key for the lookup and moved it to the proc for the id item. Now when you enter the id, it loads the case from the second data file with the same id and fills in the name, sex and age fields.
PROC D1_ID
if loadcase(D2_DICT,D1_DICT.D1_ID) <> 1 THEN
errmsg("Failed to find case");
else
D1_DICT.SEX = D2_DICT.SEX;
D1_DICT.AGE = D2_DICT.AGE;
D1_DICT.NAME = D2_DICT.NAME;
endif;
A working example is in the attached zip file. Enter 1 or 2 for the id item and it will fill in the other fields.
Re: How to read data from another database?
Posted: April 30th, 2015, 9:00 am
by R.is
I could not open it you have posted

Re: How to read data from another database?
Posted: May 1st, 2015, 6:57 am
by josh
Please use CSPro 6.1 to open it.
Re: How to read data from another database?
Posted: May 4th, 2015, 6:08 am
by R.is
Thank you for your response, I deal with it
but as I show all this in response options