Jump to content
Sign in to follow this  
riddwan

Update database using ODBC, XML and Schedule

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...