Please confirm bug or please tell what I am doing wrong:
If I change column name from "Name" to "First Name" I can't insert
record. Please help me to find work around
I am getting follow Exception:
com.google.gdata.util.InvalidEntryException: Bad Request
Attribute name "name" associated with an element type
"gsx:first" must be followed by the ' = ' character.
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
(Unknown Source)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
(Unknown Source)
THIS CODE DOESN'T WORK
ListEntry newEntry = new ListEntry();
String nameValuePairs="First
Name=Rosa,phone=555-1212";
// Split first by the commas between the different fields.
for (String nameValuePair : nameValuePairs.split(",")) {
// Then, split by the equal sign.
String[] parts = nameValuePair.split("=", 2);
String tag = parts[0]; // such as "name"
String value = parts[1]; // such as "Rosa"
newEntry.getCustomElements().setValueLocal(tag, value);
}
THIS CODE WORKS
ListEntry newEntry = new ListEntry();
String nameValuePairs="Name=Rosa,phone=555-1212";
// Split first by the commas between the different fields.
for (String nameValuePair : nameValuePairs.split(",")) {
// Then, split by the equal sign.
String[] parts = nameValuePair.split("=", 2);
String tag = parts[0]; // such as "name"
String value = parts[1]; // such as "Rosa"
newEntry.getCustomElements().setValueLocal(tag, value);
} tag, value);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Docs Data APIs" 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-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---