> Thank you very much.
>
>
> How do you make a copy of a database say :
>
> nortwind as nortwind1 within the database folder in sql server.
>
>
> > > What is the process required to make a backup copy of a database in sql server into a different directory or a replica on the same computer.?
> > >
> > > How do you copy a datafile from one database in one environment to another database in sql server?
> > >
> > > any help please ?
> > >
> > > Thank you
> >
> > SQLEXEC(gnHndl,[SELECT * FROM MyTable],[TmpCursor])
> > SELECT(TmpCursor]
> > COPY TO [Path2\MyBackupTable]
> >
> > Ken
> > You shall know the truth - and the truth shall set you free. (John 8:33)
Try this:
oMyServer = CreateObject('SQLDMO.SQLServer')
oBackup = CreateObject('SQLDMO.backup)
oBackup = CreateObject('SQLDMO.backup')
oMyServer.LoginSecure = .T.
oMyServer.Connect([SQL Server Name])
oBackup.Database = [Database Name]
oBackup.Files = [Backup File Name]
oBackup.SQLBackup(oMyServer)
RELEASE oBackup
oMyServer.DisConnect
RELEASE oMyServer
Noker Lodia
The interesting thing about life is that we all have our own contradictions.