SolverTech.Tasha.PlugIns.IO.SolutionDatabaseExporter
A module that exports values from the solution using an SQL command.
It exports only Routes marked for Export (Marked Export).
Before that it runs SaveSolutionToScenarioCommand
Example for Distrimo. Update DBF database.
<?xml version="1.0" encoding="utf-8"?> <SolverTechTashaPlugInsIOSolutionDatabaseExporterSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ExporterCaption>Distrimo Export do databáze</ExporterCaption> <DbProvider>odbc</DbProvider> <ConnectionString>DSN=TASHA</ConnectionString> <ServedCommandText>UPDATE dba.hl_pohyb SET stav=1 where dba.hl_pohyb.cis_dokl=? and dba.hl_pohyb.stav=6</ServedCommandText> <NotServedCommandText>UPDATE dba.hl_pohyb SET stav=6 where dba.hl_pohyb.cis_dokl=?</NotServedCommandText> <RunOnEntityType>order</RunOnEntityType> <ReflectedParameters> <string>otaznikovyparametr;id_objednavky</string> </ReflectedParameters>
</SolverTechTashaPlugInsIOSolutionDatabaseExporterSettings>
Example for export to SQL database - new version of exporter:
<?xml version="1.0" encoding="utf-8"?> <SolverTechTashaPlugInsIOSolutionDatabaseExporterSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ExporterCaption>Database Exporter</ExporterCaption> <DbProvider>mssql</DbProvider> <ConnectionString>SERVER = localhost\sqlexpress; DATABASE = tasha_581;Integrated Security=SSPI;</ConnectionString> <ServedCommandText> <![CDATA[ INSERT INTO [dbo].[export] (zbozi ,cislo_objednavky ,nazev ,adresa ,vozidlo ,ridic ,eta ,poradi) VALUES (@zbozi ,@objednavka ,@nazev ,@adresa ,@vozidlo ,@ridic ,@eta ,@poradi)
]]>
</ServedCommandText> <NotServedCommandText></NotServedCommandText> <RunOnEntityType>job</RunOnEntityType> <ReflectedParameters> <string>@zbozi;zbozist</string> <string>@objednavka;identifier</string> <string>@nazev;stops[1].location.name</string> <string>@adresa;stops[1].location.address</string> <string>@vozidlo;saved_vehicle.identifier</string> <string>@ridic;saved_vehicle.driver.identifier</string> <string>@eta;saved_eta</string> <string>@poradi;saved_order</string> </ReflectedParameters>
</SolverTechTashaPlugInsIOSolutionDatabaseExporterSettings>
</ReflectedParameters>
</SolverTechTashaPlugInsIOSolutionDatabaseExporterSettings>
Known entities, etc.:
saved_route
saved_vehicle
saved_routestop
saved_eta
saved_leg
saved_order
saved_site
saved_solution
saved_starfishcost