Home Datapipelines
New Blog Posts: Merging Reports - Part 1 and Part 2

MasterFieldLinks and NULL Fields

edited October 2004 in Datapipelines
Hi
I am using Delphi 6 (Update 2), Report Builder Professional 7.04.
I am querying some text files using the JET provider and copying to memory
tables. The report comprises of a master detail relationship. Since I am
using Memory Tables, I have set the MasterLinkFields for the detail
pipeline.
I am experiencing problems when one of the master and/or detail link fields
are null. The IDE generates a CPU window and stops and DebugBreakPoint. The
application at run time, will generate an av in NTDLL.DLL when it reaches
the page containing the null value.
I was originally using the Microsoft ODBC TEXT driver but found it was
locking the text files exclusively, so reverted to JET as it seemed more
forgiving, but now I have the problem with the null links, that were not
generated with the ODBC driver.
My understanding is that Build 7.0 and later was supposed to fix this issue
raise by Delphi 6 and Update 2, but it seems to still be there under certain
conditions. My only recourse is to set any null fields to 'NA' when the data
is being copied to the memory tables.
Any ideas?
Thanks
Dominic

Comments

  • edited October 2004
    Some more info...
    I found some code on the web that replaces the int 3 in ntdll with nops and
    the problem seems to gave gone.
    (http://www.howtodothings.com/showarticle.asp?article=654)

    I suppose the question is why was it happening and is this the best
    solution?

  • edited October 2004

    The latest release, RB 7.04 does contain some fixes for linking with null
    field values. Prior to this fix, the report would generate incorrectly -
    however it would not AV or encounter the type of error that you describe. We
    have not heard of this type of error before.

    I'm not sure whether this is a ReportBuilder issue or an issue with the
    tables not being created correctly. To test this modify your Delphi library
    path from RBuilder\Lib to RBuilder\Source and then run in the debugger with
    break on language exceptions set to true. When the exception occurs you
    should be able to look at the call stack.

    The TppCustomDataPipeline.CompareLinkedData method in ppDB.pas contains the
    code that compares the linked datafield values.

    From a data design perspective, allowing null values in linking fields is
    not a great idea. One alternative is to do what you are doing now, put in an
    N/A or a empty string.




    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2004
    Thanks Nard.
    What I can't undertstand is why would one connectivety driver give the error
    and another one did not. I suppose the ODBC text driver treats
    "" differently to the JET driver. That is the text driver treats "" as "" as
    the JET driver treats "" as null.
    Are you aware of any settings in JET, either registry or connection string
    to treat "" as "" and not null?
    Thanks again
    Dominic

  • edited October 2004


    Sorry, we do not have any information JET/ODBC settings. Try searching
    Google and Google Groups.

    We have only used the JET driver via Delphi's ADO to connect to MS Access
    tables.


    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.