Re: DataTable Processing
From: Fred Nelson (fred_at_smartybird.com)
Date: 07/30/04
- Next message: gavin: "Re: Time always set to 12:00"
- Previous message: Cor Ligthert: "Re: Type Casting"
- In reply to: Lucas Tam: "Re: DataTable Processing"
- Next in thread: Lucas Tam: "Re: DataTable Processing"
- Reply: Lucas Tam: "Re: DataTable Processing"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 30 Jul 2004 14:09:25 -0400
Lucas:
Thanks VERY much for your help with this - I now have the info I need to
move forward.
>> Are you sure you looked all over MSDN? ; )
It must be there somewhere - I spent two hours last night looking at
examples and writing code that didn't work. After another two hours
this morning I made the post. I know that I'm a "newby" so that's
part/most of it - also the examples I found sooner or later ended up
talking about binding, XML, or other things above and beyond what I
needed.
I've noticed that very often there aren't good examples of simple
things. I have a bunch of books that seem to skip over the elementary
steps and immediately teach "binding to XML remote procedure calls that
access stored procedures after generating the meta data to implement a
concurrent backup"!
Sorry for that - I'm tired!!!
Anyhow: Thanks very much for your help!
Fred
Lucas Tam wrote:
> Fred Nelson <fred@smartybird.com> wrote in
> news:OPghfoldEHA.724@TK2MSFTNGP10.phx.gbl:
>
>
>>1) Go to the top and process sequentially in the order of the primary
>>key: (logically)
>>
>> datatable.gototop
>> while datatable.read
>> // actions
>> end while
>
>
> Use the DataTable.Select method to return an array of DataRows. Then you
> can loop through the array.
>
> OR
>
> Apply a DataView to the Datatable, ordering by the PK. Loop through the
> PK.
>
>
>
>
>>2) perfrom a direct lookup:
>>
>> dim soughtkey as string = "ABC"
>>
>> datable.read.keyvalue = soughtkey
>> if found
>> // process found
>> else
>> // process not found
>> endif
>>
>>I've looked all over MSDN and the web and can't find any examples of
>>how
>> to do this so any and all help would be GREATLY appreciated!
>
>
> Use the .Find method, or .Select or a Dataview.
>
> Are you sure you looked all over MSDN? ; )
>
- Next message: gavin: "Re: Time always set to 12:00"
- Previous message: Cor Ligthert: "Re: Type Casting"
- In reply to: Lucas Tam: "Re: DataTable Processing"
- Next in thread: Lucas Tam: "Re: DataTable Processing"
- Reply: Lucas Tam: "Re: DataTable Processing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|