John Newby uttered:

Hi Christian,

Nope VB is the best they can come up with, and it's only version 2002, they
can't even get the latest edition so I have to work with an outdated wrapper
aswell.


The standards of education these days. Still, it's better than the F77 my uni shoved down our throats only 10 years ago.



I was reading your reply regarding the Max(id) thread, I was wondering if I
could use this for my query.

The pragma table_info(test) command returns 6 columns, the second being the
name column which is what I want.

The first being cid column which numbers the fields, if I could somehow
select the max from the cid column and then add 1 that wuold give me the
total fields in my table and I could use this in my array.

Do you know of a way I can do a select on the information brought back with
the pragma command?


Don't think you can.

Why not just run the pragma twice, once to count the number of columns, allocate the array, then again to fill the array. It's not a heavyweight operation.



Many thanks

John

On 13/07/06, Christian Smith <[EMAIL PROTECTED]> wrote:

John Newby uttered:

> Hi Martin, I'm not sure, I don't use VB that often, I just need to use
it
> for my Uni project at the moment.


With all due respect to your University, but VB sucks as a teaching
language IMO. Doesn't your Uni have better development tools? Any
professor that advocates VB is not worthy of the title.


>
> Many thanks
>
> John.
>
> On 13/07/06, Martin Jenkins <[EMAIL PROTECTED]> wrote:
>>
>> John Newby wrote:
>> > 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.
>>
>> Are you sure there no dynamic container objects in VB that support an
>> "append" method? Lists?
>>
>> If not (and I find that hard to believe) you could hack around it by
>> appending the names to a string, then parsing the string and then
>> dimensioning your array, or you could build a linked list but ...
surely
>> VB has more intelligent containers than statically sized arrays?
>>
>> Martin
>>
>

--
     /"\
     \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
      X                           - AGAINST MS ATTACHMENTS
     / \



--
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \

Reply via email to