TheSwamp

Code Red => .NET => Topic started by: Andrey Bushman on December 13, 2011, 08:55:26 AM

Title: Copy of Database
Post by: Andrey Bushman 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.
Title: Re: Copy of Database
Post by: kaefer 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.
Title: Re: Copy of Database
Post by: Andrey Bushman on December 13, 2011, 09:33:41 AM
2 kaefer
Thanks!