Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Problem deleting memory table
Thu, May 2 2013 8:43 AMPermanent Link

Peter Evans

I have changed from version 3 to version 4 and memory table code that
worked no longer does so.

     WITH DataModule.qryList DO BEGIN
        Close;
        SQL.Clear;
        { This is the code that worked under version 3

         SQL.Add( 'INSERT INTO MEMORY LIST' +
                 ' VALUES ( :Name, :RecNum, :Sex, :GenBase, :GID)' );}


        { This is the code that works under version 4.34 Build 7}
        SQL.Add( 'INSERT INTO "\MEMORY\LIST"' +
                 ' VALUES ( :Name, :RecNum, :Sex, :GenBase, :GID)' );

        Prepare;
      END;


I have a routine to delete the memory table :-

FUNCTION TTableListAccess.DeleteTableList(
                              CONST DModule : TDataModuleList) : BOOLEAN;
BEGIN
  Result := False;
  TRY
    DModule.List.Active := False;
    DModule.List.DeleteTable;      <==============
    Result := True;
  EXCEPT
  END;{TRY}
END;

This worked under version 3.
But under 4.34 Build 7 it crashes on line indicated.

The error I get is :-
  "... raised exception class EDBISAMEngineError with message 'DBISAM
Engine Error # 11013 Access denied to table or backup file 'List' "

The table List is of type TDBISAMTable.
   DatabaseName = Memory

What changes do I need to the function so that the memory table is deleted?

Regards,
  Peter Evans
Fri, May 3 2013 3:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Peter


Not sure but try unpreparing the query that creates the memory table

Roy Lambert [Team Elevate]
Mon, May 6 2013 7:43 AMPermanent Link

Peter Evans

On 3/05/2013 5:48 PM, Roy Lambert wrote:

>
> Not sure but try unpreparing the query that creates the memory table
>

I was able to try out your suggestion today at work.
Thank you very much - UnPrepare worked.

Regards,
  Peter Evans
Image