I am working with Sqlite Database.
In my database
I have some filed Like, Invoice,Name,Date
My Invoiceno datatype is INTEGER,
In Select query Got output like this.
Query:(
{
InvoiceNo = 1;
Name : ABC
Date = "2012-04-16 00:00:00";
}
)
But when try to Get that Invoice no to string it's given Diff. Value.
Code for getting invoice from array to String:
NSString *str = [NSString stringWithFormat:@"%i",[[Query objectAtIndex:indexPath.row] valueForKey:@"InvoiceNo"]];
NSLog(@"str:%@",str);
Here, My invoice no is 1, & It's give me a value "2387056"
Please, Help me..How can i solve this problem?