Browsear tablas MySQL
Moderator: Rathinagiri
Browsear tablas MySQL
Hola gente necesito saber si se puede hacer un browse sobre una tabla al viejo estilo como se hace con una dbf.
En un sistema tengo unas .dbf que muestro medienta la clase Browse, a dicho archivo .dbf lo acceden varios usuarios (por lo menos 10) al navegar por dicha tabla los usuarios van viendo los cambios que se van sucediendo en la medida que cada uno accede a los datos y los modifica.
Voy a migrar dicho sistema de .dbf's a una base de datos MySQL o PostGre.
Necesito saber si con una base de datos se pueden hacer browses como hago actualmente sobre las .dbf's
Muchas Gracias
En un sistema tengo unas .dbf que muestro medienta la clase Browse, a dicho archivo .dbf lo acceden varios usuarios (por lo menos 10) al navegar por dicha tabla los usuarios van viendo los cambios que se van sucediendo en la medida que cada uno accede a los datos y los modifica.
Voy a migrar dicho sistema de .dbf's a una base de datos MySQL o PostGre.
Necesito saber si con una base de datos se pueden hacer browses como hago actualmente sobre las .dbf's
Muchas Gracias
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Browsear tablas MySQL
By Google Translator:
However, IMHO, both file oriented and server oriented database management systems are basically different. When you pass on a select query it gives the result as a table. That can be shown in a grid control. But, if you want to modify the data, we have to send another query to the server to effect the modification. SQLRDD wraps this up and lets you do it just like a dbf table.
From google translation:
Creo que hay una llamada SQLRDD RDD para el tratamiento de tablas MySQL como tablas dbf.
Sin embargo, en mi humilde opinión, tanto el archivo y el servidor orientado a los sistemas orientados a la gestión de bases de datos son básicamente diferentes. Cuando se pasa en una consulta de selección que da el resultado como una tabla. Eso puede ser mostrado en un control de cuadrícula. Pero, si desea modificar los datos, tenemos que enviar otra consulta al servidor para efectuar la modificación. SQLRDD envuelve esto y le permite hacerlo al igual que una tabla dbf.
I think there is one RDD called SQLRDD for treating MySQL tables as dbf tables.Hi folks need to know if you can do a browse on a table in the old style as with a dbf.
In a system I have a. Dbf I show the class medienta Browse to the file. Dbf multiple users access it (at least 10) to go through this table, users will see the changes that are happening to the extent that each accesses and modifies data.
I'll migrate the system. Dbf's to a database MySQL or Postgres.
I need to know if a database can do as I do now browses on. Dbf's
However, IMHO, both file oriented and server oriented database management systems are basically different. When you pass on a select query it gives the result as a table. That can be shown in a grid control. But, if you want to modify the data, we have to send another query to the server to effect the modification. SQLRDD wraps this up and lets you do it just like a dbf table.
From google translation:
Creo que hay una llamada SQLRDD RDD para el tratamiento de tablas MySQL como tablas dbf.
Sin embargo, en mi humilde opinión, tanto el archivo y el servidor orientado a los sistemas orientados a la gestión de bases de datos son básicamente diferentes. Cuando se pasa en una consulta de selección que da el resultado como una tabla. Eso puede ser mostrado en un control de cuadrícula. Pero, si desea modificar los datos, tenemos que enviar otra consulta al servidor para efectuar la modificación. SQLRDD envuelve esto y le permite hacerlo al igual que una tabla dbf.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Browsear tablas MySQL
Ok. muchas gracias por el dato lo tendré en cuenta
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Browsear tablas MySQL
Hola Mincho
When that "db servers" didn't born (even only as a term), the old style .dbfs was exists and thousand of multiuser applications based tables in .dbf standards was run
The synopsis of a browse in multiuser environment is quite simple :
- In that environment it's the best way USE'ing tables in shared mode ( except some specific process ).
- Use CURSOR (Current Set Of Record) whenever possible. While building that intermediate (scratch) file, LOCK included records in master table and UNLOCK when browse seance end. With this method, only one user can edit one or set of records, and modifications will come to scene only after editing process completed and saved to their original positions.
- If you don't use CURSOR and you want every user will see on the fly every modification:
-- use entire table for browse
-- LOCK every record before user begin editing it
-- UNLOCK locked record and COMMIT it after editing completed.
That is all.
If your only goal is browsing in multiuser environment, surely you don't need changing your database system
Happy Clipper'ing by HMG way
Saludos
--
Esgici
In that way user can't
I'm interested only your first question and my answer is "yes".necesito saber si se puede hacer un browse sobre una tabla al viejo estilo como se hace con una dbf.
need to know if you can do a browse on a table in the old style as with a dbf.
When that "db servers" didn't born (even only as a term), the old style .dbfs was exists and thousand of multiuser applications based tables in .dbf standards was run
The synopsis of a browse in multiuser environment is quite simple :
- In that environment it's the best way USE'ing tables in shared mode ( except some specific process ).
- Use CURSOR (Current Set Of Record) whenever possible. While building that intermediate (scratch) file, LOCK included records in master table and UNLOCK when browse seance end. With this method, only one user can edit one or set of records, and modifications will come to scene only after editing process completed and saved to their original positions.
- If you don't use CURSOR and you want every user will see on the fly every modification:
-- use entire table for browse
-- LOCK every record before user begin editing it
-- UNLOCK locked record and COMMIT it after editing completed.
That is all.
If your only goal is browsing in multiuser environment, surely you don't need changing your database system
Happy Clipper'ing by HMG way
Saludos
--
Esgici
In that way user can't
Viva INTERNATIONAL HMG
Re: Browsear tablas MySQL
Esgici Hello, I understand what you say.
No I just need to navigate in the table but also modify
And it's a system that is networked, with at least 10 more users accessing the same table at the same time.
As I understand it with the SELECT database brings me a snapshot of the table for me available.
I'm never working directly on the table as he did with the dbf's
Currently a user who travels in one browse the dbf instantly see the changes other users did
When you refresh the browser.
I want to do or imitate that same vision that I generated using the table.
Needless to say I aspire not to have to change much the source of my systems.
I have not so lucky ...
Thanks for your comment
In Clipper is all so easy ...
No I just need to navigate in the table but also modify
And it's a system that is networked, with at least 10 more users accessing the same table at the same time.
As I understand it with the SELECT database brings me a snapshot of the table for me available.
I'm never working directly on the table as he did with the dbf's
Currently a user who travels in one browse the dbf instantly see the changes other users did
When you refresh the browser.
I want to do or imitate that same vision that I generated using the table.
Needless to say I aspire not to have to change much the source of my systems.
I have not so lucky ...
Thanks for your comment
In Clipper is all so easy ...
Re: Browsear tablas MySQL
Hi Mincho73,
I'm not a guru, but I've done simple experience with MySql and PostGres.
Is my opinion you can browse the tables of these Databases (but you can use the same concept about .dbf tables) using GRID control and then edit record.
Normally, I load datas into the GRID (using SELECT clause without any lock option), browse data with GRID control and then select a row (using select clause with lock option) and edit the specified record. NB I write about lock, but I have find solution only with PostGres not with MySql.
I have get problem with SQLRDD perhaps because I don't understand very well it's use.
I hope, I give you a good way to solve your problem.
I'm sorry I can read/understand (little) your idioma but I can't write.
Best regards
I'm not a guru, but I've done simple experience with MySql and PostGres.
Is my opinion you can browse the tables of these Databases (but you can use the same concept about .dbf tables) using GRID control and then edit record.
Normally, I load datas into the GRID (using SELECT clause without any lock option), browse data with GRID control and then select a row (using select clause with lock option) and edit the specified record. NB I write about lock, but I have find solution only with PostGres not with MySql.
I have get problem with SQLRDD perhaps because I don't understand very well it's use.
I hope, I give you a good way to solve your problem.
I'm sorry I can read/understand (little) your idioma but I can't write.
Best regards
Luigi from Italy
www.L3W.it
www.L3W.it
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Browsear tablas MySQL
Hi Luigi,
Can you supplement your idea by giving a small working sample?
Thanks.
Can you supplement your idea by giving a small working sample?
Thanks.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Browsear tablas MySQL
Thanks Luigi, I speak Spanish and use Google translator to write these messages.
Your idea seems very good and was something I had in mind.
Anyway I think the solution is in the RDDSQL.
From what I have read so far RDDSQL is achieved by connecting to the database and then use would be quite similar to the use that was given to. Dbf even commands work (not all)
With RDDSQL very little need to modify source code and achieves practically the same result
I think that road is the solution.
Thanks for your answer
Your idea seems very good and was something I had in mind.
Anyway I think the solution is in the RDDSQL.
From what I have read so far RDDSQL is achieved by connecting to the database and then use would be quite similar to the use that was given to. Dbf even commands work (not all)
With RDDSQL very little need to modify source code and achieves practically the same result
I think that road is the solution.
Thanks for your answer
Re: Browsear tablas MySQL
Hi friends,
for Mincho: yes I think it's a good way but I don't use it. I will test. Any way, both dbf or postgresql I don't use BROWSE to edit record for many reason.
for Rathi
about your request I've upload a simple demostration with PostgreSql.
1) I'm using PostgreSql8.4.4 version
2) This program is intended to dimostrate my solution not for production
To run this demo you must
- create one database (I've used: tablespace=pg_default character=UTF8 Collation=C)
- grant privileges (about this database) to one user for: create table, append, delete, etc.
- modify line 94 in the main.prg with your values:
- you must have all .dll files loaded where you run program. They are:
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
ssleay32.dll
Use:
- Every time you run the program, it will try to connect. Showed message in any case.
- Every time you can "create" table and populate for demostration use.
- With Browse function you can:
- view loaded data (press Load button)
- edit a record (double click on row)
- add a record (double click on a empty row)
- With Edit form you can save or delete record
NB I've used a simple tecnicque to lock Edit form when a record is loaded. For this reason I've used a invisible label.
I am at your disposal for any clarification.
Best regards
for Mincho: yes I think it's a good way but I don't use it. I will test. Any way, both dbf or postgresql I don't use BROWSE to edit record for many reason.
for Rathi
about your request I've upload a simple demostration with PostgreSql.
1) I'm using PostgreSql8.4.4 version
2) This program is intended to dimostrate my solution not for production
To run this demo you must
- create one database (I've used: tablespace=pg_default character=UTF8 Collation=C)
- grant privileges (about this database) to one user for: create table, append, delete, etc.
- modify line 94 in the main.prg with your values:
Code: Select all
LOCAL cServer := "xxx.xxx.xxx.xxx", cUserName := "userlogin", cUserPwd := "userpassword", cDbName := "testdb", nPort := 5432
comerr32.dll
gssapi32.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv-2.dll
libintl-8.dll
libpq.dll
ssleay32.dll
Use:
- Every time you run the program, it will try to connect. Showed message in any case.
- Every time you can "create" table and populate for demostration use.
- With Browse function you can:
- view loaded data (press Load button)
- edit a record (double click on row)
- add a record (double click on a empty row)
- With Edit form you can save or delete record
NB I've used a simple tecnicque to lock Edit form when a record is loaded. For this reason I've used a invisible label.
I am at your disposal for any clarification.
Best regards
- Attachments
-
- Source.zip
- sources example
- (13.21 KiB) Downloaded 512 times
Luigi from Italy
www.L3W.it
www.L3W.it
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Browsear tablas MySQL
Thanks a lot. I would check...
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.