Sqlite encrypted database

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
mustafa
Posts: 677
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 74 times

Sqlite encrypted database

Post by mustafa » Fri Jun 10, 2016 1:48 pm

Hola amigos:
Les dejo una nueva entrega
Experimentando con Database Sqlite:
Novedades:
La Database está en Boton Empleados
en Password podemos ver Username y Password
la primera entrada del Password es "ADMIN" y
"ADMIN" si se olvidan borren el fichero
"xControl.mem" y se genera uno nuevo Fichero
"xControl.mem" y podran entrar de nuevo.

En Altas de la Base de Datos y Cambios se ha incorporado
un Nuevo Boton que nos permite elegir la foto de la Nueva
Ficha o hacer un cambio tambien si sabemos en nº de Foto
se puede hacer manualmente desde nº de Photo.
Podemos hacer busqueda por Código o por Nombre o mediante
Sort By dejar la Base de datos organizada por Código o por
Nombre. esto es interesante si queremos sacar un listado
de la Base de datos que podemos hacer de dos formas.
Printer o File Pdf.
La Primera saca un listado ordenado por campo elejido
y la segunda opción genera automatico un fichero Pdf
que se deposita en Carpeta -> Listado_Pdf
Cuando cerramos la aplicación se encripta la Base de Datos
creandose el Fichero->nombre1.sqlite.
No puedo conseguir el borrado total del Original ->nombre.sqlite
una vez cerrada la aplicación para que no pueda copiarse.

He provado diferentes metodos, que basandome en las enseñanzas del
Maestro Rathinagiri en los Pos publicados.

https://groups.google.com/forum/#!topic ... lnX98avwbA
viewtopic.php?f=5&t=2269

He encontrado una solución que no es muy academíca pero parece
que parcialmente cumple mi objetivo que es impedir que se vea el
contenido del Fichero "nombre.sqlite".
La solución es aplicar la sentencia -> sqlite3_exec(dbo,"VACUUM")
que deja toda la base de datos vacia de contenido.

Espero que el sample les pueda interesar y si algun compañero puede
indicarme como poder cerrar la base de datos y luego hacer
Ferase( "nombre.sqlite" )
Con -> hb_gcall( .T. ) no consigo que se borre la base dedatos.
Siguel el hilo abierto sin solución
viewtopic.php?f=5&t=2269&start=20

Saludos.
Mustafa
*-----------------------------------Google ------------------------------------*
Hello friends:
I leave a new delivery
Experimenting with Sqlite Database:
What's New:
The Database is in Button Employees
we can see in Password Username and Password
the first entry of the Password is "ADMIN" and
"ADMIN" if they forget to delete the file
"XControl.mem" and generates a new file
"XControl.mem" and be able to enter again.

In High of Database and Change has been incorporated
A new button that lets you choose the photo of the New
Record or make a change too if we know number Photo
It can be done manually from number Photo.
We can search for Code or by Name or by
Sort By leaving Database organized by Code or
Name. this is interesting if we make a list
the database we can do in two ways.
Pdf Printer or File.
First pulls out a list sorted by field Elected
and the second automatic option generates a PDF file
deposited on Folder -> Listado_Pdf
When we close the application encrypts the Database
creating the File-> nombre1.sqlite.
I can not get reset the Original -> nombre.sqlite
once the application so that it can not be copied closed.

I have proven different methods, based on the teachings of
Master Rathinagiri published in Pos.
 
https://groups.google.com/forum/#!topic ... lnX98avwbA
viewtopic.php?f=5&t=2269

I have found a solution that is not very academic but it seems
partially fulfilled my goal which is to prevent you see the
File content "nombre.sqlite".
The solution is to implement the judgment -> sqlite3_exec(dbo,"VACUUM")

I hope that the sample may be interested and if any partner can
show me how to close the database and then make
FERASE ( "nombre.sqlite")
With -> hb_gcall (.T.) I can not get the base dedatos deleted.
Follow the thread open unsolvable
viewtopic.php?f=5&t=2269&start=20

Greetings.
Mustafa
Attachments
Sqlite_Sample.zip
(2.73 MiB) Downloaded 225 times
screenshot2.jpg
screenshot2.jpg (189.91 KiB) Viewed 3152 times
Last edited by mustafa on Fri Jun 10, 2016 6:15 pm, edited 2 times in total.

User avatar
bpd2000
Posts: 1024
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 165 times
Been thanked: 72 times

Post by bpd2000 » Fri Jun 10, 2016 1:50 pm

Nice creation
Thank you Mustafa for sharing
BPD
Convert Dream into Reality through HMG

User avatar
tonton2
Posts: 254
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Has thanked: 4 times
Been thanked: 7 times
Contact:

Post by tonton2 » Fri Jun 10, 2016 5:42 pm

merci pour le partage
L'Algerie vous salut
Y.TABET

User avatar
serge_girard
Posts: 2091
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 432 times
Been thanked: 92 times
Contact:

Post by serge_girard » Sat Jun 11, 2016 9:00 am

Thanks Mustafa!

Serge

User avatar
bpd2000
Posts: 1024
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 165 times
Been thanked: 72 times

Post by bpd2000 » Sat Jun 11, 2016 10:14 am

Hi Mustafa
This application is multi user ?
BPD
Convert Dream into Reality through HMG

User avatar
mustafa
Posts: 677
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 74 times

Post by mustafa » Sat Jun 11, 2016 11:09 am

Hola bpd2000
En principio solo es de un usuario, pero creo que seria
facil implementarlo a varios usuarios como el Sample
que Presente en el Foro:
viewtopic.php?f=9&t=4787&start=10
"Password_Restricted_Access.zip" que está basado en
Distintos Usuarios y distintas categorias de accesos
segun los colores de los Semaforos.
Saludos
*------------------------- Google---------------------------*
Hello bpd2000
In principle it is only a user, but I think it would be
easily deploy it to multiple users as the Sample
to Present at the Forum:
viewtopic.php?f=9&t=4787&start=10
"Password_Restricted_Access.zip" which is based on
Different users and different categories of access
according to the colors of semaphores.
regards
Mustafa
Attachments
Sqlite_Sample_New.zip
(3.01 MiB) Downloaded 10 times
Last edited by mustafa on Thu Jun 07, 2018 11:41 am, edited 2 times in total.

User avatar
esgici
Posts: 4452
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 332 times
Been thanked: 101 times
Contact:

Post by esgici » Sat Jun 11, 2016 6:45 pm

Thanks amigo Mustafa!

Saludos
Viva INTERNATIONAL HMG :D

User avatar
vientopamperosur
Posts: 25
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Has thanked: 1 time
Contact:

Post by vientopamperosur » Sat May 06, 2017 11:39 am

Buenos días, estoy muy agradecido por esta demo, tengo que realizar un proyecto con sqlite y estaba viéndolo, pero al querer compilarlo con IDE, en hmg oficial, no genera el exe, no entiendo que me falta, podría ayudarme si es tan amable???

User avatar
vientopamperosur
Posts: 25
Joined: Thu Aug 28, 2014 10:13 am
DBs Used: DBF, SQLite, MySQL, MariaDB, PostgreSQL
Location: Buenos Aires
Has thanked: 1 time
Contact:

Post by vientopamperosur » Sat May 06, 2017 11:40 am

Hello, I am very grateful for this demo, I have to do a project with sqlite and I was looking at it, but when I want to compile it with IDE, in official hmg, it does not generate the exe, I do not understand that I am missing, could you help me if it is so kind?

User avatar
serge_girard
Posts: 2091
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 432 times
Been thanked: 92 times
Contact:

Post by serge_girard » Sat May 06, 2017 2:33 pm

What error you get?

Serge

Post Reply