Yea but how do i set <g:id> from my code is there an example in c# or vb.net. I cannot just type <g:id>
On Oct 3, 8:16 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote: > You need to use the server's assign id for the item, > otherwise it'll just be inserted again. You can verify > this with the API demo page (http://www.google.com/base/api/demo/html/ > demo.html). > If I try to insert an item with a user-defined atom:id > it gets overwritten by whatever the server assigns. > > In C# the update code would be: > GBaseEntry entry = service.GetEntry(myEntryId); > // change some attributes > service.Update(entry); > > where myEntryId is the server's <id>. > > If you want to import your own id's from the database, > I would set a custom attribute: > > <g:id>your id</g:id> > > Eric > > On Oct 3, 11:45 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > I am using the ..net class library so my line of code is > > insert.Id = New AtomId(dr("id")) where dr("id") is from my database > > > On Oct 2, 6:52 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote: > > > > Are you using an HTTP PUT to update the item? > > > Note: POST will insert it. > > > > ex: > > > PUT /feeds/items/123456789 > > > > where 123456789 is the <atom:id> that Celebird mentioned. > > > You should use the ID returned by the server. > > > > Eric > > > > On Oct 2, 3:41 pm, Celebird <[EMAIL PROTECTED]> wrote: > > > > > i believe g:id is a surrogate for inserts and updates > > > > and required for some item-types; whereas atom:id is > > > > required for deletes and is under google-base control. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Base Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Base-data-API?hl=en -~----------~----~----~----~------~----~------~--~---
