Click here to Skip to main content
15,921,959 members
Home / Discussions / Database
   

Database

 
QuestionDuplicate in join Pin
gnjunge2-Dec-08 2:25
gnjunge2-Dec-08 2:25 
AnswerRe: Duplicate in join Pin
Wendelius2-Dec-08 2:52
mentorWendelius2-Dec-08 2:52 
GeneralRe: Duplicate in join Pin
gnjunge2-Dec-08 2:57
gnjunge2-Dec-08 2:57 
GeneralRe: Duplicate in join Pin
Wendelius2-Dec-08 3:11
mentorWendelius2-Dec-08 3:11 
AnswerRe: Duplicate in join [modified] Pin
Blue_Boy2-Dec-08 9:11
Blue_Boy2-Dec-08 9:11 
GeneralRe: Duplicate in join Pin
gnjunge2-Dec-08 20:21
gnjunge2-Dec-08 20:21 
GeneralRe: Duplicate in join Pin
Blue_Boy3-Dec-08 0:24
Blue_Boy3-Dec-08 0:24 
QuestionPassing multiple records to one stored proc Pin
Hamed Musavi2-Dec-08 1:05
Hamed Musavi2-Dec-08 1:05 
In many to many relationships, I often need to add one record into a table and then insert multiple records into another table and finally connect them using a third table.

All these data are related to each other and either all or non shall be saved. To do this I have to use transactions and rollback upon failure.

To do transactions I can either do it inside my stored procedures(sql) or inside application(ado.net). If I do it in my application it will increase communication with database over network since for each record I call a sp remotely and transfer data.

If I use transaction inside a stored procedure(and I prefer this), I have to pass all data related to one insert to that proc which includes multiple records(one to many relationship).

The problem here is: What is the best way of passing multiple records to one stored procedure? using an nVarchar parameter and splitting data inside the proc is not my favorite way, if there is any other way around?

If there is a better way of doing the whole thing instead of passing one parameter or using ado.net transactions I'm eagerly waiting to hear. Smile | :)


Thanks a lot in advanced.Rose | [Rose]

"In the end it's a little boy expressing himself."    Yanni


AnswerRe: Passing multiple records to one stored proc Pin
Ben Fair2-Dec-08 4:12
Ben Fair2-Dec-08 4:12 
GeneralRe: Passing multiple records to one stored proc Pin
Hamed Musavi2-Dec-08 4:57
Hamed Musavi2-Dec-08 4:57 
GeneralRe: Passing multiple records to one stored proc Pin
Wendelius2-Dec-08 10:25
mentorWendelius2-Dec-08 10:25 
AnswerRe: Passing multiple records to one stored proc Pin
Wendelius2-Dec-08 10:22
mentorWendelius2-Dec-08 10:22 
GeneralRe: Passing multiple records to one stored proc Pin
Hamed Musavi2-Dec-08 19:02
Hamed Musavi2-Dec-08 19:02 
GeneralRe: Passing multiple records to one stored proc Pin
Wendelius3-Dec-08 7:09
mentorWendelius3-Dec-08 7:09 
GeneralRe: Passing multiple records to one stored proc Pin
Hamed Musavi3-Dec-08 9:10
Hamed Musavi3-Dec-08 9:10 
GeneralRe: Passing multiple records to one stored proc Pin
Wendelius3-Dec-08 9:39
mentorWendelius3-Dec-08 9:39 
GeneralRe: Passing multiple records to one stored proc Pin
Hamed Musavi3-Dec-08 9:48
Hamed Musavi3-Dec-08 9:48 
GeneralRe: Passing multiple records to one stored proc Pin
Wendelius3-Dec-08 10:06
mentorWendelius3-Dec-08 10:06 
GeneralRe: Passing multiple records to one stored proc Pin
Ben Fair3-Dec-08 3:59
Ben Fair3-Dec-08 3:59 
GeneralRe: Passing multiple records to one stored proc Pin
Wendelius3-Dec-08 7:20
mentorWendelius3-Dec-08 7:20 
QuestionIMAGE IN SQL REPORTING SERVICES Pin
member272-Dec-08 1:02
member272-Dec-08 1:02 
AnswerRe: IMAGE IN SQL REPORTING SERVICES Pin
ChandraRam2-Dec-08 2:14
ChandraRam2-Dec-08 2:14 
GeneralRe: IMAGE IN SQL REPORTING SERVICES Pin
member272-Dec-08 4:45
member272-Dec-08 4:45 
GeneralRe: IMAGE IN SQL REPORTING SERVICES Pin
Ben Fair3-Dec-08 4:02
Ben Fair3-Dec-08 4:02 
QuestionOleDb? Pin
dec821-Dec-08 20:03
dec821-Dec-08 20:03 

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.