Jump to content

Strange behavior DBGRID + Database + Other DBControls


eelias

Recommended Posts

Hi there!

 

I am using unigui 0.93.1.1000 with Delphi XE2

 

Attached there is a screen shot of the form I have created with unigui.

 

The DBGrid ( number 1)  is showing correctly the data. It comes from a DBISAM 4 table.

 

The problem here is that I have 2 controls that are connected to the same DATASOURCE, the DBLookupListBox (number 2) and the DBMemo (Number 3)

 

The DBGrid is not in Edit mode, i use it to display the value and to position to the desired record for change. UserRecNo = true FetchAll = True

 

User select the ROW he wants to change and then click on the LookupListBox selecting the proper value. (for example "sim") 

 

It SHOULD change the table, however it does not happen! I have put a button to make a Dataset.Post, and could verify that if the user select a row on the grid and then select a different value on the LookupListBox it does not change the DataSet.State of the table. It remains on dsBrowse (it should go automatically to dsEdit)

 

***BUT***

 

If you click on the Row BEFORE this one that did not work, and then click BACK to it, and try again to change the value, it WORKS! It does change the DataSet.State to dsEdit

 

To change the next record I have to follow always this behavior: Select the record to change, then click on the record before, click back again to the record to change (the it get somehow in sync) then the change will work.

 

I have experimented this behavior of DBGrid in several moments. In some cases if I call DBGRid.Refresh it comes back working. But not in this case. This problem also happens with the current record position. You can change the row on the Grid but it does not reflect on the current selected RecNo.

 

I have tested with every possible combination of DBGrid options and all remains the same.

 

I have tested with other components instead of LookupListBox. Even the DbMemo has the problem. It let you type in a new value, but it does not change to edit and does not post the new value.

 

Apparently the DBGrid does not let the record enter in Edit mode. Since I have this working without the grid. I am using DBISAM table in memory mode, this is an in memory work situation that will be fully saved when done.

 

Any ideas?

 

Thank you in advance!

 

Eduardo 

 

post-1314-0-88277900-1390358090_thumb.png

Link to comment
Share on other sites

The DBGrid ( number 1)  is showing correctly the data. It comes from a DBISAM 4 table.

 

 

try to use another DB system with the same UniGUI program as you used with DBIsam and see if the problem is related to DBIsam.

I had some problems with DBIsam (the DBIsam server did not saved the data when posting) and changed to Firebird/IBDac (never wanted to do that, because I like DBIsam a lot....). The same program, only changed the DB part - and everything is fine now.

 

Best Regards

Peter

Link to comment
Share on other sites

try to use another DB system with the same UniGUI program as you used with DBIsam and see if the problem is related to DBIsam.

I had some problems with DBIsam (the DBIsam server did not saved the data when posting) and changed to Firebird/IBDac (never wanted to do that, because I like DBIsam a lot....). The same program, only changed the DB part - and everything is fine now.

 

Best Regards

Peter

 

 

Thank  you chefdackel,

 

I am not sure if I am willing to change right now :)

 

I really like DBISAM for some projects, because it is very simple, and more simple to install on customers.

 

In fact this means that the UniGUI database components are not 100% compatible with the vcl guidelines for data connection. 

 

Besides DBISAM is pretty old, it is used on so many different projects, other grids, etc, that I dont believe this is a problem on DBISAM. 

 

However I have no option. I got rid of all the components on the form and use only editing inside the GRID. That made the posts work. However I get now eventually a "row mismatch" error, that seems to be another problem of the grid.

 

Thank you !

 

Eduardo

Link to comment
Share on other sites

  • 3 months later...

I get these errors. TUniDBGrid.SetCellValue: Row Mismatch! Plus. Also  when I try to navigate or print other reports I get blank results. For some reason I can only print one report that  I use to generate a PDF.  I can print one instance of a report,  from both table but not a query. I am wondering if this problem is being resolved, and if it really is a DBISAM error.

 

I having trouble with my uni db labels not showing the correct records from grid generated from a query when I move up or down records.  It seems to go to one and works the first time on the current record.  It seems the record pointer is lost or not able to go to another record. And when I try to print another report  it shows blank.

 

I am using DBISAM and cannot, or will not switch to any other database. I am using XE, Fast Reports, and DBISAM. and uniGUI  0.95.0.1046

 

I hope I can get a fix for this.  Any help is appreciated.

 

John P.

Link to comment
Share on other sites

John,

 

I use DBISAM for many years, I am now sticking on version 4.27. (with Delphi XE2) It just works very well. Always.

 

I could not solve this problem of Row Mismatch. There is something on the way events are triggered by ungui on the many layers until it gets to DBISAM.

 

My solution was to completely avoid editing on grids. There is only one place that I remain using the grid editing, but the users are told that this eventually happens, so I have not got further, It depends on how the user clicks on things... there are users that never get this. I dont know...

 

I am now going to other solutions with UniGUI, so not sure if that will happen again, I will be using TMS Aurelius + DataBinding + SQLite, so I expect to at least different issues :)

 

Sorry cannot help

 

Eduardo

Link to comment
Share on other sites

Hi eelias

 

Have you tried before TMS Aurelius + Databinding  with uniGUI??? 

 

Bresler,

 

This is my first time on that.

 

I have started using Aurelius recently and is amazing. Much better working with ORM with classes than doing direct database access. I will never go back. 

 

Data-binding I have not test a lot, but it works. There are some posts with solution for that. I have created a complete set of components directly inherited from the UniGUI ones, so any need I can implement what is missing. BUT if that cause any problems (since I am only on the beginning of this project, Aurelius provide a DataSet component that can be used in the regular way)

 

I am not using RAD style anymore. This is the Delphi way, but i see now it leads to terrible code and too difficult to maintain projects. 

 

I am using MVP pattern and isolating totally the GUI, so forms that are totally dumb. This way I only need to redraw the form for each project. I have a project right now that works on UniGUI, Firemonkey in Windows and Mac and Firemonkey in Android (not tested in IoS, but should work). I had to draw 3 times each form, one for unigui, one for desktop app one for mobile app.

 

Aurelius plays an important role on all that, since my data layer is much more intelligent now, based on classes. Removing code from the Form layer.

 

At some point I will share the experience on the forum.

 

Eduardo

Link to comment
Share on other sites

  • 2 months later...

Hi Farshad,

 

A bit confused, .96 version was said to be published 2 weeks ago.  Is does not show on the download section.  Any idea when it may be out. Just trying to do some planning and hoping to resolve some issues with DBISAM as reported before.

 

In my case it is a record pointing DBISAM issue that is preventing me to reprint a Fast Report generated PDF. I cannot seem reprint print from another record I am pointing to, but does work the first time on a new record. And when I do I get server errors.

 

One idea that may resolve my issue is that perhaps I can append my DBISAM record to another database and temp table, or something else that works better UNIGUI, and still keep my core application with DBISAM, which I cannot change.  Just wondering what may be the best approach. Anybody have some suggestions?

 

John P.

Link to comment
Share on other sites

Hi Farshad,

 

A bit confused, .96 version was said to be published 2 weeks ago.  Is does not show on the download section.  Any idea when it may be out. Just trying to do some planning and hoping to resolve some issues with DBISAM as reported before.

 

In my case it is a record pointing DBISAM issue that is preventing me to reprint a Fast Report generated PDF. I cannot seem reprint print from another record I am pointing to, but does work the first time on a new record. And when I do I get server errors.

 

One idea that may resolve my issue is that perhaps I can append my DBISAM record to another database and temp table, or something else that works better UNIGUI, and still keep my core application with DBISAM, which I cannot change.  Just wondering what may be the best approach. Anybody have some suggestions?

 

John P.

Where have you been all this time?

http://forums.unigui.com/index.php?/topic/4274-version-096/

Link to comment
Share on other sites

Alberto,

 

Thanks,

 

Where have I been?  During the spring and summer I work out of my office on another position.  Often gone 12 hours per day 5 days per week, so I may somehow missed that bulletin. Hope that answers your question. Which brings me to ask if anyone is interested in doing some piece work with uniGUI, since I am so busy. I have some small easy projects that I would like to get done but just don't have the time.

 

John

Link to comment
Share on other sites

John

 

"Which brings me to ask if anyone is interested in doing some piece work with uniGUI, since I am so busy. I have some small easy projects that I would like to get done but just don't have the time."

 

I am looking for this kind of thing.... do you mind in contact me and tell me what you have to offer?  eelias @ ig.com.br  

 

I have already good experience on complex uniGUI sites.

 

Thank you !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...