Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another IndexSeek BUG?
Message
De
27/11/2003 14:08:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Another IndexSeek BUG?
Divers
Thread ID:
00854073
Message ID:
00854073
Vues:
53
I run into really weird bug (or is it a feature?) with using IndexSeeek function in a stored procedure assigned as default value for a field. In short, IndexSeek seems to clear all fields, previously filled in with default values.

To recreate the bug:

1) Create Test_StoredProcedures.prg file with following text in it:
function NewId
lparameters tcIndex
local lnId
lnId = 1
do while indexseek(lnId, .f., alias(), tcIndex)
lnId = lnId + 1
enddo
return lnId
endfunc

2) Create Test database and Test table in it:
create database test.dbc
append procedures from Test_StoredProcedures.prg
create table Test (Name C(20) default "Record # " + transform(recno()), ;
Id I default NewId('Id') primary key)

3) Try to add a new record to the table with APPEND BLANK or just by pressing {CTRL+Y} in Browse window. The Name field will be blank. Changing bufering mode or index type does not change the behavior. It is the same in VFP7 & VFP8. Weird, isn't it? Does anybody have an explanation?

Thanks.
Yuri Rudenko
MCSD, MCP
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform