BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Backup: database.mdf->database.bak

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Katarina
Guest





PostPosted: Mon Oct 09, 2006 11:41 pm    Post subject: Backup: database.mdf->database.bak Reply with 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
Brian Hollister
Guest





PostPosted: Tue Oct 10, 2006 12:11 am    Post subject: Re: Backup: database.mdf->database.bak Reply with quote



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





PostPosted: Tue Oct 10, 2006 1:37 am    Post subject: Re: Backup: database.mdf->database.bak Reply with quote



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





PostPosted: Tue Oct 10, 2006 2:19 am    Post subject: Re: Backup: database.mdf->database.bak Reply with quote

I found a solving: ParamChech -> False. Smile
Best regards.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.