How to close SQLite Connection?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
apais
Posts: 440
Joined: Fri Aug 01, 2008 6:03 pm
DBs Used: DBF
Location: uruguay
Contact:

Re: How to close SQLite Connection?

Post by apais »

Angel Pais
Web Apps consultant/architect/developer.
HW_apache (webserver modules) co-developer.
HbTron (Html GUI for harbour desktop hybrid apps) co-developer.
https://www.hbtron.com
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: How to close SQLite Connection?

Post by Rossine »

Hello Rathinagiri,

SqlLite is lighter than other SQL's ?

What you called attention to it so you use it ?

Any example ?

Best Regards,

Rossine.
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: How to close SQLite Connection?

Post by Rathinagiri »

Definitely Rossine.

Because you need not install any server and the total sql engine is embedded into a small library file which is linked via exe. No runtime libraries required!

It is very much suited for small business applications.

Single database file containing multiple tables, easy to backup.

No worry about sharing and locking.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: How to close SQLite Connection?

Post by Rossine »

Hi Rathinagiri,

OK, I'll study more about it ;)

Many thank´s,

Rossine.
Rossine
Posts: 87
Joined: Thu Jun 30, 2011 10:04 pm

Re: How to close SQLite Connection?

Post by Rossine »

Hi Rathinagiri,

How do I work with SqlLite encrypted ? What function should I use ? Any example ?

Best Regards,

Rossine.
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: How to close SQLite Connection?

Post by Rathinagiri »

Hi,

I think I have successfully ported SQLCipher to Harbour. :) Phew!

My initial test is working fine!

I will share everything tomorrow.

So, my dream of on the fly encryption/decryption of the database with AES encryption has come true!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: How to close SQLite Connection?

Post by danielmaximiliano »

Congratulations for your perseverance Rathinagiri
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: How to close SQLite Connection?

Post by mustafa »

Hola amigos necesito ayuda:
Estoy trabajando en un antiguo Sample de database Sqlite
y se me ocurrio que se podria Encriptar la Base con nuestra sencilla
Herramienta de HMG ENCODE y DECODE super facil y sencilla.
Pero al consultar la Base datos y Cerrarla creo que queda abierta
pues luego de Encode no deja borrar, lo mismo ocurre sin Encode
es decir cuando cierras el Grid no permite hacer Eraser("sample.db3")

En este antiguo post veo que Rathinagiri lo soluciono segun pone aqui
HmgForum y en https://groups.google.com/forum/#!topic ... lnX98avwbA
Para no cansarles he puesto un sample parecido a mi Base de datos
con tres MsgInfo(dbo) el primero sale 0x00AED9A4 siempre sale diferente
pero deduzco que la base de datos esta Open despues aplico
dbo := hdbcSQLTConnection( "sample.db3", .T. )
dbo:Close()
dbo:= Nil

msginfo(dbo) y sale en Blanco se supone que la base de datos está Close
siguiente paso:

hb_gcall( .T. )
msginfo(dbo) y sale en Blanco se supone que la base de datos está Close

y por último:

zx := ferase( "sample.db3" )
msgInfo( str( zx ) )

MsgInfo da como resultado -1 , no 0 como tendría que ser, si la Base se
hubiera Borado con Ferase

No quiero usar SQLCipher
Saludos


*----------------------------- Google-------------------------------*
Hello friends need help:
I'm working on an old Sample of database Sqlite
and I will occurred that could Encrypting Base with our simple
HMG tool ENCODE and DECODE super easy and simple.
But when you query the database and Closing it I think is open
Encode because after erase leaves, so does not Encode
ie when you close the Grid does not allow Eraser ("sample.db3")

In this old post I see that I fix Rathinagiri according gets here
HmgForum and https://groups.google.com/forum/#!topic ... lnX98avwbA
To not to tire I put a similar sample to my Database
three MsgInfo (dbo) the first 0x00AED9A4 always comes out different
but I gather that the database is then applied Open

dbo: = hdbcSQLTConnection ( "sample.db3" .T.)
dbo: Close ()
dbo: = Nil

MsgInfo (dbo) and leaves White is assumed that the database is Close
next step:

hb_gcall (.T.)
MsgInfo (dbo) and leaves White is assumed that the database is Close

and finally:

zx: = FERASE ( "sample.db3")
 MsgInfo (str (zx))

MsgInfo zx -> results -1, not 0 as it should be, if the Base
He would borated with FERASE

I do not want to use SQLCipher

Regards
Mustafa
Attachments
Error_Sqlite.zip
(8.53 KiB) Downloaded 188 times
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: How to close SQLite Connection?

Post by luisvasquezcl »

Estimados, viendo sus comentarios me deja pensando que es una operación muy peligrosa el estar encriptando y desencriptando y que estas operaciones generen distintos archivos que tengan que ser borrados.
Me pregunto si no es más seguro mantener la base de datos encriptada y la operación de lectura y escritura sea desencriptado/encriptado?, de esta forma se mantiene la seguridad de la base de datos y de los datos. Además, se elimina el problema que comenta Mol, ya que la base de datos siempre estará encriptada y su desencriptación se hará en forma interna.
Es mi punto de vista, que opinan?

Dear, seeing your comments let me think it's a very dangerous operation encrypting and decrypting being and that these operations generate different files that have to be deleted.
I wonder if not safer to keep the encrypted database and read and write operation is decrypted / encrypted ?, thus the security of the database and the data is maintained. Moreover, the problem that said Mol as database always be encrypted and decryption will internally deleted.
It is my view, think?
Post Reply