示例#1
0
        //-----------------------------------------------------------------------------
        // dbCopy
        //-----------------------------------------------------------------------------
        /// <summary>
        /// Makes a copy of an existing database.
        /// </summary>
        /// <param name="sSrcDbName">
        /// The name of the control file of the database to be copied.
        /// </param>
        /// <param name="sSrcDataDir">
        /// The directory where the data files for the source
        /// database are stored. See <see cref="dbCreate"/> for more information.
        /// </param>
        /// <param name="sSrcRflDir">
        /// The directory where the RFL files for the source
        /// database are stored.  See <see cref="dbCreate"/> for more information.
        /// </param>
        /// <param name="sDestDbName">
        /// The name of the control file that is to be created for the destination database.
        /// </param>
        /// <param name="sDestDataDir">
        /// The directory where the data files for the destination database will be stored.
        /// See <see cref="dbCreate"/> for more information.
        /// </param>
        /// <param name="sDestRflDir">
        /// The directory where the RFL files for the destination database will be stored.
        /// See <see cref="dbCreate"/> for more information.
        /// </param>
        /// <param name="copyStatus">
        /// If non-null this is an object that implements the <see cref="DbCopyStatus"/>
        /// interface.  It is a callback object that is used to report copy progress.
        /// </param>
        public void dbCopy(
			string			sSrcDbName,
			string			sSrcDataDir,
			string			sSrcRflDir,
			string			sDestDbName,
			string			sDestDataDir,
			string			sDestRflDir,
			DbCopyStatus	copyStatus)
        {
            RCODE						rc;
            DbCopyStatusDelegate	dbCopyStatus = null;
            DbCopyStatusCallback	fnDbCopyStatus = null;

            if (copyStatus != null)
            {
                dbCopyStatus = new DbCopyStatusDelegate( copyStatus);
                fnDbCopyStatus = new DbCopyStatusCallback( dbCopyStatus.funcDbCopyStatus);
            }
            if ((rc = xflaim_DbSystem_dbCopy( m_pDbSystem, sSrcDbName, sSrcDataDir, sSrcRflDir,
                sDestDbName, sDestDataDir, sDestRflDir, fnDbCopyStatus)) != 0)
            {
                throw new XFlaimException( rc);
            }
        }
示例#2
0
        private static extern RCODE xflaim_DbSystem_dbCopy(
			IntPtr					pDbSystem,
			[MarshalAs(UnmanagedType.LPStr), In]
			string					pszSrcDbName,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 					pszSrcDataDir,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 					pszSrcRflDir,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 					pszDestDbName,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 					pszDestDataDir,
			[MarshalAs(UnmanagedType.LPStr), In]
			string 					pszDestRflDir,
			DbCopyStatusCallback	fnDbCopyStatus);