On Mon, Aug 20, 2012 at 4:20 PM, MB Software Solutions General Account
<[email protected]> wrote:
> VS 2010
>
> I'm doing the LearnDevNow videos and just got done watching the intro to
> classes.  Nothing earth shattering as I understand class design from VFP
> for years now.  But I couldn't help but wonder if there was an equivalent
> process for inserting the object with its property values into a
> dataset/cursor/table like VFP does via INSERT INTO MyCursor FROM NAME
> oRec.
-------------------

Sure.

oRecs is the collection of oRec  // MyCursor had to exist in example

// you were generating oRec somehow above.  I'll new one up and fill it
oRec orec = new oRec();
orec.dateTimeAdded = DateTime.Now;
// add other data as needed



oRecs.Add(oRec); //   Now the line you wanted to see.   INSERT INTO MyCursor

Just different syntax but in the end very similar.

I love this via LINQ myself, two params for dates are required:

                    var ListByTP =
db.ExecuteStoreQuery<InvoiceCountByTP> (  "exec InvoiceCount {0},
{1}", sDate, eDate ).ToList();

                    return ListByTP;



-- 
Stephen Russell
Sr. Analyst
Ring Container Technology
Oakland TN

901.246-0159 cell

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CAJidMYLXx6hZbKrB7x96Fm4EB1ZLb9=mn+5dfkdf0nvyo3o...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to