Please help me, i was able to make may code to create a table and insert some records inside the table but i just can't retrive it or delete it thru code.
Please help me,
thnx
JFRBPH12™
It's more fun in the Philippines :)
http://www.itsmorefuninthephilippines.com/
actually, i was able to make it work now, the error is i was trying to delete to azure table in batch like
var results = from g in tableServiceContext.CreateQuery<TableEntity>("TableName")
where g.field1 == "somedata" && g.field2 == "anotherdata"
select g;
tableServiceContext.DeleteObject(results);
tableServiceContext.SaveChangesWithRetries();
Then i just found out that deleting is done in combination of per partitionKey and RowKey or per records. so i just change the query "where" clause to use partionkey and rowkey inside a loop from a list of TableEntities.
and its all done :)
thanks anyway :)
JFRBPH12™
It's more fun in the Philippines :)
http://www.itsmorefuninthephilippines.com/
Marked as answer by johnjalani on Apr 17, 2012 10:24 PM
johnjalani
Member
334 Points
554 Posts
Query a Records from Azure Table
Apr 17, 2012 02:22 AM|LINK
Hi,
Please help me, i was able to make may code to create a table and insert some records inside the table but i just can't retrive it or delete it thru code.
Please help me,
thnx
It's more fun in the Philippines :)
http://www.itsmorefuninthephilippines.com/
ignatandrei
All-Star
135204 Points
21687 Posts
Moderator
MVP
Re: Query a Records from Azure Table
Apr 17, 2012 03:58 AM|LINK
What;s the error?
johnjalani
Member
334 Points
554 Posts
Re: Query a Records from Azure Table
Apr 17, 2012 10:24 PM|LINK
Hi, thanks for your reply,
actually, i was able to make it work now, the error is i was trying to delete to azure table in batch like
var results = from g in tableServiceContext.CreateQuery<TableEntity>("TableName") where g.field1 == "somedata" && g.field2 == "anotherdata" select g; tableServiceContext.DeleteObject(results); tableServiceContext.SaveChangesWithRetries();Then i just found out that deleting is done in combination of per partitionKey and RowKey or per records. so i just change the query "where" clause to use partionkey and rowkey inside a loop from a list of TableEntities.
and its all done :)
thanks anyway :)
It's more fun in the Philippines :)
http://www.itsmorefuninthephilippines.com/