Click here to Skip to main content
15,905,593 members
Home / Discussions / C#
   

C#

 
AnswerRe: what is the difference between these two lines in c# Pin
OriginalGriff26-Jan-11 21:15
mveOriginalGriff26-Jan-11 21:15 
GeneralRe: what is the difference between these two lines in c# Pin
Pravin Patil, Mumbai26-Jan-11 21:24
Pravin Patil, Mumbai26-Jan-11 21:24 
GeneralRe: what is the difference between these two lines in c# Pin
OriginalGriff26-Jan-11 21:26
mveOriginalGriff26-Jan-11 21:26 
GeneralRe: what is the difference between these two lines in c# Pin
nithla26-Jan-11 21:30
nithla26-Jan-11 21:30 
AnswerRe: what is the difference between these two lines in c# Pin
Pravin Patil, Mumbai26-Jan-11 21:25
Pravin Patil, Mumbai26-Jan-11 21:25 
QuestionDataset Question Pin
eddieangel26-Jan-11 11:09
eddieangel26-Jan-11 11:09 
AnswerRe: Dataset Question Pin
RobCroll26-Jan-11 12:51
RobCroll26-Jan-11 12:51 
GeneralRe: Dataset Question Pin
eddieangel26-Jan-11 12:58
eddieangel26-Jan-11 12:58 
It is a good point about the actual datasheet / table, but it actually is outside the scope of my question. The bigger question is one of how to load information into my data table based on the values in the spreadsheet.

Example:

Spreadsheet might look like this

Column1
---------
123
125
129
133
135

And the query for the datatable should look something like this:

select category, item from itemsTable
where itemId = @itemId

At this point I could loop through the values in Column1, whether they are loaded into a datatable, looping through a spreadsheet, whatever. The end result is that I need a datatable that contains the category and item from the items table for every itemId value in the spreadsheet. So the question is whether it is acceptable to use the IN keyword in my dataset query and supply it a list of values as a variable (e.g. instead of where itemId = @itemId, where itemId in (@itemId)) maybe a variable comma separated list?

Or do I need to loop through the source (datatable, excel spreadsheet, whatever) and reload the items datatable for each distinct value in the spreadsheet and process? I am not sure I am getting the point across very well. I guess the real question here is whether you can use the IN keyword and supply an array or comma separated string when loading data with a table adapter or whether you can only use equality with a single value.
GeneralRe: Dataset Question Pin
RobCroll26-Jan-11 13:22
RobCroll26-Jan-11 13:22 
GeneralRe: Dataset Question Pin
eddieangel26-Jan-11 13:30
eddieangel26-Jan-11 13:30 
GeneralRe: Dataset Question Pin
RobCroll26-Jan-11 14:43
RobCroll26-Jan-11 14:43 
AnswerRe: Dataset Question Pin
PIEBALDconsult26-Jan-11 13:46
mvePIEBALDconsult26-Jan-11 13:46 
GeneralRe: Dataset Question Pin
eddieangel26-Jan-11 13:48
eddieangel26-Jan-11 13:48 
GeneralRe: Dataset Question Pin
PIEBALDconsult26-Jan-11 14:11
mvePIEBALDconsult26-Jan-11 14:11 
Questionwhat the code of this Pin
Nabawoka26-Jan-11 11:04
Nabawoka26-Jan-11 11:04 
AnswerRe: pleaaaaaaaase important and now iam in exam online the solution of this ????? Pin
Pete O'Hanlon26-Jan-11 11:11
mvePete O'Hanlon26-Jan-11 11:11 
AnswerRe: pleaaaaaaaase important and now iam in exam online the solution of this ????? Pin
TheGreatAndPowerfulOz26-Jan-11 11:11
TheGreatAndPowerfulOz26-Jan-11 11:11 
AnswerRe: what the code of this Pin
Paladin200026-Jan-11 11:22
Paladin200026-Jan-11 11:22 
GeneralRe: what the code of this Pin
Pete O'Hanlon26-Jan-11 11:26
mvePete O'Hanlon26-Jan-11 11:26 
GeneralRe: what the code of this Pin
Nabawoka26-Jan-11 11:26
Nabawoka26-Jan-11 11:26 
GeneralRe: what the code of this Pin
AspDotNetDev26-Jan-11 11:31
protectorAspDotNetDev26-Jan-11 11:31 
GeneralRe: what the code of this Pin
Nabawoka26-Jan-11 11:34
Nabawoka26-Jan-11 11:34 
GeneralRe: what the code of this Pin
TheGreatAndPowerfulOz26-Jan-11 11:49
TheGreatAndPowerfulOz26-Jan-11 11:49 
AnswerDon't bother answering this question. Pin
Pete O'Hanlon26-Jan-11 11:24
mvePete O'Hanlon26-Jan-11 11:24 
AnswerRe: what the code of this PinPopular
AspDotNetDev26-Jan-11 11:29
protectorAspDotNetDev26-Jan-11 11:29 

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.