My new unfinished DB admin app in Lazarus lazarus / 16-Databases ---------------------------------------------------------------------- Fantablup · 2021-07-03 19:38 This is one of the screenshots of my new not yet finished database admin application made in Lazarus. This is showing the SQL editor. ---------------------------------------------------------------------- DonAlfredo · 2021-07-04 07:18 This looks very nice ! Are you planning on open sourcing ? ---------------------------------------------------------------------- cappe · 2021-07-04 08:13 It seems very nice ---------------------------------------------------------------------- Fantablup · 2021-07-04 10:04 Thanks guys. I,m not sure about opensource it. Because i have never earned a dime on all my free programs. I had a free invoice system made in Delphi, and over 1000 company used it, but only got some small unuseful shit in the mail as thanks from some of them. It could be a small ice fishing kit that cost 5 bucks. I stopped developing it, and removed it from web after over 10 years. I have re-programmed it for the web with Javascript and Node js, and it is completed. I used 4 years on it. It run on any OS and the web. I'm planning to replace the Node js with a web server i create in Lazarus, for the desktop version. But right now i'm developing this DB admin app in Lazarus. So, i'm not sure of opensource. I need to earn money. ---------------------------------------------------------------------- Fantablup · 2021-07-04 13:10 Another screenshot of the DB admin app. ---------------------------------------------------------------------- Hansvb · 2021-07-04 13:28 Does it handle Oracle spatial tables? I mean what happens if you do select * from table when it has a geometry column? Is the geometry coumn shown in the datagrid? ---------------------------------------------------------------------- Fantablup · 2021-07-04 13:34 I have only created the Firebird 3 class in the application. When the first version is finished with Firebird 3, and Firebird 4, i will add Oracle and others to it. But it will first be ready to use with Firebird 3 and 4. I am using whole classes for each DB and DB version, so it will be really easy to add new DB engines and DB versions to it. I just copy the DB class and change it to the correct DB engine and DB version. And then add it to the application. ---------------------------------------------------------------------- Fantablup · 2021-07-08 17:50 After a little more work the SQL result list look like this. Here you can add images, or delete them, or save. ---------------------------------------------------------------------- devEric69 · 2021-07-08 18:23 It's interesting your built-in preview functionality: do you draw the thumbnails yourself in the grid (onPaint \ embed a component like TImage in the cells that really contain a blob-image data), or do you use a component-grid that already knows how to do this? ---------------------------------------------------------------------- Fantablup · 2021-07-08 18:37 Nahh.. I couldn't find any good grids that do this. I just use a TStringgrid. I really wanted to make it like a preview that you can use as a working thing you can work on. Image blobs and text blobs is important for this. Next i'm gonna add text blobs. I'm using TImage, TPicture and TBitmap for it in the arrays. And resizing the thumb images to smaller, so it goes fast. And hold the big image in a TPicture component, so you can see it larger by clicking on it, or save it. I just add the rows manually, and when it scrolls to a blob field, it loads from the database only once. And the next scrolling scroll fast because it already has the blob. I use arrays with records and arrays in records to hold the data for the stringgrid. Sorting is also implemented. But all this hasn't been easy. With scrolling issues on different col and row, It's getting better and better. ---------------------------------------------------------------------- devEric69 · 2021-07-08 18:52 Okay. That looks pretty good, near to what was produced by TurboPower. Maybe IBX-TDBControlGrid can do that (never tried; I should try: I prefer to store only the links \ paths towards the "blob files" on the hard disk, remaining outside the database). But if you want to stay independent from any data engine, I understand the choice of TDrawGrid or TStringGrid... ---------------------------------------------------------------------- Fantablup · 2021-07-08 18:56 I just have to finish it first. Actually i made this string grid as a component, so it could be used by others i guess too. Everything is happening inside the component. I will see how it goes. ---------------------------------------------------------------------- Fantablup · 2021-07-09 15:20 Now with blob text. Seams that i also have to remove the row header, and create one manually. It does now work well with scrolling and with the small buttoms. The buttoms and memo showing over the header row. The scrolling top also include the fixed rows, so i just have to remove it and create my own header row that is not in the stringgrid. ---------------------------------------------------------------------- devEric69 · 2021-07-09 15:52 It seems that you are doing component embedding (TMemo) in the TStringGrid's cells (scrollbars are visible for the "text-blob" preview). ---------------------------------------------------------------------- Fantablup · 2021-07-09 16:06 That's correct  Also the same with the buttons. I think i just create a tpanel over the header row, and paint it like the original row. And set the z order on the buttons and the memos. ---------------------------------------------------------------------- Fantablup · 2021-07-09 19:20 Starting to work on the text blob. Not yet added save to button. Actually, I realized, when creating a custom header, it will be possible to add special sorting possibilities. So, a custom header is just good. Also have to add the check for base64 images, so it is not seen as text blobs, to show as images too. some saves all images as base64, and not as binaries. Also in the todo list is: Make it use less memory. Destroy all the images from first row to last row between 100 rows from the current row. And when scrolling to these rows again, it re-load the image from the DB. Or do this by checking stream size of images instead of row numbers. That will be more exact. If i,m not doing this, the grid will just eat memory. ---------------------------------------------------------------------- Fantablup · 2021-07-10 19:06 I realized that i also need to implement max rows in the grid. That's because of memory. Can' just add 1000+ or million rows at ones. Need to keep it at max rows that the grid component sets. It helps with talking in this forum. It gives new stuff to think of. I also realized that deleterows is public in Lazarus, but not in Delphi. Not sure yet, but i read it. So, allot of work is going to be done in the new grid component. Much more than i excpected. ---------------------------------------------------------------------- Fantablup · 2021-07-14 21:31 I finally got the result list to work good. I have created a custom List header, and also worked on getting all items in the correct cells. Now, these small buttons is not painting over the lits header either. This has been some hard work indeed. I am also making this custom DBGrid component work with any db component with just connecting to a TDataSource., So it will not only work with Zeos. The only thing left to do on the grid is a new sorting function, and functions for keeping memory use low in the list. These two things is also allot of work. ---------------------------------------------------------------------- 440bx · 2021-07-14 21:35 It's looking good ---------------------------------------------------------------------- egsuh · 2021-07-14 22:43 QuoteI have re-programmed it for the web with Javascript and Node js, and it is completed. I used 4 years on it. It run on any OS and the web. I'm planning to replace the Node js with a web server i create in Lazarus, for the desktop version. Theoretically web server can be written in eigher  Lazarus  or node.js, and client can be either of webbrowser or desktop application, and they can cross-access. Do you have any specific reason to rewrite web server as well, in addition to desktop application? ---------------------------------------------------------------------- Fantablup · 2021-07-14 23:17 A good reason. Size. The node js is big when adding it as a web server for the desktop app. Over 100 mb. Writing it in pascal will reduce the size of the web server. ---------------------------------------------------------------------- Fantablup · 2021-07-15 20:18 I have implemented sorting on columns. It can now sort on numbers and text. And also implemented padding on rows. Here you see on the images that it is space between top and bottom. I will give this custom DBGrid out for free, and with source when finished. It should also be compatible with Delphi, but i don't know, and don't wanna try it there. Have to install the community version since it has some earning money requirements after install. But it is some work until it is ready. ---------------------------------------------------------------------- Fantablup · 2021-07-15 22:47 I just added cellpadding in the grid. If you open the cellpadding property, you can select padding for all sides. This is a very nice feature. Like the flex in CSS. I also see that i can make the grid responsive like the flex grid in CSS. When the space for the columns is too small, the rest of the columns drops down a row, and also show the column header text. Just like flex in CSS. This is something i have wanted all the time i have developed in Delphi and Lazarus. I will give it a try implementing this. ---------------------------------------------------------------------- Fantablup · 2021-07-16 04:27 Now the grid is also auto resizing the row by the height of the images. And cell paddings is working good. Here it is a little wrong on the stwo last one, because it should have the delete button, and therefor larger height on the rows. I have added Editable property on the grid, and if it is set editable, it have a larger row height and shows all buttons. If not, it auto resize to the image, and the row height is smaller. I want to create this component as nice as possible, because it is more nice to work with it when finished, and the user don't need to program these things manually for the grid. But it is allot of work on it though. ---------------------------------------------------------------------- Fantablup · 2021-07-17 22:05 I created a simple video demo on the SQL editor. It only shows how smooth the scrolling are, and that it loads data little by little. Even if it is a end-user defined SQL. https://www.youtube.com/watch?v=Ud5eLTfTILE&ab_channel=ViggoJamne ---------------------------------------------------------------------- Fantablup · 2021-07-19 01:23 I have now re-done how the grid add the images and buttons. Adding components to the cells used way too much memory, and it crashed if it used too much. I have removed all components like TImage and TPicture. It only draw visually from a TImageList instead in each cell. Now, the grid is only using a little tbitmap. It only draws all the rest and the tbitmap on the canvas. It only checks where the user is clicking, and execute the stuff instead of having real buttons. The grid is now working very good, and using normal memory. It also keeps only the 50 images from the top row, and frees the images before this. It does the some with images below the visible results. So, only 50 small images from the beginning and only 50 images after the visible list. With thousand of lines it will not have more images at any time. The image is a tiny bitmap that is resized from the bigger image, and is in one array. Clicking the images loads the original image from the database, and shows it in a bigger widow. This way, i can keep the memory use very low, and just use one tiny bitmap, and one small array for the row and col. But it has been allot of thinking and trying. Not done easily. I also created two extra functions that i just call when drawing items to the cells using only X and Y position in rect and size i want it to be, and it automatically draws it and resize it. It's working very well, and fast too. ---------------------------------------------------------------------- valdir.marcos · 2021-07-19 21:39 Quote from: Fantablup on July 04, 2021, 12:04:04 pmThanks guys. I,m not sure about opensource it. Because i have never earned a dime on all my free programs. I had a free invoice system made in Delphi, and over 1000 company used it, but only got some small unuseful shit in the mail as thanks from some of them. It could be a small ice fishing kit that cost 5 bucks. I stopped developing it, and removed it from web after over 10 years. I have re-programmed it for the web with Javascript and Node js, and it is completed. I used 4 years on it. It run on any OS and the web. I'm planning to replace the Node js with a web server i create in Lazarus, for the desktop version. But right now i'm developing this DB admin app in Lazarus. So, i'm not sure of opensource. I need to earn money.@Martin_fr I don't have anything against paid products. This topic smells only as a click bait and propaganda of a future paid product. So, I think this topic should be moved to "Third party" section (Third party announcements). Thanks. ---------------------------------------------------------------------- Fantablup · 2021-07-19 22:06 Sorry for if it seems that way. Not my intention. Place it where you want. I don't care about that. I'm just honest about what i do. Just trying to show the progress of the grid. And also answering questions. Maybe it's better to only show progress on the grid instead. It's only that it is now only working in the app. Well, i'm just honest about what i do. All i can say.