Skip to Content
avatar image
Former Member

999 Error Only the cancel command is allowed when rows are pending

I have started experiencing a really strange issue lately. Sometimes when I retrieve into a tabular or grid datawindow and I have another window open I get this error. I optimized the pbls and did a full rebuild but it didn't resolve it.

However, I found that if I get the row count in the datawindow constructor event and set the height to that count * the detail row height it retrieves correctly. I already know for a certainty that no retrieval is taking place. This is PB Classic 12.5.2 build 5602 running on windows 7 Enterprise Service Pack 1.

Has anyone else experienced this behavior or know if this is a known bug? What makes this really interesting is that we haven't updated PB in years. This is a legacy system that was been around for about 12-13 years and no changes have been made that would cause this to occur.

Any help/ideas would be greatly appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 05, 2016 at 08:43 PM

    I searched in Google for "only the cancel command is allowed" and there are hits going back to at least 2004 so this isn't a new issue. Unfortunately I didn't see any really good answers.

    You should turn on database tracing so you can see what exactly the database is complaining about.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 05, 2016 at 12:16 AM

    Hey guys,

    Thanks for the reponses and ideas.

    RetrieveAsNeeded is not set and there is no code at all in the retrieverow event. Again, what's really strange is if I set the datawindow control to a height large enough to hold the entire result set it works fine.

    I know for a fact there are no rows pending. I can open the app in the morning and retrieve one row, and then come back to it hours later, open the new window while the window with one row is still open and the error occurs.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 04, 2016 at 11:18 PM

    Do you have retrieveasneeded set?

    Do you have SQL in the retrieverow event?

    (Assume you get the rowcount from RowCount() not select count(*)...)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 04, 2016 at 11:32 PM

    I think Lars has the right idea, you must have a SQL statement in the retrieverow event. The database won't allow you to run a SQL command while the first one is still in progress.

    Add comment
    10|10000 characters needed characters exceeded