start with sqlite

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

start with sqlite

Post by dragancesu »

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 337 times
step2.zip
(3.35 KiB) Downloaded 313 times
step1.zip
(8.32 KiB) Downloaded 314 times
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: start with sqlite

Post by bpd2000 »

Thank you for sharing
BPD
Convert Dream into Reality through HMG
User avatar
Steed
Posts: 427
Joined: Sat Dec 12, 2009 3:40 pm

Re: start with sqlite

Post by Steed »

Thanks
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: start with sqlite

Post by mustafa »

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 301 times
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: start with sqlite

Post by dragancesu »

@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 260 times
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: start with sqlite

Post by jairpinho »

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: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: start with sqlite

Post by mustafa »

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: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: start with sqlite

Post by dragancesu »

User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: start with sqlite

Post by mustafa »

+1
Post Reply