On Wed, Sep 23, 2009 at 03:40:33PM -0700, burferd scratched on the wall: > > In looking at the reference http://www.sqlite.org/c3ref/free_table.html > it states that the result is a pointer array that has (rows+1)*columns > elements. > > I pose a query to select items from my database table. > The function returns a row value of 5 and column value of 19. > This tells me that there should be 6*19 = 114 elements in the array of > returned values. > > However, when I attempt to access the 21st or greater element in the array, > I get an exception. > > When I look at the result in the debugger, it only shows 20 elements. > Basically, the header row plus the first element in, what should be the > first row of data returned. > > Here is the code I am using, I do not see anything wrong with it, but I > can't access the returned results. > The data base is opened properly, the query is "select * from table1". > > The code looks like this: > int rc = sqlite3_get_table(db, query, &result, &nrow, &ncol, &errmsg); > > Why cannot I access the data beyond the header row?
Because rc != SQLITE_OK? It sounds like you've got an error somewhere, so it is returning the header plus one data element and/or the header plus one NULL element. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users