CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Problem with Dropdown

by zsleo » 21 Apr 2018 07:59

D Tokyo; IW 14.2.7; CDG 4.1.0.50

When I have dropdown that is lined to both DataSource and ListSource and if ListSource has records and DataSource field DOES NOT have a value (i.e. database field value is null or null-string) then when a dropdown is displayed then for each dropdown that meets this condition error in "image 1" is prompted.
Image1.png


"image 2" is an example of one of my frames that exhibits this problem.
Image2.png


Not ideal but here is a change I made to the unit "Data.Win.ADODB" that fixed the problem.
Code: Select all
function TCustomADODataSet.LocateRecord(const KeyFields: string;
  const KeyValues: OleVariant; Options: TLocateOptions;
  SyncCursor: Boolean): Boolean;
var
  Fields: TList<TField>;
  Buffer: TRecordBuffer;
  I, FieldCount: Integer;
  Partial: Boolean;
  SortList, FieldExpr, LocateFilter: string;
begin
{2018 04 21 ZSL: TO overcome CGD KeyValues = null}
if KeyValues <> null then
begin

  CheckBrowseMode;
  UpdateCursorPos;
  CursorPosChanged;
  Buffer := TRecordBuffer(TempBuffer);
  Partial := loPartialKey in Options;
  Fields := TList<TField>.Create;
  DoBeforeScroll;
  try
    try
      GetFieldList(Fields, KeyFields);
      if not Assigned(FLookupCursor) then
        FLookupCursor := Recordset.Clone(adLockReadOnly);
      if CursorLocation = clUseClient then
      begin
        for I := 0 to Fields.Count - 1 do
          if Pos(' ', TField(Fields[I]).FieldName) > 0 then
          SortList := Format('%s[%s],', [SortList, TField(Fields[I]).FieldName]) else
          SortList := Format('%s%s,', [SortList, TField(Fields[I]).FieldName]);
        SetLength(SortList, Length(SortList)-1);
        if FLookupCursor.Sort <> SortList then
          FLookupCursor.Sort := SortList;
      end;
      FLookupCursor.Filter := '';
      FFilterBuffer := Buffer;
      SetTempState(dsFilter);
      try
        InitRecord(Buffer);
        FieldCount := Fields.Count;
        if FieldCount = 1 then
          FLookupCursor.Find(GetFilterStr(FieldByName(KeyFields), KeyValues, Partial), 0,
           adSearchForward, EmptyParam)
        else
        begin
          for I := 0 to FieldCount - 1 do
          begin
            FieldExpr := GetFilterStr(Fields[I], KeyValues[I], (Partial and (I = FieldCount-1)));
            if LocateFilter <> '' then
               LocateFilter := LocateFilter + ' AND ' + FieldExpr else    { Do not localize }
               LocateFilter := FieldExpr;
          end;
          FLookupCursor.Filter := LocateFilter;
        end;
      finally
        RestoreState(dsBrowse);
      end;
    finally
      Fields.Free;
    end;
    Result := not FLookupCursor.EOF;
    if Result then
      if SyncCursor then
      begin
        Recordset.Bookmark := FLookupCursor.Bookmark;
        if Recordset.EOF or Recordset.BOF then
        begin
          Result := False;
          CursorPosChanged;
        end
      end
      else
        { For lookups, read all field values into the temp buffer }
        for I := 0 to Self.Fields.Count - 1 do
          if Self.Fields[I].FieldKind = fkData then
            PVariantList(PByte(Buffer)+SizeOf(TRecInfo))[Self.Fields[I].Index] := FLookupCursor.Fields[Self.Fields[I].FieldNo-1].Value;
  except
    Result := False;
  end;
end;
 
end;



Can you please look at fixing this in CGD code. Also, I this this will also be the case whereever CGD uses the Lookp functtion

TIA
You do not have the required permissions to view the files attached to this post.
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 23 Apr 2018 17:00

Hi zsleo

I'm sorry but you will have to submit a test case

for what you said, you would never fix anything in our code just because ADO raises that strange exception, when apparently is ADO that needs to be fixed?

But we provide the component with events, for instance, so that you can do a custom lookup
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 23 Apr 2018 21:01

Jorge,
Your answer is too glib.

If you do not, as I have been advised you do not, develop or test using Tokyo, how do you intend testing a sample app?

... and yes! I do expect you to make sure your component suite integrates correctly with versions of Delphi that CGD claims to support.

All other component developers have to do this. Why not CGD?

I have stated on numerous occasions that I am converting an app developed in XE and, so again for the record, this is NOT a problem in XE BUT is in Tokyo 10.2.3.

Finally, it has now been quite a while since I reposted the last problem for which I paid premium support that turned out to be a CGD problem and for which
1. You have not advised a DCU fix for; and
2. I have not, on principle, received a refund

Do you expect me to pay to another premium support to show you the problem is with CGD?

This is becoming very tedious and, not to mention, unprofessional.

Jorge, I really don't want to go into another tirade as I did last time but what you are requesting me to do is unfair and logically makes very little sense to me.
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 24 Apr 2018 11:09

Hi zsleo

You make of Tokyo such a big deal, which is not

Delphi XE or Tokyo is the same, as far as cgdevtools code concern, nothing changed to make us do anything.

Finally, it has now been quite a while since I reposted the last problem for which I paid premium support that turned out to be a CGD problem and for which

1. You have not advised a DCU fix for; and
2. I have not, on principle, received a refund


you've to explain this in detail, by email, so that i can show your arguments to our administration.Nobody ask us for a refund.

Do you expect me to pay to another premium support to show you the problem is with CGD?


No, as I said, i only expect a test case, always.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 24 Apr 2018 20:58

Jorge,

I have received a number of private emails from long standing members of the Delphi community who have been watching this thread who are in support of the position I am taking and who don't understand the CGD approach to supporting its product.

The money IS NOT the issue here BUT the principle is!

I am prepared to submit another simple test case if you advise me that your testing is going to be using a version of Delphi after the database interfaces where changed- I think XE6.

If, after what I have stated in this thread you don't understand the reason this is a CGD DCU distribution issue (and others do) then there is nothing else I can add...
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 25 Apr 2018 15:48

zsleo

I don't care of how many private messages you receive, and what kind of support model they would suggest.

Our support model is

Send us a test case so that anybody can understand what is the problem

,And stop saying that we have problems with deployed dcus and everything else, like you was so sure about anything and we are the dumb guys
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 25 Apr 2018 20:14

... I know you don't care but I do....

Also, if your DCU does not work but your source code works then where is the problem?

... again you address the emotive issues and do not answer:
1. The technical questions; and
2. The commercial question

Please answer these so I can prepare an example app that I can have confidence will at least have a chance of being repeated by CGD.
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 25 Apr 2018 20:58

Hi

Also, if your DCU does not work but your source code works then where is the problem


Do you know if the dcu is from the right version? how should we know what configuration you have in your projects / delphi / machine?

There's got to be an answer, i already told you to contact me by skype to schedule a remote session, but you seem to like better this kind of rang, complaining about everything that we do or we are.....

Again, this is the the technical and commercial answer:

I'm sorry but you will have to submit a test case
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by zsleo » 26 Apr 2018 21:24

Jorge,

INSTALLATION and SETUP: Alexander did a remote login and I am quoting bike here "there must be a problem with the DCU that is why the source is working. Don't worry I will get to the bottom of this and let you know". Not to be pedantic but I am quoting CGD - a conclusion I agree with.

MY REFERENCE TO YOUR OTHER POST: if you don't understand, let me be very clear. I am VERY unhappy and disappointed. WRT my recent posts you have been either intentionally or by omission not addressing/answering the specifics of my posts with preference toward the emotive. There are many important (to me) questions you have not answered.

Jorge, I am spending more and more frustrating hours experimenting to getting CGD to work so that I can deliver/present a professional product to my customers. Added to this, the majority of the issues I am experiencing were and still are working in XE.

ALSO: For the record, did you remove some of my posts?

... I still have the best intentions.

I will Skype you tonight.
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Jorge Sousa » 27 Apr 2018 10:33

Hi zsleo

About

INSTALLATION and SETUP: Alexander did a remote login and I am quoting bike here "there must be a problem with the DCU that is why the source is working. Don't worry I will get to the bottom of this and let you know". Not to be pedantic but I am quoting CGD - a conclusion I agree with.


Yes I remember that Alexandre told me something about that, that's why I've been pushed into this matter.
It can be a lot of things, including the fact that you have Tokyo Update 3? We are still compiling for Update 2.

MY REFERENCE TO YOUR OTHER POST: if you don't understand, let me be very clear. I am VERY unhappy and disappointed. WRT my recent posts you have been either intentionally or by omission not addressing/answering the specifics of my posts with preference toward the emotive. There are many important (to me) questions you have not answered.


What another post? Why are you disappointed? If this is because we ask for test cases, and we are not willing to make test cases based on small pieces of code you post, well, I'm sorry I can't do nothing about this, you just don't get the whole picture, we've thousands of customers, and at least dozens of support calls every day, including email requests. Reread all of your posts, tell anyone, if they could work profressionally with the kind of information you provide.

Jorge, I am spending more and more frustrating hours experimenting to getting CGD to work so that I can deliver/present a professional product to my customers. Added to this, the majority of the issues I am experiencing were and still are working in XE.


That is YOUR problem, not ours, you keep saying that WE'VE problems, but we don't think we have. I'm sorry if we don't fulfill your needs,
But we are to answer to support questions, and for alleged bugs, we need test cases.

ALSO: For the record, did you remove some of my posts?


Yes I removed a repeated post on this thread

https://www.cgdevtools.com/cgforum/viewtopic.php?f=151&t=3632&p=18106#p18106

Because has nothing to do with the subject being discussed.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

Next

Return to JQDropDown

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.