Thanks Andrew,

you are indeed correct. It's always the obvious ones that get you. My
programme now works.

Regards,

David

David RF Wohlgemuth
Graduate RF Engineer
Lucent Technologies O
GSM/UMTS RF Engineering

Trigonos,
Windmill Hill Business Park
Swindon
Wiltshire SN5 6PB
UK
e-mail: - [EMAIL PROTECTED] 
tel: *+44(0)1793897695
mobile: s+44(0)7769652997

        ----------
        From:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
        Sent:  09 August 2001 16:51
        To:  Wohlgemuth, David Remi Francois (David)
        Cc:  [EMAIL PROTECTED]
        Subject:  Re: MI-L for all mapbasic gurus

        >I am getting frustrated with a bit of code I am writing and I am
hoping
        that
        >some of you can point out what I am missing. I have added the code
below.
        >Now every time I run the programme I get a datatype mismatch error
and I
        >think it is to do with the table group_lists as it occurs when it
reaches
        >the line " fetch rec du_group from group_list"
        >
        >
        >dim xmax, xmin, ymax, ymin as float
        >dim du_group_num_rows as string
        >dim groups, du_group as integer
        >
        >    open table "grid_group_boundary"
        >    drop table "grid_group_boundary"
        >
        >    create table grid_group_boundary (max_x float, min_x float,
max_y
        >                                       float, min_y float)
        >
        >    for groups = 1 to group_num
        >         select * from du_sel where group_id = groups into
group_list
        >         commit table group_list as group_list
        >
        >         du_group_num_rows = tableinfo(group_list, Tab_Info_Nrows)
        >
        >         for du_group = 1 to du_group_num_rows
        >              fetch rec du_group from group_list


        It looks to me that you have a datatype mismatch in this statement:

          for du_group = 1 to du_group_num_rows

        du_group is dimensioned as an integer, but du_group_num_rows is
dimensioned
        as a string. I don't know why you don't get an error when
TableInfo() tries
        to put the number of rows into that string variable, but the syntax
of the
        For...Next statement explicitly calls for a numeric expression.

        



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to