Click here to Skip to main content
16,006,348 members
Home / Discussions / Database
   

Database

 
AnswerRe: How to retrieve binary file from Sql Server database to hard disk using SQL? Pin
Ahmad Safwat19-Jul-10 1:25
Ahmad Safwat19-Jul-10 1:25 
AnswerRe: How to retrieve binary file from Sql Server database to hard disk using SQL? Pin
PIEBALDconsult19-Jul-10 3:59
mvePIEBALDconsult19-Jul-10 3:59 
GeneralRe: How to retrieve binary file from Sql Server database to hard disk using SQL? Pin
Luc Pattyn19-Jul-10 4:40
sitebuilderLuc Pattyn19-Jul-10 4:40 
GeneralRe: How to retrieve binary file from Sql Server database to hard disk using SQL? Pin
PIEBALDconsult19-Jul-10 4:58
mvePIEBALDconsult19-Jul-10 4:58 
GeneralRe: How to retrieve binary file from Sql Server database to hard disk using SQL? Pin
Luc Pattyn19-Jul-10 5:19
sitebuilderLuc Pattyn19-Jul-10 5:19 
QuestionCreate a virtual table for form RecordSource Pin
john john mackey16-Jul-10 7:09
john john mackey16-Jul-10 7:09 
AnswerRe: Create a virtual table for form RecordSource Pin
Mycroft Holmes16-Jul-10 12:07
professionalMycroft Holmes16-Jul-10 12:07 
GeneralRe: Create a virtual table for form RecordSource Pin
Goutam Patra16-Jul-10 19:57
professionalGoutam Patra16-Jul-10 19:57 
GeneralRe: Create a virtual table for form RecordSource Pin
john john mackey19-Jul-10 9:47
john john mackey19-Jul-10 9:47 
GeneralRe: Create a virtual table for form RecordSource Pin
john john mackey19-Jul-10 9:48
john john mackey19-Jul-10 9:48 
AnswerRe: Create a virtual table for form RecordSource Pin
Bernhard Hiller22-Jul-10 20:16
Bernhard Hiller22-Jul-10 20:16 
QuestionCall Sp inside a SP and count the number of rows returned by the SP Pin
Kit Fisto15-Jul-10 23:28
Kit Fisto15-Jul-10 23:28 
AnswerRe: Call Sp inside a SP and count the number of rows returned by the SP Pin
Goutam Patra16-Jul-10 3:15
professionalGoutam Patra16-Jul-10 3:15 
GeneralRe: Call Sp inside a SP and count the number of rows returned by the SP Pin
Kit Fisto16-Jul-10 4:45
Kit Fisto16-Jul-10 4:45 
Questionvulnerability Pin
sowjanya315-Jul-10 22:07
sowjanya315-Jul-10 22:07 
AnswerRe: vulnerability Pin
Scubapro16-Jul-10 0:40
Scubapro16-Jul-10 0:40 
AnswerRe: vulnerability Pin
Mycroft Holmes16-Jul-10 12:02
professionalMycroft Holmes16-Jul-10 12:02 
GeneralRe: vulnerability Pin
sowjanya320-Jul-10 18:44
sowjanya320-Jul-10 18:44 
QuestionVery Tough CSV Data Import to SQL 2005 DB Table Challenge Pin
dsabjp14-Jul-10 16:54
dsabjp14-Jul-10 16:54 
AnswerRe: Very Tough CSV Data Import to SQL 2005 DB Table Challenge Pin
Mycroft Holmes14-Jul-10 19:33
professionalMycroft Holmes14-Jul-10 19:33 
GeneralRe: Very Tough CSV Data Import to SQL 2005 DB Table Challenge Pin
dsabjp17-Jul-10 16:37
dsabjp17-Jul-10 16:37 
QuestionIN Clause Best Practices? [solved] Pin
Dan Mos14-Jul-10 6:41
Dan Mos14-Jul-10 6:41 
Hy,

I have a problem in that I don't know what to choose.

We have somewhere DataLayer/BussinessLogic something like:
C#
public class MainClass{
.
.
.
protected ObservableCollection<SecondaryClass> lst;//contected to the main class through IDs in the DB
.
.
.
}


So the question is:

What is the best way to get some rows based on a array/list of IDs from the "main" table:
1) Getting all the MainClass rows/objects than generating a string from code(c#) using StringBuilder with all the IDs separated by commas and run a query/storedproc to get all objects from the realted
table(s) with a string/varchar paramter for the IN clause and fill the list of SecondaryClass objects from the MainClass or
2) Generate a temporary table with the IDs and use that in another
query/proc as the IN or EXISTS filter?

I've run some tests and for some reason or another from the speed point of view the first one is
the winner. But both are pretty fast. So speed alone is not that big of an issue.

Because of the Object Model we can not use a join. I mean we could but makes no sence.

Any suggestions will be apreciated.

Thanks
I bug
modified on Wednesday, July 14, 2010 1:47 PM

AnswerRe: IN Clause Best Practices? Pin
Eddy Vluggen14-Jul-10 7:10
professionalEddy Vluggen14-Jul-10 7:10 
GeneralRe: IN Clause Best Practices? Pin
Dan Mos14-Jul-10 7:24
Dan Mos14-Jul-10 7:24 
GeneralRe: IN Clause Best Practices? Pin
Eddy Vluggen14-Jul-10 7:35
professionalEddy Vluggen14-Jul-10 7:35 

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.