CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 1999
    Location
    Germany
    Posts
    26

    Deletion & Transactions

    Hi,

    I am trying to write a tool for conversion and import of large databases. My problem with e.g. our server is, that its number of accepted transactions is rather limited, to something like 10.000, but the number depends on the size of the records. Now the software is supposed to be able to delete all records in the table before beginning with the import.
    I do not know the criteria or any field of the database concerning its content, so there is no way for me to divide the records into logical units. Because of the transaction limit I can not use DELETE FROM ...! Does anybody know of a way to avoid this problem, e.g. force the ODBC Database (in my case an IBM DB2) to directly delete the records or to delete a certain number of records via SQL. Deleting every single record via DAO is a rather slow process !!

    Thanks for any answer!


  2. #2
    Join Date
    Apr 2001
    Posts
    7

    Re: Deletion & Transactions

    I am not quite sure what you are after but if you are trying to avoid transaction just truncate the table.

    For example:

    truncate table X;

    This is how it is done in oracle and is rather fast, I am sure it should be the same in the database you are using.

    Kev.-


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured