Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Columnorder equals zero?
Message
 
À
10/05/2006 11:23:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01120588
Message ID:
01120719
Vues:
22
In other languages like VB they may start counting from 0. Probably it is not the case, but what is the "current" column name? Does it happen on the very first column in the loop? What is isnull(locolumn)?
(You can get it from your onerror routine, I believe)



>loColumn is the current column, as I loop through all columns (in a For Each loop).
>
>Note that this code works 99.99% of the time, and it only fails when I get a value (zero) for columnorder that is not possible, so all I'm trying to determine is how it is possible to get that zero value.
>
>Jim
>
>
>
>>What is loColumn, how do you declare/create it?
>>What is its .Name ?
>>
>>
>>>Yuri --
>>>
>>>My error is caused specifically because columnorder = 0. The error occurs in a routine that's exporting to Excel, and the error occurs because the following statement:
>>>
	lnColIndex=loColumn.ColumnOrder
>>>	lcColName=ExcelCellName(lnColIndex)
>>>
yields a gibberish name for the Excel column, because lnColIndex is zero. My error routine captures these values when the actual error occurs at a later line.
>>>
>>>Jim
>>>
>>>>Hi James,
>>>>
>>>>What is the error message ?
>>>>Why do you think that it is caused by columnorder = 0 ?
>>>>Do you have any on error routine that can identify the line of code and the code module where the error occurs?
>>>>
>>>>
>>>>>My users are sporadically getting errors that are caused by columnorder = 0 for a column. I cannot duplicate this.
>>>>>
>>>>>What gives? I thought columnorder values were ordinal numbers 1, 2, thru n. (Note that these errors are not occurring because of any programmatic or user change to columnorder; and when the user restarts the application and tried again, all works fine.)
>>>>>
>>>>>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform