What language are you using?  Can't you do a dynamic array?

> -----Original Message-----
> From: John Newby [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 13, 2006 7:37 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How do you find out the names of the 
> fields within
> a table?
> 
> 
> Yeah I can get the names, but I need to put them in an array, 
> and to put
> them in an array I need to know the size of the array to 
> store them in, so I
> need to get a count first, then store this number as the size 
> of the array
> before I store the values into the array.
> 
> Many thanks
> 
> John
> 
> On 13/07/06, Christian Smith <[EMAIL PROTECTED]> wrote:
> >
> > John Newby uttered:
> >
> > > Hi, how can I find out the names of the fields within a 
> given table?
> > >
> > > I've tried "pragma table_info(test);"
> > >
> > > but this brings back too much info, I just require the 
> names as I'll be
> > > storing them in an array within my application.
> >
> >
> > Then just cherry pick the information you require. You get 
> a result set
> > from the pragma, and the column name is the second field. 
> Not difficult.
> >
> >
> > >
> > > Many thanks
> > >
> > > John
> > >
> >
> > --
> >      /"\
> >      \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
> >       X                           - AGAINST MS ATTACHMENTS
> >      / \
> >
> 

Reply via email to