DSQLite

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: DSQLite (Topic being moderated)

Post by esgici »

Hi Pablo

Thanks to your valuable participation to HMG and Forum :)

Definitely our forum has been an will be better with your works.

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: DSQLite (Topic being moderated)

Post by srvet_claudio »

Amarante wrote:DSQLite

Português:
Dizem que na informática nada se cria, tudo se copia, sendo assim, inspirando-me em idéias de S. Rathinagiri, Dr Claudio Soto e outros comecei este Projeto nasceu da necessidade de gerar pequenos programas de cadastro utilizando sql onde automaticamente fossem geradas os formulários e grids.
Como Banco de Dados utilizei o SQLite para mais fácil desenvolvimento, mas também já tenho outro teste funcionando em MySQL.
Mesmo inacabado ele já traz uma idéia das múltiplas possibilidades para facilitar o trabalho do programador.
Funciona assim:
1- Descrevemos em um arquivo a estrutura do banco de dados: tabelas, campos indices, chaves primárias, bem como o comportamento de cada campo.
2- As rotinas Rot_Form e Rot_Grid nos dão acesso a esse banco de dados, criando automaticamente os grids e formulários para entrada de dados
Se alguém achar útil gostaria da ajuda para gerar as chaves estrangeiras e a rotina de impressão, bem como a interligação de tabelas.
Também falta tornar a estrutura mais amigável e mais profissional.
Anexei um arquivo com um pequeno sistema de cadastro.
É necessário utilizar HMG 3.1.4 ou HMG 3.1.5 (test) com a alteração indicada por Pablo César em
http://hmgforum.com/viewtopic.php?p=28108#p28108
Este trabalho foi escrito inicialmente com comentários e variáveis em português, tentei traduzir para o inglês utilizando o google translate, desculpem se não ficou muito bom.
Espero que este primeiro trabalho para o forum seja de alguma utilidade.
Críticas são bem vindas.

Google Translate:
They say the computer nothing is created, everything is copied, so inspiring me ideas of S. Rathinagiri, Dr Claudio Soto and others started this project was born from the need to create small programs using sql where records were automatically generated forms and grids.
As I used the Database SQLite for easier development, but now I have another test running on MySQL.
Even unfinished it already has an idea of the many possibilities to facilitate the work of the programmer.
It works like this:
1 - Describe in a file structure of the database: tables, fields, indexes, primary keys, and the behavior of each field.
2 - Routines Rot_Form and Rot_Grid give us access to that database, by automatically creating grids and forms for data entry
If anyone would like help find it useful to generate foreign keys and printing routine, as well as the interconnection of tables.
Also missing to make the structure more friendly and more professional.
I have attached a file with a small registration system.
You must use HMG 3.1.4 or HMG 3.1.5 (test) with the changes indicated by Pablo Caesar in
http://hmgforum.com/viewtopic.php?p=28108#p28108
This work was originally written with comments and variables in Portuguese, I tried to translate into English using google translate, sorry it was not very good.
I hope this first work for the forum is of some use.
Reviews are welcome.
Wow, very nice !!!
Your app looks awesome, congratulations :D
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

DSQLite (Topic being moderated)

Post by Pablo César »

Thank you, Esgici. Friend with you too, the forum is enriched! Better say: with the participation of all we all go out winning.

Image
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: DSQLite (Topic being moderated)

Post by Amarante »

srvet_claudio wrote:
Amarante wrote:DSQLite
Wow, very nice !!!
Your app looks awesome, congratulations :D
Portuguese:
Um elogio de um guru! Muito Obrigado :P
Espero ter sua ajuda e de outros amigos para solucionar pequenos problemas nesse projeto, em breve tentarei explanar minhas necessidades através de imagens para melhor compreensão. ;)
Acredito este tipo de projeto poderá ajudar a todos a agilizar o desenvolvimento de seus projetos. O principal é facilitar o cansativo trabalho de criação e manipulação de dados (desenho de forms, relatórios, menus) e nos deixando livres para usar nossas mentes em outros trabalhos. :geek:

Google Translate:
A compliment from a guru! :o Thank you :P
I hope to have your help and other friends to solve minor problems this project will soon try to explain my needs through images for better understanding. ;)
I believe this kind of design can all help to streamline the development of their projects. The key is to ease the tiring job creation and manipulation of data (design forms, reports, menus) and leaving us free to use our minds in other works. :geek:
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: DSQLite (Topic being moderated)

Post by Pablo César »

Amarante wrote:... will soon try to explain my needs through images for better understanding. ;)
Yes Amarante, please post you doubts and news and you can also write in your native language too, but make it in both languages (Portuguese and English) and I will always support you for better understanding. :)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: DSQLite (Topic being moderated)

Post by Amarante »

Português:
Vou tentar explicar as melhorias que gostaria de fazer neste projeto.
O exemplo que enviei sugere um cadastro de idosos e as atividades que os mesmos executam em um clube, temos as tabelas:
Associate - cadastro dos associados
Activity_Table - tabela com os as atividades
User - usuários e senhas (sem criptografia)

Precisamos de uma nova tabela:
Activity_Register - registros das atividades, ou seja uma ligação entre as tabelas Associate e Activity_Table. Neste sentido teremos uma chave estrangeira fazendo a ligação destas tabelas.
A idéia é que quando estivessemos em um formulário da tabela Associates fosse possível acessar um novo formulário para o cadastro da Activity_Register.
Veja nas imagens em anexo as formas que imagino possíveis:
1- Cadastro (inclusão, alteração, exclusão)
2- Por seleção baseando-se nos dados da tabela Activity_Table (um grid com check box)
Outra melhoria essencial seria a impressão, que automaticamente montaria os relatórios, ou melhor, um gerador de relatórios (como o report write), para que o usuário montasse os relatórios conforme sua necessidade, escolhendo campos e tabelas cruzadas. :shock: :? 8-) :idea:
Desculpe se estou sendo um tanto sonhador, mas com certeza teriamos um produto bastante útil. Espero que existam mais sonhadores (ou loucos) como eu para melhorar esta traquitana, sim, porque por enquanto, do jeito que está, parece mais um Frankenstein. :lol:
Lembrando que o uso de SQLite é opcional, já que as adaptações para outro banco de dados são simples de fazer. :!:

Google Translator:
I'll try to explain the improvements that would make this project.
The example I sent suggests a register of seniors and the activities that they perform at a club, we have the tables:
Associate - Register of members
Activity_Table - table with activities
User - user and password (unencrypted)

We need a new table:
Activity_Register - records of activities, ie a link between the tables Associate and Activity_Table. In this sense we have a foreign key linking these tables.
The idea is that when we were in a table form Associates was able to access a new form for the registration of Activity_Register.
See the images attached to imagine possible ways:
1 - Register (inclusion, change, delete)
2 - For selection based on data in table Activity_Table (one grid with check box)
Another major improvement would be to print, which automatically mounts the reports, or better, a report generator (as the report write), so that the user to mount the reports as needed, choosing fields and crosstabs. :shock: :? 8-) :idea:
Sorry if I'm being a bit dreamy, but surely'd have a product useful. I hope there are more dreamers (or crazy) like me to improve this Gadgety, yes, because for now, the way it is, more like a Frankenstein. :lol:
Recalling that the use of SQLite is optional, since the adaptations to another database are simple to make. :!:
Attachments
Tela_01.jpg
Tela_01.jpg (122.65 KiB) Viewed 10370 times
Tela_02.jpg
Tela_02.jpg (107.89 KiB) Viewed 10370 times
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: DSQLite (Topic being moderated)

Post by esgici »

Amarante wrote: ...
Sorry if I'm being a bit dreamy,...
Don't give up your dreams ( A quote from our maestro Roberto )

Nobody can make anything, without first dreamed ;)

In other hand, a computer software never ends; simply people begin use it in a phase.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: DSQLite

Post by mustafa »

Hola amigo Amarante:

Felicidades por tu programa, es muy interesante el tema SQLite.
Solo quiero indicar que en la Ventana de Password, el usuario puede
anular dicha Ventana pulsando Alt+F4
En el fichero ----> Login.prg le he añadido:

ON KEY ALT+F4 ACTION MsgStop( 'Alt+F4 - Not Allowed', 'Atención !!!')

Para que no se pueda cancelar la Ventana:

****************************************************************************
FUNCTION Rot_Login()
****************************************************************************
DEFINE WINDOW frm_Login ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 300 ;
TITLE _NameSystem_ ;
ICON _Icon_ ;
MODAL ;
NOAUTORELEASE ;
NOSIZE ;
NOSYSMENU

ON KEY ALT+F4 ACTION MsgStop( 'Alt+F4 - Not Allowed', ' Attention !!!')

****************************************************************************
FUNCTION Block_Program()
****************************************************************************
DEFINE WINDOW Frm_Block ;
AT 000, 000 ;
WIDTH 400 ;
HEIGHT 250 ;
TITLE _NameSystem_ ;
ICON _Icon_ ;
MODAL ;
BACKCOLOR _Black_ ;
NOSIZE ;
NOSYSMENU

ON KEY ALT+F4 ACTION MsgStop( 'Alt+F4 - Not Allowed', ' Attention !!!')

También probé con ---- > ON INTERACTIVECLOSE {||.F.}
Pero en ventana de Password no me deja confirmar el Botón de "Ok"
con ------- > ON KEY ALT+F4 ACTION MsgStop( 'Alt+F4 - Not Allowed', ' Attention !!!')
parece que funciona y no deja cancelar las Ventanas

Saludos


*----------------------------------------------------------------------------------*

Translator Google


Hello friend Amarante:

Congratulations on your show, it is very interesting topic SQLite.
I just want to indicate that in the Password window,
the user canoverride any window by pressing Alt + F4
In the file ----> Login.prg I've added:

ON KEY ACTION MsgStop ALT + F4 ('Alt + F4 - Not Allowed', 'Attention!')

To not be able to cancel the Window:


****************************************************************************
FUNCTION Rot_Login()
****************************************************************************
DEFINE WINDOW frm_Login ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 300 ;
TITLE _NameSystem_ ;
ICON _Icon_ ;
MODAL ;
NOAUTORELEASE ;
NOSIZE ;
NOSYSMENU

ON KEY ALT+F4 ACTION MsgStop( 'Alt+F4 - Not Allowed', ' Attention !!!')

****************************************************************************
FUNCTION Block_Program()
****************************************************************************
DEFINE WINDOW Frm_Block ;
AT 000, 000 ;
WIDTH 400 ;
HEIGHT 250 ;
TITLE _NameSystem_ ;
ICON _Icon_ ;
MODAL ;
BACKCOLOR _Black_ ;
NOSIZE ;
NOSYSMENU

ON KEY ALT+F4 ACTION MsgStop( 'Alt+F4 - Not Allowed', ' Attention !!!')

*----------------------------------------------------------------------------------------*

Also tried with ----> ON INTERACTIVECLOSE {| |. F.}
But Password window will not let me confirm the button "Ok"
with -------> ON KEY ACTION MsgStop ALT + F4 ('Alt + F4 - Not Allowed', 'Attention!')
It seems to work and does not leave windows cancel

Regards

Mustafa
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: DSQLite

Post by Amarante »

Português:
Prezado mustafa, obrigado por seu interesse.
Como o objetivo principal era a estrutura DSqlite e não a aplicação eu não havia percebido essa falha.
Segue em anexo as alterações feitas e algumas melhorias.
No final de semana, se não houver imprevistos, postarei a versão DMySQL que tem a mesma idéia, ou seja, facilitar a criação e mantenção de base de dados automaticamente, só que agora também para MySql e no futuro para qualquer base de dados.
A Idéia principal é a não necessidade de desenhos de formulários ou grids, agilizando o desenvolvimento de aplicações.
Uma das características interessantes é a criação do campo Virtual, útil para eumulação de dados.
Estou tentando criar um ambiente mais amigável para o uso dessas rotinas.
Falta fazer com que seja possível a interação entre tabelas, para entrada de dados e validações, bem como uma rotina de impressão que seja automática ou definida pelo usuário.
Continua o convite a todos para um auxilio em melhorias e ajustes nessas rotinas.
Domingo no Brasil comemoramos o dia dos pais, então desejo a todos os pais e futuros pais muitas felicidades. :D

Google Translate:
Dear Mustafa, thanks for your interest.
As the main objective was to structure DSqlite not the application I had not noticed this flaw.
Attached changes and some improvements.
Over the weekend, if no unforeseen, DMySQL post the version that has the same idea, namely to facilitate the creation and maintainer of the database automatically, but now also for MySql and in the future to any database.
The main idea is to not need to design forms or grids, streamlining application development.
One of the interesting features is the creation of the virtual field, useful for eumulação data.
I'm trying to create a more friendly environment for the use of these routines.
Lack make it possible interactions between tables, data entry and validation, as well as a printing routine that is automatic or user-defined.
Continues the invitation to all for assistance in improvements and adjustments in these routines.
Sunday in Brazil celebrate Father's Day, so I wish all parents and future parents much happiness. :D
Attachments
DSQLite.rar
(2.17 MiB) Downloaded 447 times
User avatar
Amarante
Posts: 182
Joined: Fri Apr 27, 2012 9:44 pm
DBs Used: DBF, MySQL, MariaDB, SQLite, PostgreSQL
Location: Araruama-RJ, Brazil

Re: DSQLite

Post by Amarante »

Boas Novas, Testado com sucesso rodando sob Wine no Linux Mint com SQLite e MySQL. :P

---

Good News, Tested successfully running under Wine in Linux Mint with SQLite and MySQL. :P
Attachments
Linux_Mint.png
Linux_Mint.png (426.98 KiB) Viewed 10288 times
Post Reply