<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Efficy Overflow Q&amp;A - Recent questions tagged datasynchro</title>
<link>https://overflow.efficy.io/?qa=tag/datasynchro</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to run multiple instance of DataSynchro (Remote) at same time ?</title>
<link>https://overflow.efficy.io/?qa=7090/how-to-run-multiple-instance-of-datasynchro-remote-same-time</link>
<description>&lt;p&gt;I recently tried out to run multiple instances of  DataSynchro Remote and it seemed to work. But after several thousands of treatments of rows the two instances got into error (do not remember exactly which one).&lt;/p&gt;

&lt;p&gt;I'd like to know: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how properly to configure DataSynchro (Remote) to run the multiple instance at the same time ?  (best practice)&lt;/li&gt;
&lt;li&gt;possibility to separate the log files for each instance ? &lt;/li&gt;
&lt;li&gt;are there any concerns about running multiple instances (except: hardware usage, remote -&amp;gt; Throttling limit, record edit-handler that might be opened by one instance) ? &lt;/li&gt;
&lt;li&gt;any other details and attention points to take into account ? &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Update 20/08/2024&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First attempt:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 thread (as am importing files and some details : last modified, created date, file size -&amp;gt; multi thread is not an option yet)&lt;/li&gt;
&lt;li&gt;3 folders, each one contains the source file (excel) + the .dat file + ds remote .exe&lt;/li&gt;
&lt;li&gt;for each file (excel) an ODBC source has been created and configured in .dat file&lt;/li&gt;
&lt;li&gt;started DSRemote one by one with a diff range in queries for each one&lt;/li&gt;
&lt;li&gt;end result -&amp;gt; after few lines got into &quot;Session timeout&quot;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=8682061803098430082&quot; alt=&quot;enter image description here&quot;&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=7090/how-to-run-multiple-instance-of-datasynchro-remote-same-time</guid>
<pubDate>Mon, 19 Aug 2024 13:33:13 +0000</pubDate>
</item>
<item>
<title>Timeout when importing Woocommerce data from Productvariations Table</title>
<link>https://overflow.efficy.io/?qa=6990/timeout-when-importing-woocommerce-productvariations-table</link>
<description>&lt;p&gt;Hi,&lt;br&gt;
I'm trying to get data from a Woocommerce website and the process with the Efficy datasynchro tool doesn't ends.&lt;br&gt;
I'm using a specific ODBC (Cdata driver) driver to access to the Woocommerce database.&lt;br&gt;
&lt;strong&gt;Question :&lt;/strong&gt;&lt;br&gt;
Is there any parameters for this kind of processes ?&lt;br&gt;
Thank you Dimitri&lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6990/timeout-when-importing-woocommerce-productvariations-table</guid>
<pubDate>Fri, 20 Oct 2023 13:19:02 +0000</pubDate>
</item>
<item>
<title>How to extract blob data from a Maximizer Database to an Effciy database</title>
<link>https://overflow.efficy.io/?qa=6764/extract-blob-data-from-maximizer-database-effciy-database</link>
<description>&lt;p&gt;Hello,&lt;br&gt;
I need to import all the documents from a Maximizer SQL Database to an Efficy Database.&lt;br&gt;
Is it possible ?&lt;br&gt;
If yes how ?&lt;br&gt;
Thank you&lt;br&gt;
Dimitri&lt;/p&gt;
</description>
<category>Efficy/ Client side</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=6764/extract-blob-data-from-maximizer-database-effciy-database</guid>
<pubDate>Sun, 20 Nov 2022 21:32:39 +0000</pubDate>
</item>
<item>
<title>Access violation at address while using getFileStream</title>
<link>https://overflow.efficy.io/?qa=5431/access-violation-at-address-while-using-getfilestream</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I am trying to transform large files (&lt;code&gt;FILES.KIND = 5&lt;/code&gt;) to embedded one.&lt;br&gt;
And I am using the  getFileStream  as I need to assign a &lt;code&gt;FILES.STREAM&lt;/code&gt; field which is null in case of large file.&lt;br&gt;
While running Scheduler or DataSynchro I am getting more and less same error : &lt;code&gt;Access violation at address 000000000083531A in module&lt;/code&gt; on getFileStream step.&lt;br&gt;
I tried different versions (11.2, 11.3, etc.) but still getting the error. &lt;/p&gt;

&lt;p&gt;Here is a small example of the DataSynchro import script: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function EfficyImportRecord(DataStore) {
  var k_File = DataStore.AsString('K_FILE'),
      k_Docu = DataStore.AsString('K_1'),
editDocu = Efficy.openEditContext(ntDocu, k_Docu);
  Efficy.log('KFile: ' + k_File);
  stream = Efficy.getFileStream(editDocu, DataStore);
  Efficy.log('Stream: ' + stream);
  return true;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=1766080721507303177&quot; alt=&quot;datasynchro error&quot;&gt;&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.io/?qa=blob&amp;amp;qa_blobid=1564540188812631968&quot; alt=&quot;scheduler script errors&quot;&gt;&lt;br&gt;
Any ideas ?&lt;/p&gt;

&lt;p&gt;Maybe we have already some examples or scripts that are doing large file to embedded , let me know.&lt;/p&gt;

&lt;p&gt;Tnx.&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5431/access-violation-at-address-while-using-getfilestream</guid>
<pubDate>Wed, 13 May 2020 10:33:28 +0000</pubDate>
</item>
<item>
<title>datasynchro et activation workflow</title>
<link>https://overflow.efficy.io/?qa=5346/datasynchro-et-activation-workflow</link>
<description>&lt;p&gt;Bonjour,&lt;/p&gt;

&lt;p&gt;Lors d'une DataSynchro, si on active le workflow, le script tourne en boucle sans envoyer de message d'erreur. &lt;br&gt;
Nous avons remarqué que si le code du workflow est écrit directement dans la fenêtre du designer, ce problème n'apparaît pas. Or, depuis la migration en 11.3, nous avons mis en place le workflow par un import de fichier comme conseillé dans la documentation.&lt;br&gt;
Dans le designer nous avons le code suivant : &lt;br&gt;
/*&lt;br&gt;
@import &quot;custom/workflow/workflow&quot;&lt;br&gt;
*/&lt;/p&gt;

&lt;p&gt;Comment faire pour que le DataSynchro fonctionne en maintenant le système d'import de fichier du workflow ?&lt;/p&gt;

&lt;p&gt;Merci&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=5346/datasynchro-et-activation-workflow</guid>
<pubDate>Tue, 03 Mar 2020 09:21:02 +0000</pubDate>
</item>
<item>
<title>ODBC Questionmarks on import</title>
<link>https://overflow.efficy.io/?qa=4890/odbc-questionmarks-on-import</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;We're trying this with an 11.2 customer: &lt;a rel=&quot;nofollow&quot; href=&quot;https://overflow.efficy.com/?qa=4077/add-chinese-characters-with-datasynchro-odbc-limitation&quot;&gt;Chinese characters in odbc datasynchro&lt;/a&gt; There is still text being replaced by question marks (?). Propably because of some Eastern European letters. Is there a way to get these right? We tried OEM, ANSI and 65001 as characterset in the schema.ini but to no avail.&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Rob&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4890/odbc-questionmarks-on-import</guid>
<pubDate>Thu, 10 Oct 2019 14:45:28 +0000</pubDate>
</item>
<item>
<title>Error 'Unknown EntityView &quot;&quot;' when using DataSynchro (32- or 64-bits) for Efficy 11.2</title>
<link>https://overflow.efficy.io/?qa=4534/error-unknown-entityview-when-using-datasynchro-bits-efficy</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;a customer is using the DataSynchro to import records.&lt;br&gt;
In Efficy 10SP2+ it did run without any problems, but they are now migrated to Efficy 11.2 and when they now use the DataSynchro to create a new import and want to select the tables they get the error 'Unknow EntityView &quot;&quot;'.&lt;br&gt;
&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=1130253673754534087&quot; alt=&quot;enter image description here&quot;&gt;&lt;br&gt;
We didn't change anything to the structure.&lt;br&gt;
How can we find out on which EntityView it's about?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Jeroen&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4534/error-unknown-entityview-when-using-datasynchro-bits-efficy</guid>
<pubDate>Mon, 08 Jul 2019 08:45:46 +0000</pubDate>
</item>
<item>
<title>Datasynchro Export to CSV</title>
<link>https://overflow.efficy.io/?qa=4142/datasynchro-export-to-csv</link>
<description>&lt;p&gt;I'm looking for an example how to export Efficy content to CSV File using Datasynchro&lt;br&gt;
In Efficy Help I found only an example to export to Excel file&lt;/p&gt;

&lt;p&gt;Thanks &lt;/p&gt;
</description>
<category>How to</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4142/datasynchro-export-to-csv</guid>
<pubDate>Wed, 24 Apr 2019 08:39:17 +0000</pubDate>
</item>
<item>
<title>Datasynchro cuts string after 510 characters</title>
<link>https://overflow.efficy.io/?qa=4128/datasynchro-cuts-string-after-510-characters</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I'm having an issue with importing a text into the memo field for the company module.&lt;br&gt;
I've successfully imported a list of contacts but importing another file containing company data poses a problem.&lt;/p&gt;

&lt;p&gt;The string in the excel file destined for the memo field is cut after 510 characters. I have tried changing the format to text, general, ... Also tried using datasynchro 32-bit and 64-bit, saving as xls and xlsx, ... Unfortunately nothing works.&lt;/p&gt;

&lt;p&gt;I can't find why the string is cut off. Does anyone have experience with this?&lt;br&gt;
Normally, i try to use the csv format but as the memo contains new lines i didn't think it was useful.&lt;/p&gt;

&lt;p&gt;Thanks in advance.&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4128/datasynchro-cuts-string-after-510-characters</guid>
<pubDate>Mon, 22 Apr 2019 15:55:59 +0000</pubDate>
</item>
<item>
<title>Add Chinese characters with Datasynchro (ODBC limitation)</title>
<link>https://overflow.efficy.io/?qa=4077/add-chinese-characters-with-datasynchro-odbc-limitation</link>
<description>&lt;p&gt;Hi everyone,&lt;/p&gt;

&lt;p&gt;After some discussion we used the following to make the Chinese characters works with an ODBC driver during a Datasynchro.&lt;/p&gt;

&lt;p&gt;First I had to transform the Chinese characters in HTML entities with a small Power Shell Script (.ps1).&lt;br&gt;
custom: It takes the name of the folder without .csv and with a trailing TBE (to be encoded)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Add-Type -AssemblyName System.Web
## Import each line of the CSV file into an array of PowerShell objects
$file = $args[0]
$output = $file.Substring(0,$file.Length-3)
$records = Import-Csv -Path &quot;$file.csv&quot; -Delimiter &quot;;&quot;

## Encode each field in html entities
$records | ForEach-Object {
    foreach ($field in $_.PSObject.Properties.Name)
    {
        ##$_.$field = [System.Web.HttpUtility]::UrlDecode($_.$field)
$_.$field = [uri]::EscapeUriString($_.$field)
    }
}

## Export the array of modified objects to the CSV file
$records | Export-Csv -Path &quot;$output.csv&quot; -Force -notype -Delimiter &quot;;&quot;

## Display the object in tabular form
$records | Format-Table -AutoSize
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then decode it during the Import script with following function &lt;br&gt;
&quot; decodeURIComponent() &quot;. &lt;br&gt;
For the newer version of the datasynchro (&amp;gt;10sp2)  the fields can be decoded directly in the start job. &lt;/p&gt;

&lt;p&gt;And it worked !&lt;/p&gt;

&lt;p&gt;Thanks to Alexandre and Kristof.&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=4077/add-chinese-characters-with-datasynchro-odbc-limitation</guid>
<pubDate>Tue, 02 Apr 2019 10:42:23 +0000</pubDate>
</item>
<item>
<title>Insert a value in a lookup table during the datasynchro</title>
<link>https://overflow.efficy.io/?qa=3976/insert-a-value-in-a-lookup-table-during-the-datasynchro</link>
<description>&lt;p&gt;Hello Efficy Team, &lt;/p&gt;

&lt;p&gt;A customer have a big Excel file to import with a DataSynchro. My quesion is simple : how, with an Efficy method / function, could we insert a value in a Lookup if this value does not exist ? &lt;/p&gt;

&lt;p&gt;Last time I had to do that, I did it with an insert in SQL :( &lt;br&gt;
Not really clean.&lt;/p&gt;

&lt;p&gt;Is there a more &quot;efficient&quot; way to do that ? &lt;/p&gt;

&lt;p&gt;Thanks in advance, &lt;/p&gt;

&lt;p&gt;Loïc&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3976/insert-a-value-in-a-lookup-table-during-the-datasynchro</guid>
<pubDate>Thu, 21 Feb 2019 16:04:53 +0000</pubDate>
</item>
<item>
<title>How to generate specific DataSynchro log files?</title>
<link>https://overflow.efficy.io/?qa=3928/how-to-generate-specific-datasynchro-log-files</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;I need to generate specific DataSynchro log files which contains some details that the client needs( number of records, number of errors, imported recors, rejected  records ...)&lt;/p&gt;

&lt;p&gt;PS: the import is scheduled.&lt;/p&gt;

&lt;p&gt;Could you help me doing that please?&lt;/p&gt;

&lt;p&gt;Thanks&lt;br&gt;
Regards&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3928/how-to-generate-specific-datasynchro-log-files</guid>
<pubDate>Fri, 08 Feb 2019 09:44:12 +0000</pubDate>
</item>
<item>
<title>DataSynchro and Date Format.</title>
<link>https://overflow.efficy.io/?qa=3757/datasynchro-and-date-format</link>
<description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;I would like to know which date format is used by DataSynchro/DataSynchroEmbedded.&lt;br&gt;
- Efficy Admin Console Date Format&lt;br&gt;
- Windows Date Format&lt;/p&gt;

&lt;p&gt;I've made a few test and it seems that we need to use the windows date format but, why ?&lt;br&gt;
is that true ?&lt;/p&gt;

&lt;p&gt;If yes it seems that we need to know the windows server config, and we also need to use different code for using in datasynchro and in serverscript.&lt;/p&gt;

&lt;p&gt;Can you confirm ?&lt;/p&gt;

&lt;p&gt;(i'm on an Efficy 2014 6100)&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3757/datasynchro-and-date-format</guid>
<pubDate>Mon, 17 Dec 2018 08:47:46 +0000</pubDate>
</item>
<item>
<title>How to add an edit context into CONT_USER and COMP_USER to use the USERROLE field.</title>
<link>https://overflow.efficy.io/?qa=3207/how-add-edit-context-into-contuser-compuser-userrole-field</link>
<description>&lt;p&gt;I need to define by a level of proximity my relations between CONT and USER or COMP and USER by using The USERROLE Field.&lt;/p&gt;

&lt;p&gt;I try to do it into an OpenEditContextRelation2 but this context doesn't exist it return an error EntityView='' &lt;/p&gt;

&lt;p&gt;Below a part of my dataSynchro where i try to edit relation between ntComp and ntUser.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;      var Target = 11 // Cont
      var Detail = 1; // Cont_user
      var Key = K_CONTACT
      var DetailKey = 0
      if(!isEmpty(DataStore.AsString('Proxim'))){

    DetailKey = 4  // User--&amp;gt; K_USER 4   

    var EditHandle = Database.OpenEditContextRelation2(Target, Detail, Key, DetailKey)

     try {
     var DataSet = Database.GetMasterDataSet(EditHandle, 0)

    DataSet.Edit()

    SQL = &quot;SELECT K_CONT_USERROLE FROM &amp;lt;#TABLE NAME='LK_CONT_USERROLE'&amp;gt; WHERE USERROLE = :Param&quot;; 

    Database.UpdateFields(EditHandle, 0, 'USERROLE', GetLookupKeyFromQuery(SQL,     DataStore.AsString('Proximité MAN'), 'K_CONT_USERROLE') );

    Database.CommitChanges(EditHandle, false)
     }catch(e){

     Database.log(e.message)
    }
    finally
     {
    Database.CloseContext(EditHandle)
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I need of course to be able to change relation on the Edit context of each Entity. Comp and Cont.&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=3207/how-add-edit-context-into-contuser-compuser-userrole-field</guid>
<pubDate>Tue, 29 May 2018 09:45:31 +0000</pubDate>
</item>
<item>
<title>Data Synchro - Import data in multivalue field</title>
<link>https://overflow.efficy.io/?qa=2860/data-synchro-import-data-in-multivalue-field</link>
<description>&lt;p&gt;Hi all!&lt;/p&gt;

&lt;p&gt;I want to import some data in Efficy with DataSync Tool. In a Relation Table i have a multivalue field. Its choices come from the F&lt;em&gt;ROLE field of a LookUp Table (LK&lt;/em&gt;THEMROLE).&lt;br&gt;
1 | role1&lt;br&gt;
2 | role2&lt;br&gt;
...&lt;/p&gt;

&lt;p&gt;I tried to import data from an Excel file wich looks like this :&lt;br&gt;
Them.Name | Cont.FirstName | Cont.Name | THEM&lt;em&gt;CONT.F&lt;/em&gt;ROLES&lt;br&gt;
Them1 | Firstname1 | Name1 | role1;role2;role5&lt;br&gt;
...&lt;/p&gt;

&lt;p&gt;when i run  the synchro the tool throw me this exception :&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;[10:48:17.083] Error while creating or modifying destination record.&lt;br&gt;
  [10:48:17.087] Error: WKFL-2142 Error while executing Script&lt;br&gt;
  &quot;EVariantTypeCastError&quot; at line 42 char 5. Message: &quot;Could not convert&lt;br&gt;
  variant of type (Dispatch) into type (Integer)&quot;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I tried to replace the name of each role by it's id in the LookUp Table but it's the same&lt;/p&gt;

&lt;p&gt;Can anyone help me ?&lt;br&gt;
Thanks a lot&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2860/data-synchro-import-data-in-multivalue-field</guid>
<pubDate>Fri, 29 Dec 2017 10:27:56 +0000</pubDate>
</item>
<item>
<title>DataSync : find multiple contact per row</title>
<link>https://overflow.efficy.io/?qa=2851/datasync-find-multiple-contact-per-row</link>
<description>&lt;p&gt;Hi all!&lt;/p&gt;

&lt;p&gt;I have an Excel file with several contacts to import.&lt;br&gt;
Each of them can be linked to another contact (maybe not).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Header : FIRSTNAME; NAME; [contact fields...]; managerFIRSTNAME; managerNAME
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I generated the script with DataSynchro Tool and modified it, but I can not find the 2 contacts.&lt;br&gt;
I want to :&lt;br&gt;
- search if the contact already exists (with &lt;strong&gt;FIRSTNAME&lt;/strong&gt; and &lt;strong&gt;NAME&lt;/strong&gt;), insert or update him,&lt;br&gt;
-  search if his referent exists (with &lt;strong&gt;managerFIRSTNAME&lt;/strong&gt; and &lt;strong&gt;managerNAME&lt;/strong&gt;), insert or update this one&lt;br&gt;
- and finally link the twice (to link them i have a field &quot;referent&quot; to fill and use &quot;insertDetail2&quot;).&lt;/p&gt;

&lt;p&gt;I checked &quot;&lt;em&gt;Use field to find existing record at import&lt;/em&gt;&quot; for  FIRSTNAME, NAME, managerFIRSTNAME, managerNAME&lt;br&gt;
Do I have to separate them in 2 worksheets and import them like this ? :&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select Cont.NAME,
       Cont.FIRSTNAME,
       Cont.COMPANY,
       Cont.EMAIL1,
       [...], 
       Cont.CITY,
       User.FIRSTNAME, User.LASTNAME from [Contacts$] Cont
       LEFT JOIN [Users$] User
            ON Cont.ReferentFIRSTNAME = User.FIRSTNAME
            AND Cont.ReferentLASTNAME = User.LASTNAME;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2851/datasync-find-multiple-contact-per-row</guid>
<pubDate>Mon, 18 Dec 2017 19:37:05 +0000</pubDate>
</item>
<item>
<title>I can only import data in Relation Table with DataSync Tool</title>
<link>https://overflow.efficy.io/?qa=2826/i-can-only-import-data-in-relation-table-with-datasync-tool</link>
<description>&lt;p&gt;Hi all!&lt;/p&gt;

&lt;p&gt;I have an Excel file that contains a list of Contact with one column that says his Company&lt;br&gt;
In &lt;strong&gt;&lt;em&gt;Efficy Data&lt;/em&gt; -&amp;gt; &lt;em&gt;Impot Table&lt;/em&gt;&lt;/strong&gt;, Entity Tables do not appear, there are only Relation Tables (Acti&lt;em&gt;Case, Acti&lt;/em&gt;Comp, etc.)&lt;/p&gt;

&lt;p&gt;Anyone can say me why pls?&lt;/p&gt;

&lt;p&gt;Thanks a lot!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=8457370763225427667&quot; alt=&quot;Only Relation Table&quot;&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2826/i-can-only-import-data-in-relation-table-with-datasync-tool</guid>
<pubDate>Tue, 12 Dec 2017 10:55:48 +0000</pubDate>
</item>
<item>
<title>Cannot Authorize sync with PieSync</title>
<link>https://overflow.efficy.io/?qa=2819/cannot-authorize-sync-with-piesync</link>
<description>&lt;p&gt;I&quot;m trying to authorize a sync with PieSync in order to sync contacts with an emailplatform.&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://help.piesync.com/connector-apps/efficy-crm&quot;&gt;https://help.piesync.com/connector-apps/efficy-crm&lt;/a&gt;&lt;br&gt;
According to the instructions I have to enter database name, login and password.&lt;/p&gt;

&lt;p&gt;I tried this but kept getting the error that database name is incorrect.&lt;br&gt;
&quot;There was an issue with your credentials, the authentication failed with: [EEfficyBrokerMessage] Incorrect Database Alias&quot;&lt;/p&gt;

&lt;p&gt;Please advice!&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2819/cannot-authorize-sync-with-piesync</guid>
<pubDate>Fri, 08 Dec 2017 09:48:05 +0000</pubDate>
</item>
<item>
<title>1st import script for a DataSynchro</title>
<link>https://overflow.efficy.io/?qa=2818/1st-import-script-for-a-datasynchro</link>
<description>&lt;p&gt;Hi all!&lt;/p&gt;

&lt;p&gt;I wanted to train me with scripting (import data from Excel file with Data Synchro)&lt;br&gt;
 Excel:&lt;br&gt;
Company;External ID;COMPANY;Contact external Id;FIRSTNAME;LASTNAME&lt;br&gt;
1 | COMP &amp;amp; CIE | 1 | BERNARD | A.&lt;br&gt;
1 | COMP &amp;amp; CIE | 2 | BART | B.&lt;br&gt;
2 | IKEA | 3 | ABDUL | C.&lt;br&gt;
2 | IKEA | 4 | WORLD | D.&lt;/p&gt;

&lt;p&gt;Objectives: insert this data in the DB, link the Contact to the Company, and link all these new entities to the same Publication&lt;/p&gt;

&lt;p&gt;this script&lt;br&gt;
I have some questions:&lt;br&gt;
- Does my script respect good practices&lt;br&gt;
- I have difficulties to understanding the difference between Relation (with AddLink2) and Details (with InsertDetail2). For me Detail is a &quot;type&quot; of relation&lt;br&gt;
A Detail is the sub Entity in the selected Entity right?&lt;br&gt;
- in InsertDetail2 what does the last parameter?? I don't undersand the &quot;automatically link the contact’s main company&quot;&lt;/p&gt;

&lt;p&gt;Finally, DataSync Tool thorws an Exception when i run it:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[15:52:44.744]     4 Records Found
[15:52:44.744]   Handling Record &quot;MAXIME&quot;...
[15:52:52.076] 
[15:52:52.076] *** ERROR ***
[15:52:52.076] Error while creating or modifying destination record.
[15:52:52.076] Error: WKFL-2142 Error while executing Script &quot;EOleException&quot; at line 16 char 5.
Message: &quot;SLC_Publ_Cont_750
Cannot add a new Relation

ErrorContext
=============================     
EDatabaseError 0
L'instruction INSERT est en conflit avec la contrainte FOREIGN KEY &quot;FK_PUBLICATIONS_PUBL_CONT1&quot;. Le conflit s'est produit dans la base de données &quot;TESTFORMATION&quot;, table &quot;ADMINFORMATION.PUBLICATIONS&quot;, column 'K_PUBLICATION'

Error
=============================     
EEfficyTableViewException 1116
(ENTT-1616) SLC_Publ_Cont_750
Cannot add a new Relation
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;my script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var PUBLICATION_KEY = 2;

function EfficyImportRecord(DataStore) {
  var companyKey = DataStore.FindExistingEntity('Comp');
  var compEdit = Database.OpenEditContext(ntComp, companyKey);
  try {
    var dsComp = Database.GetMasterDataSet(compEdit, 0);
    dsComp.Edit();
    companyKey = dsComp.FieldByName('K_COMPANY').AsFloat; // Dans le cas où on crée un nouvel enregistrement, sinon la valeur était déjà initialisée par la méthode DataStore.FindExistingEntity
    dsComp.FieldByName('F_EXTERNALID').AsString = DataStore.AsString('Company External ID');
    dsComp.FieldByName('NAME').AsString = DataStore.AsString('COMPANY');

    // Pour identifier clairement les sociétés impactées par la datasynchro, la lier à une publication add-hoc
    Database.AddLink2(ntPubl, ntComp, PUBLICATION_KEY, companyKey, true);


    Database.CommitChanges(compEdit, false);
  } 
  finally
  {
    Database.CloseContext(compEdit);
  }


  var contKey = DataStore.FindExistingEntity('Cont');
  var contEdit = Database.OpenEditContext(ntCont, contKey);
  try {
    var dsCont = Database.GetMasterDataSet(contEdit, 0);
    dsCont.Edit();
    contKey = dsCont.FieldByName('K_CONTACT').AsFloat;
    dsCont.FieldByName('F_EXTERNALID').AsString = DataStore.AsString('Contact external Id');
    dsCont.FieldByName('NAME').AsString = DataStore.AsString('LASTNAME');
    dsCont.FieldByName('FIRSTNAME').AsString = DataStore.AsString('FIRSTNAME');

    Database.InsertDetail2(contEdit, ntPubl, PUBLICATION_KEY, false);  //passer false a true??
    Database.InsertDetail2(contEdit, ntComp, compKey, false);

    Database.CommitChanges(contEdit, false);
  } 
  finally
  {
    Database.CloseContext(contEdit);
  }


  return true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Thanks a lot!&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2818/1st-import-script-for-a-datasynchro</guid>
<pubDate>Thu, 07 Dec 2017 15:30:13 +0000</pubDate>
</item>
<item>
<title>How to import PICTURE (BLOB) from an External Database into an Efficy PICTURE field ?</title>
<link>https://overflow.efficy.io/?qa=2717/import-picture-blob-external-database-efficy-picture-field</link>
<description>&lt;p&gt;Dear all,&lt;/p&gt;

&lt;p&gt;I have to import PICTURES into Efficy PICTURE fields from an External ORACLE Database into an Efficy Database by using a Datasync, but the following code is not working (No Error but the PICTURE field stay empty) : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Database.UpdateCategory(EditHandle, 'PROP$BROCHURE', 'F_PIC' + indexPic, DataStore.AsString('PICR_DATA'));
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;PICR_DATA is an Oracle Blob&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2717/import-picture-blob-external-database-efficy-picture-field</guid>
<pubDate>Tue, 03 Oct 2017 13:28:15 +0000</pubDate>
</item>
<item>
<title>Error closing DataSynchroRemote when used with a commandline</title>
<link>https://overflow.efficy.io/?qa=2663/error-closing-datasynchroremote-when-used-with-commandline</link>
<description>&lt;p&gt;For a customer we built a DataSynchroRemote to import data from an Excel sheet into Efficy. When performing the import within the DataSynchroRemote user interface, the import is completed without any errors.&lt;/p&gt;

&lt;p&gt;When starting the same DataSynchro from a commandline (with the .dat-file as the commandline parameter,) the import is processed correctly, but an error occurs when the application is closed after completing:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;executable        : DataSynchroRemote.exe&lt;br&gt;
exec. date/time   : 2017-03-31 10:40&lt;br&gt;
version           : 10.0.7987.0&lt;br&gt;
compiled with     : Delphi 2009&lt;br&gt;
madExcept version : 3.0n&lt;br&gt;
callstack crc     : $b943c1eb, $eea85a9b, $eea85a9b&lt;br&gt;
exception number  : 1&lt;br&gt;
exception class   : EAccessViolation&lt;br&gt;
exception message : Access violation at address 005636E3 in module 'DataSynchroRemote.exe'. Read of address 0DA868F0.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2663/error-closing-datasynchroremote-when-used-with-commandline</guid>
<pubDate>Fri, 25 Aug 2017 10:52:34 +0000</pubDate>
</item>
<item>
<title>Wrong character incoding when exporting Efficy Data in a CSV file usin DataSynchroRemote</title>
<link>https://overflow.efficy.io/?qa=2611/wrong-character-incoding-exporting-efficy-datasynchroremote</link>
<description>&lt;p&gt;Hello Everyone, &lt;/p&gt;

&lt;p&gt;For one of my projects, I have to export Efficy data into a csv file using the DataSynchroRemote tool and I noticed during my tests that some special characters are not propely incoded in my csv file:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=4557812496703107251&quot; alt=&quot;&amp;quot;5ème SENS&amp;quot; is correctly incoded in Efficy Database&quot;&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://overflow.efficy.com/?qa=blob&amp;amp;qa_blobid=6767383536817817261&quot; alt=&quot;Data exported in csv file&quot;&gt;&lt;/p&gt;

&lt;p&gt;I tried to encode those values using Js functions like encodeUri (for example) but without success. &lt;/p&gt;

&lt;p&gt;Do someone have an idea on how I could do? &lt;/p&gt;

&lt;p&gt;Kr,&lt;/p&gt;

&lt;p&gt;Prince &lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2611/wrong-character-incoding-exporting-efficy-datasynchroremote</guid>
<pubDate>Thu, 13 Jul 2017 08:52:42 +0000</pubDate>
</item>
<item>
<title>How to avoid session timeout for a long datasynchro remote</title>
<link>https://overflow.efficy.io/?qa=2099/how-to-avoid-session-timeout-for-a-long-datasynchro-remote</link>
<description>&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;I have a remote datasynchro that runs a couple times a day, it contains a lot of records that need updating. The issue is that I get a session timeout before it can finish.&lt;/p&gt;

&lt;p&gt;Is there a way to avoid this? It has to be a remote datasynchro, there's no other way.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Efficy Integrations</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=2099/how-to-avoid-session-timeout-for-a-long-datasynchro-remote</guid>
<pubDate>Fri, 09 Dec 2016 13:31:54 +0000</pubDate>
</item>
<item>
<title>How importing an blob image field from an eLink database to an Efficy database via DataSynchro</title>
<link>https://overflow.efficy.io/?qa=1539/importing-image-field-database-efficy-database-datasynchro</link>
<description>&lt;p&gt;I need to update an image field into a category on Efficy provided by eLink.&lt;br&gt;
By default this code doesn't work. &lt;/p&gt;

&lt;p&gt;I tried : &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  Database.ActivateCategory(EditHandle, 'DOCU$ORG')    
  var CategoryDataSet = Database.GetCategoryDataSet(EditHandle, 'DOCU$ORG')
  CategoryDataSet.Edit         
  CategoryDataSet.FieldByName('F_VISUEL').AsWideString = DataStore.AsString('F_VISUEL')
  CategoryDataSet.Save
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or &lt;/p&gt;

&lt;pre&gt;&lt;code&gt; Database.ActivateCategory(EditHandle, 'DOCU$ORG')   
 Database.UpdateCategory(EditHandle, 'DOCU$ORG', 'F_VISUEL', DataStore.AsString('F_VISUEL')) 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In all cases blob is not updating properly. File seem corrupted. &lt;br&gt;
We tried to do a smartCompress but not recognize into a DataSynchro.&lt;/p&gt;

&lt;p&gt;Any idea to transfer these BLOB ? &lt;/p&gt;

&lt;p&gt;In both cases it's an SQL SERVER 2003 connector&lt;/p&gt;
</description>
<category>How to</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1539/importing-image-field-database-efficy-database-datasynchro</guid>
<pubDate>Thu, 21 Apr 2016 07:55:18 +0000</pubDate>
</item>
<item>
<title>does anybody knows which port is used for datasynchro when running from a client</title>
<link>https://overflow.efficy.io/?qa=1504/does-anybody-knows-which-port-used-datasynchro-running-client</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;is there a certain port, the DataSynchro communicates with the application Server during the logon?&lt;/p&gt;

&lt;p&gt;A custom want to have the datasynchro.exe local at on a Workstation of an employee which will be responsible for importing new lead data.&lt;/p&gt;

&lt;p&gt;Now they asked if there is a Special port to open for the communication between datasync and the application Server.&lt;/p&gt;

&lt;p&gt;Did I understand it correctly, the datasync connects to the application Server and uses the inoformation in the alias Manager (alias.ini) to conntect to the database for importing or exporting data?&lt;/p&gt;

&lt;p&gt;thanks in advance and best regards&lt;/p&gt;

&lt;p&gt;Stephan&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1504/does-anybody-knows-which-port-used-datasynchro-running-client</guid>
<pubDate>Thu, 07 Apr 2016 12:35:44 +0000</pubDate>
</item>
<item>
<title>add default security during data import via datasynchro</title>
<link>https://overflow.efficy.io/?qa=1207/add-default-security-during-data-import-via-datasynchro</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;how to set the Default security during Import via datasyncro?&lt;/p&gt;

&lt;p&gt;If I create a Company manually, the Default security will be set based on the configuration in conficy.&lt;/p&gt;

&lt;p&gt;User 1 creates a record manually and the security will be set like:&lt;br&gt;
ADMIN has full Access right&lt;br&gt;
Group 1 has read / write rights&lt;br&gt;
Group 2 has search rights&lt;br&gt;
the user itself has read / write / secure rights&lt;br&gt;
....&lt;/p&gt;

&lt;p&gt;How can I get the same result when doing the Import via datasynchro? &lt;/p&gt;

&lt;p&gt;I found a function &quot;SetSecurityUsers&quot; and did some tests but it seems this is not the proper function for my expected result.&lt;/p&gt;

&lt;p&gt;Any help would be greate.&lt;/p&gt;

&lt;p&gt;Thanks in advance and best regards&lt;/p&gt;

&lt;p&gt;Stephan&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1207/add-default-security-during-data-import-via-datasynchro</guid>
<pubDate>Fri, 15 Jan 2016 10:56:00 +0000</pubDate>
</item>
<item>
<title>Set the record owner during datasyncro import</title>
<link>https://overflow.efficy.io/?qa=1185/set-the-record-owner-during-datasyncro-import</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;is there a function to set the owner directly during Import via datasyncro?&lt;/p&gt;

&lt;p&gt;Have to Import companies and contacts were the security in Efficy is set based on a &quot;user field&quot; from the Import file.&lt;/p&gt;

&lt;p&gt;To set the user and the security is clear and works but I did not find how to set the owner. Currently my owner is always the &quot;efficy_admin&quot; user, used to Access the efficy database in the data syncro module.&lt;/p&gt;

&lt;p&gt;Any hint would be appreciated, thanks in advance and best regards&lt;/p&gt;

&lt;p&gt;Stephan&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1185/set-the-record-owner-during-datasyncro-import</guid>
<pubDate>Wed, 13 Jan 2016 09:20:20 +0000</pubDate>
</item>
<item>
<title>Where is the Application ID stored when using DataSynchro</title>
<link>https://overflow.efficy.io/?qa=1141/where-is-the-application-id-stored-when-using-datasynchro</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;when you do an import using DataSynchro(Remote) it's possible to set an Application ID, but where is this Application ID stored?&lt;/p&gt;

&lt;p&gt;Best regards,&lt;br&gt;
Jeroen Floor&lt;/p&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1141/where-is-the-application-id-stored-when-using-datasynchro</guid>
<pubDate>Fri, 08 Jan 2016 09:18:33 +0000</pubDate>
</item>
<item>
<title>[Efficy2014/DataSync]: Setting D_CREATE and D_CHANGE from EfficyImportRecord</title>
<link>https://overflow.efficy.io/?qa=1011/efficy2014-datasync-dcreate-dchange-efficyimportrecord</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;I am trying to import some company records from Excel sheet through the DataSync tool.&lt;br&gt;
Everything is working fine except I am not able to set D&lt;em&gt;CREATE / D&lt;/em&gt;CHANGE fields.&lt;br&gt;
The column 'Date Created' in Excel consists of string using the following format &quot;2008-02-26 04:29:00.000&quot;&lt;/p&gt;

&lt;p&gt;I am using this code inside EfficyImportRecord:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;DataSet.FieldByName('D_CREATE').AsString = DataStore.AsString('Date Created')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And getting the following error message in VisualStudio Debugger:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An unhandled exception ('&quot;2008-02-26 04:29:00.000&quot; is not a valid date and time') occured in DataSynchro.exe [832].&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;in the log I see:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Error while executing Script &quot;EConvertError&quot; at line 37 char 5.&lt;br&gt;
Message: &quot;''2008-02-26 04:29:00.000'' is not a valid date and time&quot;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Can anybody provide me with a correct snippet to set the dates (and any other datetime field)?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1011/efficy2014-datasync-dcreate-dchange-efficyimportrecord</guid>
<pubDate>Fri, 11 Dec 2015 10:48:37 +0000</pubDate>
</item>
<item>
<title>Executing sql update statement to linked server</title>
<link>https://overflow.efficy.io/?qa=1003/executing-sql-update-statement-to-linked-server</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;If you would ever need to update data that you can access through a linked server in sql server.&lt;/p&gt;

&lt;p&gt;My example, I have a linked server over odbc to an other database.&lt;br&gt;
After importing the data I have to mark the data as imported.&lt;/p&gt;

&lt;p&gt;I tried several solutions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Database.ExecSQL in which I provided in the sql the full path to the linked server&lt;/li&gt;
&lt;li&gt;Database.ExecSQL with the OPENQUERY operator&lt;/li&gt;
&lt;li&gt;Executing a stored procedure which would update the values&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of them was working.&lt;/p&gt;

&lt;p&gt;As last option I used the Database.ExecuteODBCQuery&lt;/p&gt;

&lt;p&gt;This one was working but it is important to include this function in a try catch statement as it will always throw an error as it is expecting a dataset back.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;ExecuteODBCQuery(var QueryHandle: integer; ContextHandle:&lt;br&gt;
  TContextHandle; Connection, SQL: string; ForceRefresh, GetAllRecords:&lt;br&gt;
  boolean; StoreID: integer): TDataSet&lt;br&gt;
  More information on this function can be found in EDN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Code example on how to use the function:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    function executeOdbcQuery(sql, storeId, OdbcConnectionString){
  var QueryHandle = 1;
  var ODBCContext = Database.OpenTemporaryContext;
  try {
    if(sql.indexOf('select') === -1){
      Database.ExecuteODBCQuery(QueryHandle, ODBCContext, OdbcConnectionString, sql, false, false, storeId);
    }else{
      var ds = Database.ExecuteODBCQuery(QueryHandle, ODBCContext, OdbcConnectionString, sql, false, false, storeId);
      return ds;
    }
  }catch(ex){
    database.log(ex.message);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Calling the function:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var sql = &quot;insert update query here&quot;;
    OdbcConnectionString=INSERTODBCCONNECTIONSTRING

 executeOdbcQuery(sql,4,OdbcConnectionString)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I hope this helps someone in the future.&lt;/p&gt;

&lt;p&gt;Kind regards,&lt;/p&gt;

&lt;p&gt;Brosens Tom&lt;/p&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=1003/executing-sql-update-statement-to-linked-server</guid>
<pubDate>Wed, 09 Dec 2015 13:31:48 +0000</pubDate>
</item>
<item>
<title>Upload users from Excell to Efficy with DataSync</title>
<link>https://overflow.efficy.io/?qa=984/upload-users-from-excell-to-efficy-with-datasync</link>
<description>&lt;p&gt;Here is a script to import users from an Excel file to an Efficy database.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;All users are set with the same password and added to the corresponding group&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    var k_user = getLastKUser();
    function EfficyImportRecord(DataStore) {
    var sql_contactexist = &quot;select * from acc_accounts where usercode like '&quot;+ DataStore.AsString('USERCODE') + &quot;'&quot;
    var dsExist = ExecuteQuery(sql_contactexist, '');
    var role = 0;
    switch(DataStore.AsString('K_ROLE')){

        case '' : role = 1;break;
        case 'group1' : role = 2;break;
        case 'group2' : role = 3;break;
        case 'group3' : role = 4;break;
        case 'group4' : role = 5;break;
        case 'group5' : role = 6;break;
        case 'group6' : role =  7;break;
        case 'group7' : role = 8;break;
        case 'group8' : role =  9;break;
        case 'group9' : role = 10;break;
        case 'group10' : role = 11;break;
        default : role = 0;break
    }
    if( !dsExist.RecordCount) {
        Database.log('New user : ' + DataStore.AsString('FULLNAME') + ' role : ' + role + ' k_user' + k_user)


        var sql_insertcontact = &quot;INSERT INTO ACC_ACCOUNTS (K_USER, USERCODE,PHONE,FULLNAME, D_CREATE, D_CHANGE, KIND, ISACTIVE, CATEGORY, AUTH_METHOD, UPRIVILEGES, PASSWRD, NACL,EMAIL, K_ROLE, ULIST, D_REPLIC) VALUES ('&quot;+k_user+&quot;','&quot;+DataStore.AsString('USERCODE')+&quot;','&quot;+DataStore.AsString('PHONE')+&quot;','&quot;+DataStore.AsString('FULLNAME') + &quot;', '2015-11-25','2015-11-25','0','1','0','1','2','2663389AF48B52F0A64B5F39BD99A7679682CEDF8F162356ECCD5D29A67B25F9','&quot;+DataStore.AsString('EMAIL')+&quot;','&quot;+role+&quot;','255','2015-11-25')&quot;;

var sql_insertcontacttogroup = &quot;INSERT INTO ACC_GROUPS (K_USER, K_USER2, D_CHANGE, D_REPLIC, K_REPLICUSER) VALUES ('&quot;+ role +&quot;', '&quot;+ k_user +&quot;' , '2015-11-25','2015-11-25','0')&quot;;

        ExecuteQuery(sql_insertcontact, '')
        ExecuteQuery(sql_insertcontacttogroup, '')

        k_user ++

    }     
      return true
    }
    function ExecuteQuery(SQL, QueryParams, StoreID) {
        QueryHandle = 0;
        if(StoreID == &quot;&quot;) StoreID = 0;
        var testSQL = new String(SQL);
        testSQL = testSQL.toUpperCase();
        if(testSQL.indexOf(&quot;SELECT&quot;, 0)&amp;gt;=0){
            var ContextHandle   = Database.OpenTemporaryContext;
            return Database.ExecuteSystemSQLQuery(QueryHandle, ContextHandle, SQL, QueryParams, true, true, StoreID);
        } else {
            Database.ExecSQL(SQL,QueryParams, false);
            return true;
        }
    }
    function getLastKUser(){
          var last = &quot;select max(k_user) as last from acc_accounts where k_user &amp;lt; 99999000&quot;      
          var ds = ExecuteQuery(last, '');          
          return ds.FieldByName('last').AsFloat
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;How to get the crypted password :&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We must use conficy to generate a new password and copy the generated strings (PASSWRD, NACL) in the database for all users using this password*&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Utilities</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=984/upload-users-from-excell-to-efficy-with-datasync</guid>
<pubDate>Mon, 30 Nov 2015 16:13:47 +0000</pubDate>
</item>
<item>
<title>Experience with scheduled import+update from BOB invoices to Efficy</title>
<link>https://overflow.efficy.io/?qa=695/experience-with-scheduled-import-update-from-invoices-efficy</link>
<description>&lt;p&gt;Dear all,&lt;br&gt;
As we prefer not re-inventing the wheel, I ask the following question :&lt;/p&gt;

&lt;p&gt;Has someone already written an import script for a one-way import+update of BOB invoices, with product lines ?  (based on an export from Bob in csv or excel)&lt;/p&gt;

&lt;p&gt;Thanks a lot,&lt;br&gt;
Jappe.&lt;/p&gt;
</description>
<category>Services and Processes</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=695/experience-with-scheduled-import-update-from-invoices-efficy</guid>
<pubDate>Tue, 01 Sep 2015 17:33:59 +0000</pubDate>
</item>
<item>
<title>Message: &quot;You cannot edit the parent of a Recurrent Action Series&quot;</title>
<link>https://overflow.efficy.io/?qa=467/message-you-cannot-edit-the-parent-recurrent-action-series</link>
<description>&lt;p&gt;Hello I need to update actions depending on other.&lt;br&gt;
But I got some errors when user created some recurrent actions in my data sync&lt;/p&gt;

&lt;p&gt;It bug when I try to edit : &lt;em&gt;Database.OpenEditContext(Target, Key)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Any idea to edit an action when it's a series ??&lt;br&gt;
I tried DisableSecurity but without success&lt;br&gt;
Here the error.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Error while creating or modifying destination record
Error while executing Script &quot;EActionSeriesParent&quot;
Message: &quot;You cannot edit the parent of a Recurrent Action Series&quot;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>WorkFlow / Serverscript</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=467/message-you-cannot-edit-the-parent-recurrent-action-series</guid>
<pubDate>Tue, 23 Jun 2015 15:42:38 +0000</pubDate>
</item>
<item>
<title>Can datasynchro proces a XML file as a source file?</title>
<link>https://overflow.efficy.io/?qa=417/can-datasynchro-proces-a-xml-file-as-a-source-file</link>
<description>&lt;p&gt;Is it possible to import a xml file with Datasynchro / Datasynchro remote?&lt;br&gt;
When adding a connection, xml is not in the list.&lt;br&gt;
Also when looking in the ODBC32 there is no driver that can be connected to an XML file.&lt;/p&gt;

&lt;p&gt;Are there any experiance with the import of xml files using datasynchro?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=417/can-datasynchro-proces-a-xml-file-as-a-source-file</guid>
<pubDate>Mon, 01 Jun 2015 05:27:06 +0000</pubDate>
</item>
<item>
<title>Import launched from Interface.</title>
<link>https://overflow.efficy.io/?qa=404/import-launched-from-interface</link>
<description>&lt;p&gt;Does anyone has already made an import launched from the interface ?&lt;/p&gt;

&lt;p&gt;In this case, I need to make it possible to import an Excel file with a fixed layout from the Company Entity to link contacts.&lt;/p&gt;

&lt;p&gt;Has anyone done this before ? And how to do this in Efficy 2014 ?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=404/import-launched-from-interface</guid>
<pubDate>Thu, 28 May 2015 06:48:32 +0000</pubDate>
</item>
<item>
<title>Datasynchro: how to get d_created to contain de data from the import file</title>
<link>https://overflow.efficy.io/?qa=389/datasynchro-how-get-dcreated-contain-data-from-import-file</link>
<description>&lt;p&gt;I noticed that every time I have to build a Datasynchro import, that contains a d_create timestamp from a source file/database Efficy inserts the datetime for the efficy record creation and does not use the provide datetime from the source.&lt;/p&gt;

&lt;p&gt;I now have to do a update of the d_create trough an sql update statement.&lt;br&gt;
For onetime imports thats not a big deal. For daily import this is an issue.&lt;/p&gt;

&lt;p&gt;Is there a simple datasynchro best practice to resolve this issue to get the d_create right within the first import?&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=389/datasynchro-how-get-dcreated-contain-data-from-import-file</guid>
<pubDate>Mon, 11 May 2015 12:19:43 +0000</pubDate>
</item>
<item>
<title>Maximum log size Datasynchro</title>
<link>https://overflow.efficy.io/?qa=142/maximum-log-size-datasynchro</link>
<description>&lt;p&gt;Hi all,&lt;/p&gt;

&lt;p&gt;Is there a maximum amount of data that can be logged for a datasynchro?&lt;/p&gt;

&lt;p&gt;Are the oldest logs deleted when this limit is reached (if there is one)?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Efficy Developers</category>
<guid isPermaLink="true">https://overflow.efficy.io/?qa=142/maximum-log-size-datasynchro</guid>
<pubDate>Tue, 13 Jan 2015 11:00:16 +0000</pubDate>
</item>
</channel>
</rss>