Author Topic: Copy of Database  (Read 2050 times)

0 Members and 1 Guest are viewing this topic.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Copy of Database
« on: December 13, 2011, 08:55:26 AM »
How can I quickly to create a copy of Database object?
Code: [Select]
//db - is Database, not null...
//Variant 1:
Database db1 = (Database) db.Clone();//result: db1 = null;
 //Variant 2:
Database db2 = new Database(false, true);
db2.CopyFrom(db);// result: Fatal Error.
Thanks.

kaefer

  • Guest
Re: Copy of Database
« Reply #1 on: December 13, 2011, 09:19:28 AM »
How can I quickly to create a copy of Database object?

Quote
Database.Wblock Method ()

Description
 
Creates a new Database object, and then uses the wblockClone mechanism to write the entire contents of the database on which this function is being called out to the new database.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Re: Copy of Database
« Reply #2 on: December 13, 2011, 09:33:41 AM »
2 kaefer
Thanks!