Click here to Skip to main content
15,898,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I have created an vb.net desktop application in which i want vb.net code to backup the database at running time....
Also i have an problem with connection string ; as when we start the project then it asks for Accounting year then when you select the the year then the database folder which related to this year must be selected for operation...
Please help me i m waiting...
Thank you...
Posted

You will find a script to take database backup Here[^]
For finding correct connection string visit here[^]
 
Share this answer
 
All of the backups made using SQL Server backup command can be taken online (when the database is in use). To understand the concepts, go through:
- http://msdn.microsoft.com/en-us/library/ms189275.aspx[^]
- http://msdn.microsoft.com/en-us/library/ms187048.aspx[^]

The actual backup can be taken with: http://msdn.microsoft.com/en-us/library/ms186865.aspx[^]. However, I don't suggest that you put this in your application. The backups should run independently from other applications. If you're using Standard or Enterprise edition of Sql Server, use the maintenance plan wizard to create a backup plan.
Also i have an problem with connection string ; as when we start the project then it asks for Accounting year then when you select the the year then the database folder which related to this year must be selected for operation...

This doesn't make sense. If you're using SQL2005 (as your tag says) application does not need to know where the database files are. It's strictly controlled by the Sql Server service.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900