Jump to content

Update database using ODBC, XML and Schedule


riddwan

Recommended Posts

I created a schedule that imports table data from MSaccess database to MySql database a XML file is automatically created. Now in the XML file the function updates data by automatically recreating the table. Is there any way to update the new data by not deleting the table?here is my code:

  <?xml version="1.0" encoding="UTF-8" ?>- <job version="8.1">- <odbcimport>- <source>  <host>localhost</host>  <user>root</user>  <pwd>admin</pwd>  <port>3306</port>  <ssl>0</ssl>  <sslauth>0</sslauth>  <clientkey />  <clientcert />  <cacert />  <cipher />  <charset />  <database>main_data</database>  </source>- <dsn type="access">  <name>E:\Main_Data.mdb</name>  <user>admin</user>  <pwd>pass</pwd>  </dsn>- <import source="query">  <query>select * from "AC_Group"</query>  <table>ac_group</table>  </import>  <export target="data" />- <tables all="no">- <table source="Result" target="ac_group" type="MyISAM" index="no" foreignkey="no">  <ddl onconflict="recreate" />  <dml import="yes" onconflict="update" />- <triggers>  <delete>no</delete>  </triggers>- <columns>- <column>  <source>ID</source>  <target>id</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>yes</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Mach_No</source>  <target>mach_no</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Dept_Name</source>  <target>dept_name</target>  <type>varchar</type>  <length>255</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Group_No</source>  <target>group_no</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Group_Say</source>  <target>group_say</target>  <type>varchar</type>  <length>200</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Time_1</source>  <target>time_1</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Time_2</source>  <target>time_2</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Time_3</source>  <target>time_3</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Time_4</source>  <target>time_4</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>- <column>  <source>Time_5</source>  <target>time_5</target>  <type>int</type>  <length>10</length>  <default />  <primary>no</primary>  <binary>no</binary>  <notnull>no</notnull>  <unsigned>no</unsigned>  <autoincr>no</autoincr>  <zerofill>no</zerofill>  </column>  </columns>  </table>  </tables>  <abortonerror>no</abortonerror>  <sendreport send="no" />  </odbcimport>  </job>

Edited by riddwan
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...