Click here to Skip to main content
15,885,655 members
Home / Discussions / Database
   

Database

 
GeneralRe: db backup Pin
amilapradeep15-Feb-07 23:16
amilapradeep15-Feb-07 23:16 
QuestionClear database contents Pin
Zoltan Balazs15-Feb-07 11:03
Zoltan Balazs15-Feb-07 11:03 
AnswerRe: Clear database contents Pin
-Dr_X-15-Feb-07 11:06
-Dr_X-15-Feb-07 11:06 
AnswerRe: Clear database contents Pin
Member 9615-Feb-07 11:12
Member 9615-Feb-07 11:12 
GeneralRe: Clear database contents Pin
Zoltan Balazs15-Feb-07 11:18
Zoltan Balazs15-Feb-07 11:18 
GeneralRe: Clear database contents Pin
Member 9615-Feb-07 11:29
Member 9615-Feb-07 11:29 
GeneralRe: Clear database contents Pin
Zoltan Balazs15-Feb-07 11:33
Zoltan Balazs15-Feb-07 11:33 
GeneralRe: Clear database contents Pin
Member 9615-Feb-07 11:39
Member 9615-Feb-07 11:39 
For my code for the 3rd option I just made a helper method to delete the tables with the option of passing a generic List of ID's, then I can just pass that method a table name, it takes care of emptying it and optionally a list with one or more id's which it then constructs into a different format delete to keep the records id'd.

I know it's messy and not really programming to have to keep track of and work with the database schema, but there's no getting around it. You really do have to take the time to determine the correct order to delete those tables and always keep it in mind when adding new tables etc. It's easy to add a new table or feature to a program and then find out later from the end user that the erase database function is now broken. It helps to put it all in one place, the code that creates the schema updates and the code that does the table deletion and also make sure you have a schema level version number in your database itself so that you can handle properly database schema versionsing between your code and the database.

This means you can then put delete and table creation blocks in regions flagged with the db schema version number.

It means nothing at first release, but it's critical down the road for updates.
GeneralRe: Clear database contents Pin
Zoltan Balazs15-Feb-07 11:42
Zoltan Balazs15-Feb-07 11:42 
GeneralRe: Clear database contents Pin
Member 9615-Feb-07 11:47
Member 9615-Feb-07 11:47 
GeneralRe: Clear database contents Pin
Zoltan Balazs15-Feb-07 11:52
Zoltan Balazs15-Feb-07 11:52 
Questionautocomplete using large lookup table Pin
AndrusM15-Feb-07 8:52
AndrusM15-Feb-07 8:52 
AnswerRe: autocomplete using large lookup table Pin
-Dr_X-15-Feb-07 10:55
-Dr_X-15-Feb-07 10:55 
GeneralRe: autocomplete using large lookup table Pin
AndrusM16-Feb-07 3:09
AndrusM16-Feb-07 3:09 
AnswerRe: autocomplete using large lookup table Pin
Keith Worden16-Feb-07 6:08
Keith Worden16-Feb-07 6:08 
GeneralRe: autocomplete using large lookup table Pin
AndrusM16-Feb-07 6:16
AndrusM16-Feb-07 6:16 
GeneralRe: autocomplete using large lookup table Pin
Keith Worden16-Feb-07 6:23
Keith Worden16-Feb-07 6:23 
QuestionTransaction on Dataset in ADO.net Pin
Neeraj_Maurya15-Feb-07 5:37
Neeraj_Maurya15-Feb-07 5:37 
AnswerRe: Transaction on Dataset in ADO.net Pin
Colin Angus Mackay15-Feb-07 13:47
Colin Angus Mackay15-Feb-07 13:47 
Questiongetting data from the DB Pin
minkinin15-Feb-07 2:25
minkinin15-Feb-07 2:25 
AnswerRe: getting data from the DB Pin
Member 9615-Feb-07 11:42
Member 9615-Feb-07 11:42 
QuestionTrigger examples needed Pin
Saira Tanwir14-Feb-07 14:28
Saira Tanwir14-Feb-07 14:28 
AnswerRe: Trigger examples needed Pin
subai14-Feb-07 18:11
subai14-Feb-07 18:11 
AnswerRe: Trigger examples needed Pin
Colin Angus Mackay14-Feb-07 22:39
Colin Angus Mackay14-Feb-07 22:39 
QuestionDelete row Pin
kani9814-Feb-07 11:23
kani9814-Feb-07 11:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.