DBF<-->SQLite Exporter

Utilities like DBU, Make, IDE written in HMG/ used to create HMG based applications

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: DBF->SQLite Exporter

Post by esgici »

rathinagiri wrote:...changed DBF->SQLite Exporter to DBF<-->SQLite Exporter...
Thanks a lot Rathi, it's exactly what I need :D

Best regards

--

Esgici
Viva INTERNATIONAL HMG :D
claudiotedesco
Posts: 132
Joined: Thu Jul 31, 2008 12:05 pm

Re: DBF<-->SQLite Exporter

Post by claudiotedesco »

Hello rathinagiri

Queria saber como debo compilar el sqlite2dbf con la version HMG 3.0.35 ?
Se puede con dicha version?
Muchas Gracias

Claudio

Quizás quisiste decir: Hello ratnagiri Queria saber como debo compilar el sqlite2dbf con la version HMG 3.0.35 ? Se puede con dicha version? Muchas Gracias Claudio
Hello rathinagiri

I wanted to know how to compile the sqlite2dbf HMG version 3.0.35?
You can with this version?
thank you very much

Claudio
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: DBF<-->SQLite Exporter

Post by Rathinagiri »

Hi,

In that case, you have to attach this file also, and delete the references of hmgsqlite in hbc file..

c:\hmg.3.0.39\hmgsql\source\hmgsqlite.prg
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
claudiotedesco
Posts: 132
Joined: Thu Jul 31, 2008 12:05 pm

Re: DBF<-->SQLite Exporter

Post by claudiotedesco »

ok, lo voy a probar
Gracias

Claudio
User avatar
gfilatov
Posts: 1060
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: DBF->SQLite Exporter

Post by gfilatov »

rathinagiri wrote:Hi,

As per Esgici's request, I have changed DBF->SQLite Exporter to DBF<-->SQLite Exporter. :)

Now, a SQLite Table can be exported to DBF. It seems to work fine for me. Kindly let me know if there is any bug/error...

Thank you.
Hi Rathi,

I have a two small corrections in the function export2dbf():

1) retrieve of max field's content length of character field must be rewritten as

Code: Select all

            aTable1 := sql( oDB1, 'select max( length( ' + cFieldName + ' ) ) from ' + c2sql( cSQLTable ) )
2) max lenght of field name of DBF must be restricted to 10 symbols in the following lines

Code: Select all

            for j := 1 to len( aRecord )
               cFieldName := Left( aStruct[ j, 1 ], 10 )  // <-- changed here
               replace &cFieldName with aRecord[ j ]
            next j
Hope that helps :idea:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: DBF<-->SQLite Exporter

Post by Rathinagiri »

Thanks a lot for the corrections Grigory. I have made the corrections.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
bels79
Posts: 37
Joined: Fri Sep 09, 2011 8:01 am
DBs Used: DBF, MySQL

Re: DBF<-->SQLite Exporter

Post by bels79 »

Thanks, I try to compile but can not because there is error


" C:/DOCUME~1/prima/LOCALS~1/Temp/hbmk_cyffzc.dir/main.o:main.c:(.data+0x348): und
efined reference to `HB_FUN_MISCSQL'
C:/DOCUME~1/prima/LOCALS~1/Temp/hbmk_cyffzc.dir/main.o:main.c:(.data+0x3a8): und
efined reference to `HB_FUN_C2SQL'
C:/DOCUME~1/prima/LOCALS~1/Temp/hbmk_cyffzc.dir/main.o:main.c:(.data+0x408): und
efined reference to `HB_FUN_CONNECT2DB'
C:/DOCUME~1/prima/LOCALS~1/Temp/hbmk_cyffzc.dir/sqlite2dbf.o:sqlite2dbf.c:(.data
+0x88): undefined reference to `HB_FUN_CONNECT2DB'
C:/DOCUME~1/prima/LOCALS~1/Temp/hbmk_cyffzc.dir/sqlite2dbf.o:sqlite2dbf.c:(.data
+0xc8): undefined reference to `HB_FUN_SQL'
C:/DOCUME~1/prima/LOCALS~1/Temp/hbmk_cyffzc.dir/sqlite2dbf.o:sqlite2dbf.c:(.data
+0x158): undefined reference to `HB_FUN_C2SQL'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1 "
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: DBF<-->SQLite Exporter

Post by Rathinagiri »

Hi,

Have you included hmgsqlite library while compiling?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
bels79
Posts: 37
Joined: Fri Sep 09, 2011 8:01 am
DBs Used: DBF, MySQL

Re: DBF<-->SQLite Exporter

Post by bels79 »

Thank you, to get the file where?
can you please give instructions

Thank you,
beni
rathinagiri wrote:Hi,

Have you included hmgsqlite library while compiling?
User avatar
IMATECH
Posts: 188
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.

Re: DBF<-->SQLite Exporter

Post by IMATECH »

Hello bels79 !

You just need to edit file: dbf2sqlite.hbp ( can be edited via HMG IDE )


If you dont have "HMGSQL LIB" just download from link below:
viewtopic.php?f=8&t=1562&p=12079&hilit=HmgSql#p12079


dbf2sqlite.hbp - before changes:

Code: Select all


main.prg
sqlite2dbf.prg

dbf2sqlite.hbp - After changes:

Code: Select all


main.prg
sqlite2dbf.prg

#
# libs
#
# 
-lhbsqlit3

#
# .hbc files
#
# 
hbsqlit3.hbc
dbf2sqlite.hbc

M., Ronaldo

By: IMATECH

Imation Tecnologia
Post Reply