Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how we can fetch all record from Amazonsimpledb using next token please give me complete code I am using dll.

I am using below code please help me where I will use next token to fetch the all records

C#
public static void GetItemByQuery(AmazonSimpleDB simpleDBClient)
       {






           SelectResponse response = simpleDBClient.Select(new SelectRequest() {
               SelectExpression = "Select * from " + TableName
           });
           String res = TableName + " has: ";
           Console.Out.WriteLine(res);

           foreach (Item item in response.SelectResult.Item)
           {
               res = item.Name + ": ";
               foreach (Amazon.SimpleDB.Model.Attribute attribute in item.Attribute)
               {
                   res += "{" + attribute.Name + ", " + attribute.Value + "}, ";
               }
               res = res.Remove(res.Length - 2);
               Console.Out.WriteLine(res);
           }


       }
Posted
Updated 8-May-13 23:05pm
v2
Comments
Orcun Iyigun 9-May-13 4:19am    
Complete code :) Nice..

1 solution

Here is your assignment. Start from here the documentation:
Query 101: Building Amazon SimpleDB Queries[^]
Next Token mechanism sample code in C#:
Reading All Items from an Amazon SimpleDB Query Result [^]

I will not provide the complete code for you. Which is your work to implement. So read the materials that I suggest you and I am sure you will find your way to implement it.

Good luck,
OI
 
Share this answer
 
Comments
joti parkash 9-May-13 5:06am    
I am below code please help me where I will use the nexttoken

public static void GetItemByQuery(AmazonSimpleDB simpleDBClient)
{






SelectResponse response = simpleDBClient.Select(new SelectRequest() {
SelectExpression = "Select * from " + TableName
});
String res = TableName + " has: ";
Console.Out.WriteLine(res);

foreach (Item item in response.SelectResult.Item)
{
res = item.Name + ": ";
foreach (Amazon.SimpleDB.Model.Attribute attribute in item.Attribute)
{
res += "{" + attribute.Name + ", " + attribute.Value + "}, ";
}
res = res.Remove(res.Length - 2);
Console.Out.WriteLine(res);
}


}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900