Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid subscript reference
Message
De
29/08/2007 17:46:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/08/2007 17:13:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01251239
Message ID:
01251251
Vues:
15
>Hello Happy Peoples
>
>We're getting an intermitant error "Invalid subscript reference" and it points to a line of code that really doesn't make a lot of sense to me:
>
>
>(other stuff going on here)
>
>aRecs( 1)	= 0
>select recno(), MasterId from Master ;
>  where ScanCode = m.ScanCode .and. ;
>  batch + sourcecode + status = cSeek .and. ;
>  MasterId <> m.MasterId ;
>into array aRecs
>if aRecs( 1) > 0
>  dimension aMinor( nMinor + alen( aRecs, 1))  <--------- error here
>  for i=1 to alen( aRecs, 1)
>    aMinor( nMinor + i)	= lstr( aRecs( i, 1))
>    delete from MIndex where miSsn = aRecs( i, 2) .and. ;
>      left( miData, 1) $ cMICodes
>  next
>  nMinor	= nMinor + alen( aRecs, 1)
>endif
>
>Coming into this chunk o'code, nMinor = 0, but that shouldn't matter as long as aRecs has at least 1 member, should it?

Are you sure nMinor is 0 there? You are not using mdot and maybe there is a field named nMinor in current workarea.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform