Page 2 of 5

Re: DBF->SQLite Exporter

Posted: Wed Oct 12, 2011 9:00 am
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

Re: DBF<-->SQLite Exporter

Posted: Wed Oct 12, 2011 11:39 am
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

Re: DBF<-->SQLite Exporter

Posted: Wed Oct 12, 2011 11:57 am
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

Re: DBF<-->SQLite Exporter

Posted: Wed Oct 12, 2011 3:59 pm
by claudiotedesco
ok, lo voy a probar
Gracias

Claudio

Re: DBF->SQLite Exporter

Posted: Thu Oct 20, 2011 12:06 pm
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:

Re: DBF<-->SQLite Exporter

Posted: Thu Oct 20, 2011 12:33 pm
by Rathinagiri
Thanks a lot for the corrections Grigory. I have made the corrections.

Re: DBF<-->SQLite Exporter

Posted: Wed Jun 20, 2012 8:19 am
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 "

Re: DBF<-->SQLite Exporter

Posted: Wed Jun 20, 2012 9:40 am
by Rathinagiri
Hi,

Have you included hmgsqlite library while compiling?

Re: DBF<-->SQLite Exporter

Posted: Thu Jun 21, 2012 2:44 am
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?

Re: DBF<-->SQLite Exporter

Posted: Thu Jun 21, 2012 4:55 am
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