Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# database WinForm
In my application I have to provide the data security for the FireBird database file. Can any one help me how to make Database Recovery and BackUp.
I am using FireBird 2.5 database, and C#.Net 4.0 framework...
Thanks In Advance....
Posted 3-Jul-12 5:40am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
subrahmanyam1987 at 4-Jul-12 0:30am
   
Is it posible to have the back up and restore location dynamic?
Zoltán Zörgő at 4-Jul-12 8:10am
   
What do you mean by dynamic? You can specify any file location and database, thus you can make it as dynamic as you like.
subrahmanyam1987 at 4-Jul-12 8:16am
   
Thanks Zoltan, Are you working on firebird? Did You know how to write triggers in firebird? If you can I have A Bad Condition to write a trigger to update the values depends on the inserting values. Is it posible to make? If Didn't understand my point. I Will Explain if you send me you mail id!
Zoltán Zörgő at 4-Jul-12 11:26am
   
Yes, I am using firebird regularly. You can do many things with triggers, but I din't get your point. You can send me mail to paralia(at)fw(dot)hu. You will probably get a delivery error, but I should receive it. If not, I will give you an other address.
subrahmanyam1987 at 4-Jul-12 11:47am
   
Hi Zoltan,
 

 
Thanks for the reply,
 

 
actually in my current application i have to update the table depends on the row inserting , the inserting row will have a date column, I have to update the rows in the same table which after the date in the inserting row date.
 
example
 

 
my table looks like
 

 
Name Expendature TotalExpendature
 
2-jun-2012 'jhon' 1000 1000
 
3-jun-2012 'gerge' 2000 3000
 
6-jun-2012 'peter' 1000 4000
 
8-jun-2012 'jhon' 3000 7000
 

 
here if i need to insert the 5-jun-2012 day values it has to update the total in the 6-jun-2012 and later dates.
 

 

 
Can you please fix this and send me sum solution
 

 
Thanks And Regards,
 
--
Subrahmanyam
Zoltán Zörgő at 4-Jul-12 15:52pm
   
So you have to add the expendature value from the newly inserted record to all totalexpendature fields in the records having the date field greater than the date of the newly inserted record? To all, or only to that of whit the same value in the name field?
Supposing all above, here is a possible solution

SET TERM ^ ;
 
CREATE TRIGGER addExpendature FOR TABLE_NAME
ACTIVE
AFTER INSERT
AS
BEGIN
UPDATE TABLE_NAME
SET TOTALEXPENDATURE = TOTALEXPENDATURE + new.EXPENDATURE
WHERE EXPDATE > NEW.EXPDATE AND NAME=NEW.NAME;
END^
 
SET TERM ; ^

 
supposing the following structure:
CREATE TABLE TABLE_NAME
(
EXPDATE DATE,
NAME VARCHAR(20),
EXPENDATURE INTEGER,
TOTALEXPENDATURE INTEGER
)
;

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 265
1 _Amy 235
2 Peter Leow 205
3 Andreas Gieriet 180
4 Shmuel Zang 120
0 OriginalGriff 7,540
1 Sergey Alexandrovich Kryukov 6,412
2 Maciej Los 3,849
3 Peter Leow 3,653
4 CHill60 2,712


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 3 Jul 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100