Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird scenario with INSERT
Message
De
08/07/2009 12:28:56
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01410932
Message ID:
01410949
Vues:
44
>>>We haven't been able to narrow down the exact test case, but here's what is happening:
>>>
>>>We have an INSERT - SQL statement where a field/value list is specified. There are a couple of fields that aren't in the field list of the command that are being populated with values from the previous record even though the fields themselves have a zero as their default value.
>>>
>>>Example:
>>>
INSERT INTO MyTable (f1, f2, f3) VALUES (1, 2, 3)
>>>
>>>Fields f4 and f5 are being populated with values from MyTable's prior record instead of defaulting to zero.
>>>
>>>Does anyone know of any circumstances that could make this happen?
>>
>>
Set carry off
>
>Wow, there is a blast from the past. I bet that's it, too.
>
>Obviously the real solution is to specify all columns in the INSERT command and not have to worry about it.

I use Set carry on from time to time, but only in the command window when I enter new records for testing with Browse and ctrl-y.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform