+ Reply to Thread
Results 1 to 5 of 5

Thread: Operate on empty table

  1. #1
    Artur Redzko
    Join Date
    Jun 2011
    Posts
    15
    Points
    0
    Answers Provided
    0


    0

    Default Operate on empty table

    When I check a table extent using ltable->GetExtent(), for empty layer I get NAN values. This is fine as it's easy to check. But when I make first reading using ltable->Search(...,enumrows) , then at enumrows->Next() I get access violation at 54D8D99E in FileGDBAPID.dll (Read of address 00000000) exception. How can I avoid this error? How to check if Search returns EOF so I can skip Next? I assume that these functions should return a result code to notify EOF what works fine for not empty layers. Is this a bug in SDK?

    Regards
    Artur

  2. #2
    David Sousa
    Join Date
    Jan 2011
    Posts
    53
    Points
    11
    Answers Provided
    1


    0

    Default Re: Operate on empty table

    If a call to Next does not return a row, it returns S_FALSE to indicate that fact. This is the expected behavior.

    I don't know why you are getting an access violation. This will require some investigation.

  3. #3
    Artur Redzko
    Join Date
    Jun 2011
    Posts
    15
    Points
    0
    Answers Provided
    0


    0

    Default Re: Operate on empty table

    My fault. I didn't check that I tried to operate on Table, not on Feature Class returned from GetChildDatasets(). So as you wrote for Feature Class if a call to Next does not return a row, it returns S_FALSE to indicate that fact. But why it fails for Table type ?

    Artur

  4. #4
    David Sousa
    Join Date
    Jan 2011
    Posts
    53
    Points
    11
    Answers Provided
    1


    0

    Default Re: Operate on empty table

    There should be no difference in the behavior of Next() between a table and a feature class.

    What are the steps to reproduce this problem? This is not something that we have seen in the past.

  5. #5
    Artur Redzko
    Join Date
    Jun 2011
    Posts
    15
    Points
    0
    Answers Provided
    0


    0

    Default Re: Operate on empty table

    1. having a table name from GetChildDatasets I use OpenTable on "Table" dataset type
    2. Then make a Search with Envelope on this table to get enum rows
    3. Then make Next on enum rows - here AV occurs

    The same scenario works fine for "Feature Class" dataset type.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts