Click here to Skip to main content
15,896,154 members
Home / Discussions / Database
   

Database

 
QuestionForm Generator Pin
xoxoxoxoxoxox7-Feb-07 6:57
xoxoxoxoxoxox7-Feb-07 6:57 
QuestionSQL 2000 table size Pin
lost in transition 7-Feb-07 6:12
lost in transition 7-Feb-07 6:12 
AnswerRe: SQL 2000 table size Pin
andyharman7-Feb-07 6:51
professionalandyharman7-Feb-07 6:51 
GeneralRe: SQL 2000 table size Pin
lost in transition 7-Feb-07 9:36
lost in transition 7-Feb-07 9:36 
QuestionHelp needed in update query Pin
vidhu raj7-Feb-07 3:02
vidhu raj7-Feb-07 3:02 
GeneralRe: Help needed in update query Pin
Ware@Work7-Feb-07 4:35
Ware@Work7-Feb-07 4:35 
GeneralRe: thanks i got it worked Pin
vidhu raj7-Feb-07 5:06
vidhu raj7-Feb-07 5:06 
GeneralRe: thanks i got it worked Pin
Ware@Work7-Feb-07 9:23
Ware@Work7-Feb-07 9:23 
I am going to use the following data as a basis for the before and after examples:
Table: Contact         [Contact ID] [Name]
Row  : 1               1            user

Table: Account         [Account ID] [Name]
Row  : 1               1            file1
Row  : 2               2            file2
Row  : 3               3            file3
Row  : 4               4            file4
Row  : 5               5            file5
Row  : 6               6            file6
Row  : 7               7            file7

I am assuming the data before looks something like this:
Table: Contact Account [Contact ID] [Account ID]
Row  : 1               1            4
Row  : 2               1            7

I am assuming the data after looks something like this:
Table: Contact Account [Contact ID] [Account ID]
Row  : 1               1            2
Row  : 2               1            2

You will need to keep a copy of the original data loaded into listbox2 for comparison purposes. You need to compare the original contents to the current contents when the user clicks update.

For any items removed you will need to call a procedure that is coded like this:
CREATE PROCEDURE usp_ContactAccount_Delete
( @contactID int
, @accountID int
)
AS
DELETE FROM [Contact Account ]
WHERE [Contact ID] = @contactID
AND [Account ID] = @accountID

For any items added you will need to call a procedure that is coded like this:
CREATE PROCEDURE usp_ContactAccount_Insert
( @contactID int
, @accountID int
)
AS
INSERT INTO [Contact Account ]
( [Contact ID]
, [Account ID]
)
VALUES
( @contactID
, @accountID
)




Ware

Programmers are tools to convert caffiene to code.

QuestionAimed @ the SQL Guru's Pin
Illegal Operation7-Feb-07 1:28
Illegal Operation7-Feb-07 1:28 
AnswerRe: Aimed @ the SQL Guru's Pin
andyharman7-Feb-07 6:32
professionalandyharman7-Feb-07 6:32 
Questionchecking null values Pin
minkinin6-Feb-07 22:45
minkinin6-Feb-07 22:45 
AnswerRe: checking null values Pin
Colin Angus Mackay6-Feb-07 23:35
Colin Angus Mackay6-Feb-07 23:35 
GeneralRe: checking null values Pin
minkinin7-Feb-07 0:31
minkinin7-Feb-07 0:31 
GeneralRe: checking null values Pin
Pete O'Hanlon7-Feb-07 4:28
mvePete O'Hanlon7-Feb-07 4:28 
GeneralRe: checking null values Pin
minkinin11-Feb-07 20:23
minkinin11-Feb-07 20:23 
AnswerRe: checking null values Pin
Rakesh.Jha.01107-Feb-07 18:15
Rakesh.Jha.01107-Feb-07 18:15 
QuestionError In Query: Pin
Shahzad.Aslam6-Feb-07 20:26
Shahzad.Aslam6-Feb-07 20:26 
AnswerRe: Error In Query: Pin
gauthee6-Feb-07 20:38
gauthee6-Feb-07 20:38 
GeneralRe: Error In Query: Pin
Shahzad.Aslam6-Feb-07 20:53
Shahzad.Aslam6-Feb-07 20:53 
GeneralRe: Error In Query: Pin
gauthee6-Feb-07 22:42
gauthee6-Feb-07 22:42 
GeneralRe: Error In Query: Pin
Shahzad.Aslam6-Feb-07 23:49
Shahzad.Aslam6-Feb-07 23:49 
GeneralRe: Error In Query: Pin
Christian Graus7-Feb-07 9:28
protectorChristian Graus7-Feb-07 9:28 
GeneralRe: Error In Query: Pin
Shahzad.Aslam7-Feb-07 17:51
Shahzad.Aslam7-Feb-07 17:51 
AnswerRe: Error In Query: Pin
Christian Graus6-Feb-07 20:39
protectorChristian Graus6-Feb-07 20:39 
GeneralRe: Error In Query: Pin
Shahzad.Aslam6-Feb-07 20:49
Shahzad.Aslam6-Feb-07 20:49 

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.