| View previous topic :: View next topic |
| Author |
Message |
Katarina Guest
|
Posted: Mon Oct 09, 2006 11:41 pm Post subject: Backup: database.mdf->database.bak |
|
|
Hello all,
I would like to know how make 'backup' from MSSQL to file(anydatabase.bak). I didn't found solving for net so I ask you about it.
Thanks in advance.
p.s. I tried to do: " ADOCommand1.commandtext :='osql -E -Q "BACKUP DATABASE base1 TO DISK = ''d:\data.bak''"'
Nothing because it didn't appear file 'data.bak' in directory. |
|
| Back to top |
|
 |
Brian Hollister Guest
|
Posted: Tue Oct 10, 2006 12:11 am Post subject: Re: Backup: database.mdf->database.bak |
|
|
try just executing the command without using osql
ADOCommand1.commandtext := 'BACKUP DATABASE base1 TO DISK = d:\data.bak'
ADOCOmmand1.Execute;
You should not need the quotes around db object names unless they contain
spaces or are resrved words.
hth,
brian
--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Katarina" <katarina89 (AT) ptt (DOT) yu> wrote in message
news:452a97c3$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
Hello all,
I would like to know how make 'backup' from MSSQL to
file(anydatabase.bak). I didn't found solving for net so I ask you about it.
Thanks in advance.
p.s. I tried to do: " ADOCommand1.commandtext :='osql -E -Q "BACKUP
DATABASE base1 TO DISK = ''d:\data.bak''"'
Nothing because it didn't appear file 'data.bak' in directory. |
|
|
| Back to top |
|
 |
Katarina Guest
|
Posted: Tue Oct 10, 2006 1:37 am Post subject: Re: Backup: database.mdf->database.bak |
|
|
Thank you for helping, Brian :)
I did this code, but the message is appeared: "Parametar object is improperly defined. Inconsistent or incomplete information was provided."
What's wrong?
Thanks again. |
|
| Back to top |
|
 |
Katarina Guest
|
Posted: Tue Oct 10, 2006 2:19 am Post subject: Re: Backup: database.mdf->database.bak |
|
|
I found a solving: ParamChech -> False.
Best regards. |
|
| Back to top |
|
 |
|