Search found 1799 matches

by Gregory Martin
November 20th, 2023, 8:45 am
Forum: Tools
Topic: Read Only Database
Replies: 1
Views: 7076

Re: Read Only Database

That message occurs when you try to open a CSPro DB (SQLite) file in read/write mode without the permissions to do so. What is the location of the file that you are trying to associate with HPQF2_DICT? Make sure that it is located in a directory to which you have write access.
by Gregory Martin
November 15th, 2023, 9:44 am
Forum: Tools
Topic: Filecopy
Replies: 4
Views: 13439

Re: Filecopy

Let's say that I have a subdirectory, Images, located in the directory where my application is. CSPro evaluates paths based on the application directory, so if you wanted to copy all files in Images to a backup directory named after the current timestamp, you might have code like this: // create a b...
by Gregory Martin
October 23rd, 2023, 11:24 am
Forum: Entry
Topic: Error in search (selcase)
Replies: 4
Views: 11113

Re: Error in search (selcase)

You are allowing the multiple selection of cases: CaseFound = selcase (TABLA_DICT, "" ) where pos ( strip (BUSCAR), INGREDIENTE) = 1 include (INGREDIENTE, ID_GRUPO, ID_AUP) multiple ; // <-------------- If you do that, you have to iterate over the selected cases to determine what to proces...
by Gregory Martin
October 18th, 2023, 7:33 am
Forum: Entry
Topic: Survey duration error
Replies: 2
Views: 7382

Re: Survey duration error

Your calculation is done PROC UPLOAD_PICTURES_ID, so it's only recording the time to fill the ID field. You want to move it into the level procedure so that it is executed prior to data entry, and then after the case is entered. PROC UPLOAD_PICTURES_LEVEL preproc surveyStartTime = timestamp (); post...
by Gregory Martin
October 16th, 2023, 12:29 pm
Forum: Other
Topic: Data Viewer
Replies: 1
Views: 3369

Re: Data Viewer

You're right that the password is displayed. I'll modify Data Viewer for CSPro 8.0 so that it does not display any attributes specified in the connection string.
by Gregory Martin
October 2nd, 2023, 7:55 am
Forum: Entry
Topic: Prefill roster columns from external files
Replies: 2
Views: 3685

Re: Prefill roster columns from external files

First, you need to attach the external dictionary to your application: File -> Add Files, select code.dcf. When you run your program, you will associate CODE_DICT with external.csdb. Then you can loop over all cases where the province matches: PROC APP_DICT.PROVINCE numeric numSchools; forcase CODE_...
by Gregory Martin
September 29th, 2023, 5:15 pm
Forum: News
Topic: New Version of CSPro
Replies: 3
Views: 4662

Re: New Version of CSPro

We've released the first CSPro 8.0 beta: https://www.csprousers.org/beta A lot of the documentation is not complete, and there are a couple incomplete features that will be finished before the actual release, but it is something that you can play with. You can read more about this version here: http...
by Gregory Martin
September 29th, 2023, 5:09 pm
Forum: Entry
Topic: ValueSet.Randomize Function
Replies: 4
Views: 3089

Re: ValueSet.Randomize Function

You're setting a custom value set for P2A, so it won't be using P2A_VS1. You should randomize r:
PROC P2A
Preproc
ValueSet
r=P2A_VS1;
r.remove(P2);
seed(timestamp());
r.Randomize(Exclude(8,9));
setvalueset(P2A,r);
by Gregory Martin
September 28th, 2023, 8:37 am
Forum: Synchronization
Topic: Synchronization unexpected error (Impossible d'accéder à un objet supprimé. Nom de l'objet : 'Icon'.))
Replies: 2
Views: 2283

Re: Synchronization unexpected error (Impossible d'accéder à un objet supprimé. Nom de l'objet : 'Icon'.))

That error message is related to the UI of Data Viewer, but I've never seen anything like it. Was your data file corrupted, or is it still okay? I would just try to sync again. Does this always happen when you sync now? You can also try updating to the latest CSPro, 7.7.3, as you have the previous v...
by Gregory Martin
September 28th, 2023, 8:35 am
Forum: Entry
Topic: ValueSet.Randomize Function
Replies: 4
Views: 3089

Re: ValueSet.Randomize Function

Random numbers in the computer world are rarely truly random, as an algorithm determines in what order numbers appear. What you need to do to get randomness in the sequence is to call the seed function: https://www.csprousers.org/help/CSPro/seed_function.html A common procedure is to "seed"...