Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

addnew() & Addnew("Name")

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support
View previous topic :: View next topic  
Author Message
grr



Joined: 18 Sep 2011
Posts: 11

PostPosted: Tue Oct 29, 2013 3:53 am    Post subject: addnew() & Addnew("Name") Reply with quote

Probably a dumb question but how do you implement the Addnew function?
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 4972

PostPosted: Tue Oct 29, 2013 7:15 am    Post subject: Reply with quote

You can just call AddNew on a VirtualRecordset. This returns a new VirtualRecord which you can then just set the fields for and the call the Update() to commit the changes (or CancelUpdate to cancel) eg

VirtualRecord vr = virtualRecordset.AddNew();
vr["Name"] = "foo";
vr.Update(true);
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
grr



Joined: 18 Sep 2011
Posts: 11

PostPosted: Tue Oct 29, 2013 10:44 pm    Post subject: Reply with quote

Thanks Support.

Exactly what I was after.

I like VDO and I am going to invest in it.

Regards....
grr
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Data Objects Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group