Hello,

It's simple to the the maximum number of rows in a table with 

SELECT count(*) FROM table

But how to find out the number of columns for a query like:

SELECT * FROM table

My practical problem is the read callback function:

int readCallback (void *data, int argc, char **argv, 
                  char **azColName) 
{
  int i;

  for(i=0; i<argc; i++)
  {
    printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
  }
  printf("\n");
  
  return 0;
}

What if I like e.g. to write each table row into a file in one line? I
need to know when a row is finished and the next begins. I could
compare azColName, but I hope there is a better way.

regards
Andreas

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to