Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi there,

I successfully create Windows base application with Sql Service-based database.

My application work great.

The only i have problem with "How can I take Sql backup from that application"
When I fired normal SQL Sever Backup query its doesn't allow me to take backup because of I am using .mdf/.ldf database.

I google it; and somewhere it show me we can't take backup of .mdf file. only way we just copy/paste that .mdf file. But its not secure way to take backup; anyone can open that .mdf file from sql server and know which logic i used in it.

please help me out from this problem.
Posted

1 solution

Not sure if it'll fix your problem...but have a look here: Backing up an SQL Database in C#[^]
I've not tried it with attached MDF files.
 
Share this answer
 
Comments
Nilesh Dalvi 15-Jul-15 1:38am    
Is there any other way to use database with winform?

But after deployed and install on Client Machine[which don't have any SQL server Studio] ; user can able to take database backup.


I am searching for answer since more than 6-7 months...and I posted this question to lots of webpages... but i amaze no one can reply to my question
OriginalGriff 15-Jul-15 7:48am    
If he doesn't have SQL Server, how is the application working at all?

If you mean he doesn't have SQL Server Management Studio so he needs a software solution then try looking at the link I gave you.
Nilesh Dalvi 17-Jul-15 15:19pm    
My Winform application is only 50 MB in size... Just having 2-3 contact details forms.
So... for just 50 MB of Winform application .. installing whole SQL is not a good idea, isn't it?
OriginalGriff 17-Jul-15 15:35pm    
Depends.
If the application needs multiple users accessing the same database, then yes - you need a server based solution (MSSQL or MySql). You can do it with Access - but it gives a lot of problems.

So... What is your application doing?
Nilesh Dalvi 19-Jul-15 14:30pm    
* Only one user is using this application

Basically My application is based on accounting management system; My client have 500+ of LIC(Life Insurance Policy) member.
He do some task like ...
1. Adding 10-15 member on each day.
2. Record Paid Policy Client's Member by day by day
and finally
At the end of day 3. Print Report of as par day.

its generally having 4-5 forms and 5 tables in SQL database.
[with Access database I can't handle Sql Parameters tasks that's why I go with SQL Database]

please help me out from this...
How I can backup database OR Is there any other way to take database backup securely [but I will nt go & install SQL on client machine]

there are too much winform application which save our data & backup database without installing SQL Server

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