start with sqlite

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
dragancesu
Posts: 672
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 21 times
Been thanked: 135 times

start with sqlite

Post by dragancesu » Fri Apr 19, 2019 12:36 pm

It will be a few steps

1. loading dbf into sqlite, step1.zip, compile program imp_gen, select dbf file and create imp<DBFNAME>.prg

2. reading the table structure from the database, step2.zip, just compile sch_imp.prg and structure be in _STRUCT.DBF

3. it's practical to have a table structure in dbf, step3.zip will read _struct.dbf and write _sql_tab.dbf with all description fields from table, just compile sch_stru.prg

The dictionary of data is essential to have to start with the creation of programs for working with tables,

p.s. If someone makes a better program for step 3, please send here

Thank you
Attachments
step3.zip
(1.78 KiB) Downloaded 73 times
step2.zip
(3.35 KiB) Downloaded 62 times
step1.zip
(8.32 KiB) Downloaded 67 times

User avatar
bpd2000
Posts: 1074
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 196 times
Been thanked: 95 times

Post by bpd2000 » Mon Apr 22, 2019 11:51 am

Thank you for sharing
BPD
Convert Dream into Reality through HMG

User avatar
Steed
Posts: 385
Joined: Sat Dec 12, 2009 3:40 pm
Has thanked: 1 time
Been thanked: 2 times

Post by Steed » Fri Apr 26, 2019 8:29 pm

Thanks

User avatar
mustafa
Posts: 829
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Been thanked: 117 times
Contact:

Post by mustafa » Sun May 05, 2019 2:55 pm

Hello friends:

Seeing the magnificent sample that I bring
the dragancesu companion:
viewtopic.php?f=5&t=5989&p=58231&hilit= ... esu#p58231
and the complement in:
viewtopic.php?f=5&t=5994&p=58252#p58252

With the Sample that I am contributing, I do not intend to overcome Master Dragan
Only a small contribution to start in the world of SQLite

I have not managed to update the dbf file when creating a new file
new incorporation of the new file in -> COMBOBOX Combo_1
There are also some mistakes that I have tried to correct on the fly
if the program does not have any DBF file for conversion it is created
ERROR I leave you a sample file "Customer.dbf" to be able
to experience.

*--------------------------- Content ---------------------------------- *

1º DBF «-» SQLite
   Option provided by Master Rathinagiri -> dbf2sqlite.zip
   viewtopic.php?p=20587#p20587
   DBF «-» SQLite Exporter, conversion of the two formats
   with Structura SQLite info in file txt format

2º Create Program
   Option provided by Master Dragan, this option creates a
   PRG file in Folder "SQLite_New_PRG" where the DBF File will be
   the file to compile (imp + filename DBF .prg)
   with this option, the same name db3 file and the file will be created
   with Structura SQLite information in file txt format

3º Create DBF
   This option allows us to create a new DBF file

4º View DBF
   This option allows us to see the contents of the DBF File that
   we have selected in "Choose Database"
5º View SQLite
   this option allows us to see the contents of created files
   in the conversion of formats

   View help in Folder -> \ Help_Tools \ where you will find Help_Tools.pdf
   where in an abbreviated way the different options are explained.

Regards
Mustafa
Attachments
SQlite_Tools.zip
(1.26 MiB) Downloaded 52 times


User avatar
dragancesu
Posts: 672
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 21 times
Been thanked: 135 times

Post by dragancesu » Mon May 06, 2019 2:18 pm

@mustafa thanks for the suggestions
I saw what Rathi did, but I'm always a developer and I have an idea of how to do it, this is the first step, loading DBF data into the SQLite database

added: loading logical field, select database

ask: which you use the SQLite manager?
Attachments
step1.zip
(4.09 KiB) Downloaded 41 times

User avatar
jairpinho
Posts: 314
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Has thanked: 3 times
Been thanked: 10 times
Contact:

Post by jairpinho » Tue May 07, 2019 12:36 am

mustafa wrote:
Sun May 05, 2019 2:55 pm
Hello friends:

Seeing the magnificent sample that I bring
the dragancesu companion:
viewtopic.php?f=5&t=5989&p=58231&hilit= ... esu#p58231
and the complement in:
viewtopic.php?f=5&t=5994&p=58252#p58252

With the Sample that I am contributing, I do not intend to overcome Master Dragan
Only a small contribution to start in the world of SQLite

I have not managed to update the dbf file when creating a new file
new incorporation of the new file in -> COMBOBOX Combo_1
There are also some mistakes that I have tried to correct on the fly
if the program does not have any DBF file for conversion it is created
ERROR I leave you a sample file "Customer.dbf" to be able
to experience.

*--------------------------- Content ---------------------------------- *

1º DBF «-» SQLite
   Option provided by Master Rathinagiri -> dbf2sqlite.zip
   viewtopic.php?p=20587#p20587
   DBF «-» SQLite Exporter, conversion of the two formats
   with Structura SQLite info in file txt format

2º Create Program
   Option provided by Master Dragan, this option creates a
   PRG file in Folder "SQLite_New_PRG" where the DBF File will be
   the file to compile (imp + filename DBF .prg)
   with this option, the same name db3 file and the file will be created
   with Structura SQLite information in file txt format

3º Create DBF
   This option allows us to create a new DBF file

4º View DBF
   This option allows us to see the contents of the DBF File that
   we have selected in "Choose Database"
5º View SQLite
   this option allows us to see the contents of created files
   in the conversion of formats

   View help in Folder -> \ Help_Tools \ where you will find Help_Tools.pdf
   where in an abbreviated way the different options are explained.

Regards
Mustafa

great example works perfect thanks for sharing
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br

User avatar
mustafa
Posts: 829
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Been thanked: 117 times
Contact:

Post by mustafa » Tue May 07, 2019 11:20 am

Dragan
very successful your sample, congratulations
ask: which you use the SQLite manager?
SQLite manager?
I think I understand, what do you mean -> Sql1.prg
copied from the original of Rathinagiri
regards
Mustafa

User avatar
dragancesu
Posts: 672
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 21 times
Been thanked: 135 times

Post by dragancesu » Tue May 07, 2019 12:53 pm


User avatar
mustafa
Posts: 829
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Been thanked: 117 times
Contact:

Post by mustafa » Tue May 07, 2019 4:18 pm

+1

Post Reply