Fast Export to QES
This article is a description of a standalone executable file (.EXE) that allows the fast exporting of data to QES files.
Here is all you need to know about the Fast export to QES from the command line . . .
What is it?
This tool enables you to use one of Supervisor's features from a command line: the "Export data into .QES file".
It is worth mentioning that if you use CCA 5.3.4 or below, using this tool will also significantly reduce the data exporting time (~10 times faster than 5.3.3 "built-in" CCA exports).
Minimum requirements
To run this tool you will need to ensure that “Access Runtime” is installed on your server.
Either 2007, 2010 or 2013, but it has to be 32bit (x86).
Access Runtime 2007:
http://www.microsoft.com/en-us/download/details.aspx?id=4438
Access Runtime 2010:
http://www.microsoft.com/en-us/download/details.aspx?id=10910
Access Runtime 2013:
http://www.microsoft.com/en-us/download/details.aspx?id=39358
If the driver is missing, running the script will result in the following error message :
Error : Could not open target database (Error accessing database in SDBStructureAdo ::Open : [ADODB.Connection] Provider cannot be found. It may not be properly installed).
Where do I find it?
📥 You can download the tool from here
Download the latest “CmdQesExporter.rar” file and extract the contents to a suitable directory on your server.
The zipped file includes an instructions file, where you will find all relevant information.
How do I use it?
To launch an extraction to QES, please follow these steps ON YOUR SERVER:
- Open the "run" command dialog by pressing Winkey + R. (Winkey is the keyboard button with a windows icon on it - between "ctrl" and "alt").
- Type "cmd" then press enter.
- Now that the windows command line interface is running, you need to go to the directory where the "CmdQesExporter.exe" is. To do that, type "cd" (without quotes) in the command line followed by the directory where the "CmdQesEporter.exe" is.
For example: cd C:\users\matt\desktop\Qes Exporter - You can now launch the executable "CmdQesExporter.exe" followed by its command line arguments.
Command line formatting
You can now launch the executable "CmdQesExporter.exe" followed by its command line arguments.
The program parameters are the following, no order is enforced:
/help | Prints the help about how to launch the program |
/source | Required, followed by the path for the source QES file containing the structure of the survey. |
/format | Required, followed by "LEGACY" or "NEW" depending on the SQL tables format to extract from. |
/connectstring | Required, followed by the connection string to connect to the SQL database. e.g. "Provider=sqloledb;Data Source=ASKIA-PC\SQLEXPRESS;Initial Catalog=Test_Extraction;User Id=askia;Password=askia;" Of course each value after each "=" should be replaced with the appropriate value except for the "Provider". The "Data Source" value can be "(local)" if the SQL server is on the same machine and there is only one installed. The "Initial Catalog" is the name of the database containing the survey data. |
/id | Required, followed by the ID of the survey to extract. |
/target | Required, followed by the path for the target QES file to create. |
/progress | Optional, should be followed by "CONSOLE" (default value) to debug easily. |
/pipe | Optional when the progress is "CONSOLE". |
/interviewid | Optional, can be followed by the id of the interviews you want to export (separated by commas). |
/interviewidfile | Optional, can be followed by a file containing the id of the interviews you want to export (one per line). |
/completion | Optional, can be followed by "COMPLETE" or "INCOMPLETE" to export only the corresponding interviews. |
/minstartdate | Optional, can be followed by a date with the format dd/mm/yyyy to export only interviews started ON OR AFTER that day - i.e. >=. |
/maxstartdate | Optional, can be followed by a date with the format dd/mm/yyyy to export only interviews started BEFORE that day - i.e. <. |
/minenddate | Optional, can be followed by a date with the format dd/mm/yyyy to export only interviews ended ON OR AFTER that day - i.e. >=. |
/maxenddate | Optional, can be followed by a date with the format dd/mm/yyyy to export only interviews ended BEFORE that day - i.e. <. |
/seed | Optional, can be followed by the seeds of the interviews you want to export (separated by commas). |
/seedfile | Optional, can be followed by a file containing the seeds of the interviews you want to export (one per line). |
/endpause | Optional, can be followed by "UNPAUSE" which makes the exporter not to pause at the end of the export. |
/anonymity |
Optional, allows you to export an anonymised qes. Can optionally add "NONE". This will then allow you to export a QES with data un-anonymised. |
/encryptionkeyregulardata |
(5.4.9+) key to use to export encrypted data. Please refer to this article. |
/encryptionkeyanonymizeddata |
(5.4.9) key to use to export anonymised encrypted data. Please refer to this article. |
Examples
Some examples of how the final command to launch might look like:
CmdQesExporter.exe /source "c:\users\matt\desktop\test.qes" /format "LEGACY" /connectstring "Provider=sqloledb;Data Source=MATT-PC\SQLEXPRESS;Initial Catalog=CCA_SURVEYS;User Id=matt;Password=BlueSky;" /id "215" /target "c:\users\matt\desktop\test_out.qes" /progress "CONSOLE"
CmdQesExporter.exe /source "c:\users\matt\desktop\other.qes" /format "NEW" /connectstring "Provider=sqloledb;Data Source=(local);Initial Catalog=CCA_SURVEYS;User Id=name;Password=pass;" /id "666" /seed "12345,76543" /seedfile "c:\my_path\seeds.txt" /target "c:\data\news_extracted.qes" /progress "CONSOLE" /completion "COMPLETE" /minstartdate "24/06/2012" /maxstartdate "28/06/2012" /endpause "UNPAUSE"
Automation
You can also put the command in a batch file (.bat extension) and launch it.