My First SQLite Project

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: My First SQLite Project

Post by Roberto Lopez »

rathinagiri wrote:Oh! Nice. It is a treasure to dig in. :)
I've done for simplicity and speed and I've used in a couple of projects.

It uses direct C calls to access MySql API (not TMySql).

When I left the code, a couple of things should be added yet.

1. Field type detection for automatic conversion (in result recordset).

2. Create a local temporary table to store the recordset, so, it could be accessed as a normal table.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: My First SQLite Project

Post by sudip »

Hello Master Roberto,

The main thing for which I liked VFP for it's embedded SQL. Thank you so much. You made it available to harbour.
1. Field type detection for automatic conversion (in result recordset).

2. Create a local temporary table to store the recordset, so, it could be accessed as a normal table.
Now, if we can add those 2 points. It will be even better. For long time I was looking for temporary table with HMG (as I used it in VFP Cursor). Temporary table creation is already available with Harbour, but I can't create it with HMG Official. So, I am very happy to read your post.

Thank you again.

With best regards.

Sudip
With best regards,
Sudip
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: My First SQLite Project

Post by Roberto Lopez »

sudip wrote:Temporary table creation is already available with Harbour, but I can't create it with HMG Official.
Why not?

I've was thinking in a temporary 'disk-file' standard table.

What do you was thinking?

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
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: My First SQLite Project

Post by Rathinagiri »

Roberto Lopez wrote: It uses direct C calls to access MySql API (not TMySql).
:o

Is it? Fine.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: My First SQLite Project

Post by sudip »

Hello Master Roberto,
Roberto Lopez wrote:
sudip wrote:Temporary table creation is already available with Harbour, but I can't create it with HMG Official.
Why not?

I've was thinking in a temporary 'disk-file' standard table.

What do you was thinking?

Regards,

Roberto.
I was thinking about to use

Code: Select all

hb_dbcreatetemp("curItem", adbf)
I hope this will create a temporary table in memory (like cursor in VFP).

With best regards.

Sudip
With best regards,
Sudip
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: My First SQLite Project

Post by sudip »

Hello Rathi,
rathinagiri wrote:
Roberto Lopez wrote: It uses direct C calls to access MySql API (not TMySql).
:o

Is it? Fine.
Now we should port it to SQLite and PostGreSQL also :)
I feel one of my dreams about HMG is coming true :)
With best regards.
Sudip
With best regards,
Sudip
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: My First SQLite Project

Post by mol »

Hi Sudip!
Fine project. I've never wrote any application with SQL, but, I think that will be future.

What about refreshing table after changing/adding new record?
Whether it is necessary to call GET_DATA function after every change?
What about refreshing in multiuser environment?
Recurring data downloads after defined period?
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: My First SQLite Project

Post by sudip »

mol wrote:Hi Sudip!
Fine project. I've never wrote any application with SQL, but, I think that will be future.

What about refreshing table after changing/adding new record?
Whether it is necessary to call GET_DATA function after every change?
What about refreshing in multiuser environment?
Recurring data downloads after defined period?
Yes, they are omitted :( I must say that those points are very essential. I shall add them later. I am now studying Roberto's code for SQL Layer (in my free time :) ).
Thank you for your comments.
I noticed that your picture has been changed (without sunglass :) )
With best regards.
Sudip
With best regards,
Sudip
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: My First SQLite Project

Post by Roberto Lopez »

rathinagiri wrote:
Roberto Lopez wrote: It uses direct C calls to access MySql API (not TMySql).
:o

Is it? Fine.
Yes.

I've looked at TMySql code and I've found that it has two layers.

The 'class' layer is only a wrapper to access true MySql functions, so I've skipped that layer, since class was not needed to make a simple command based SQL interface.

The idea of use direct SQL commands in the programs come to me from VFP. As Sudip points in VFP the result recordset goes to a 'cursor' (a local temporary table).

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: My First SQLite Project

Post by Roberto Lopez »

sudip wrote:
I was thinking about to use

Code: Select all

hb_dbcreatetemp("curItem", adbf)
I hope this will create a temporary table in memory (like cursor in VFP).
I don't knew that function.

I'll try to research a little...

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply