Author | Topic: Copy or Export a table between two DBMs. | |
---|---|---|
César Calvo | Copy or Export a table between two DBMs. on Thu, 10 Nov 2016 10:44:34 +0100 Hello friends. I would need copy a table of Advantage Database Server to PostGreSql with SqlExpress. Does somepeople has an example?. Regards. César. | |
Boris Borzic | Re: Copy or Export a table between two DBMs. on Thu, 10 Nov 2016 16:11:50 +0100 Csar Calvo <ccalvoc@telefonica.net> wrote in news:acb5276$9d44e46$4df6@news.alaska-software.com: > I would need copy a table of Advantage Database Server to PostGreSql > with SqlExpress. > > Does somepeople has an example?. Look at the SQLExpress sample SQLXPP\ACE\SQLSYNC.PRG as a starting point. Best regards, Boris Borzic http://xb2.net http://sqlexpress.net industrial strength Xbase++ development tools | |
César Calvo | Re: Copy or Export a table between two DBMs. on Thu, 10 Nov 2016 19:06:29 +0100 Thanks Boris but I think this example is very complicated to understand. Also I have to do the same with tables that are not ADT. It should be easier if you have two connections, copy a table from one system to another with SqlStatement. Well, I am going to seek if there is a way with ActiveX because if not I have to go record to record and several tables have more than eight hundred thousand records. This will take me a long time while if I copy or doubled, sure to be fast. Regards. César. "Boris Borzic" escribió en el mensaje de noticias:XnsA6BC67B642250SQLExpress@87.106.143.233... César Calvo <ccalvoc@telefonica.net> wrote in news:acb5276$9d44e46$4df6@news.alaska-software.com: > I would need copy a table of Advantage Database Server to PostGreSql > with SqlExpress. > > Does somepeople has an example?. Look at the SQLExpress sample SQLXPP\ACE\SQLSYNC.PRG as a starting point. Best regards, Boris Borzic http://xb2.net http://sqlexpress.net industrial strength Xbase++ development tools | |
Andreas Gehrs-Pahl | Re: Copy or Export a table between two DBMs. on Thu, 10 Nov 2016 16:10:11 -0500 César, >Well, I am going to seek if there is a way with ActiveX because if not I >have to go record to record and several tables have more than eight hundred >thousand records. There probably is no other way than to copy record by record. ADS and PGS have completely different internal formats, so you need to load the data through SQL. If you use ODBC, API calls, or ActiveX will probably not make much of a difference in this case. Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [F]: https://www.facebook.com/AbsoluteSoftwareLLC | |
César Calvo | Re: Copy or Export a table between two DBMs. on Thu, 10 Nov 2016 22:13:34 +0100 Thanks Andreas. Maybe Boris could help me and say the way for get it with other example. Regards. César. "Andreas Gehrs-Pahl" escribió en el mensaje de noticias:y1ee50q3u3y9$.11cut2dxz09u8.dlg@40tude.net... César, >Well, I am going to seek if there is a way with ActiveX because if not I >have to go record to record and several tables have more than eight hundred >thousand records. There probably is no other way than to copy record by record. ADS and PGS have completely different internal formats, so you need to load the data through SQL. If you use ODBC, API calls, or ActiveX will probably not make much of a difference in this case. Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [F]: https://www.facebook.com/AbsoluteSoftwareLLC | |
Matej Jurac | Re: Copy or Export a table between two DBMs. on Fri, 11 Nov 2016 07:47:56 +0100 To say it simple - There is no magic command to do it. You will have to go by more steps: - read ADS.table structure on input - create PG.table structure on destination, ALTER it to create PRIMARY, secondary keys (at least) and foreign keys - read data from input ADS.table, write it to PG.target table ; take great care on data codepages ! If interactive: For Microsoft SQL products there are import tools in SQL Management Studio called "Sql server Import export wizard" For MySql there is similliar tool in Mysql Workbench For Postgre there is section: https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#DBase_II.2C_III.2C_IV.2B_.2F_DBF_Format César Calvo je 10.11.2016 ob 22:13 napisal: > Thanks Andreas. > > Maybe Boris could help me and say the way for get it with other example. > > Regards. > César. > > "Andreas Gehrs-Pahl" escribió en el mensaje de > noticias:y1ee50q3u3y9$.11cut2dxz09u8.dlg@40tude.net... > > César, > >> Well, I am going to seek if there is a way with ActiveX because if not I >> have to go record to record and several tables have more than eight >> hundred >> thousand records. > > There probably is no other way than to copy record by record. ADS and PGS > have completely different internal formats, so you need to load the data > through SQL. > > If you use ODBC, API calls, or ActiveX will probably not make much of a > difference in this case. > > Andreas | |
César Calvo | Re: Copy or Export a table between two DBMs. on Fri, 11 Nov 2016 16:45:26 +0100 Great dear Matej. When I can it will be checked with several options. Thanks. César. "Matej Jurac" escribió en el mensaje de noticias:2b4838ca$6bb9e099$273e9@news.alaska-software.com... To say it simple - There is no magic command to do it. You will have to go by more steps: - read ADS.table structure on input - create PG.table structure on destination, ALTER it to create PRIMARY, secondary keys (at least) and foreign keys - read data from input ADS.table, write it to PG.target table ; take great care on data codepages ! If interactive: For Microsoft SQL products there are import tools in SQL Management Studio called "Sql server Import export wizard" For MySql there is similliar tool in Mysql Workbench For Postgre there is section: https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#DBase_II.2C_III.2C_IV.2B_.2F_DBF_Format César Calvo je 10.11.2016 ob 22:13 napisal: > Thanks Andreas. > > Maybe Boris could help me and say the way for get it with other example. > > Regards. > César. > > "Andreas Gehrs-Pahl" escribió en el mensaje de > noticias:y1ee50q3u3y9$.11cut2dxz09u8.dlg@40tude.net... > > César, > >> Well, I am going to seek if there is a way with ActiveX because if not I >> have to go record to record and several tables have more than eight >> hundred >> thousand records. > > There probably is no other way than to copy record by record. ADS and PGS > have completely different internal formats, so you need to load the data > through SQL. > > If you use ODBC, API calls, or ActiveX will probably not make much of a > difference in this case. > > Andreas |