Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get default values
Message
De
13/04/2000 16:23:00
 
 
À
13/04/2000 14:43:43
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00358965
Message ID:
00359484
Vues:
25
To clarify my question: VFP front-end, SQLServer backend.

In my VFP application, I would like to be able to press the "New Record" button and that new record be filled with the default values. But I don't want it to be actually added to the table until I press "Save".

Of course I could just APPEND BLANK in VFP and programmatically fill the default values, but if I want to change a default, I have to recompile and besides I thought it would be best to use the SQLServer default values since I entered them there anyway!

So what I'm going to try is something like this:

BEGIN TRANSACTION
INSERT INTO table DEFAULT VALUES
SELECT fieldlist FROM table WHERE idfield = @@IDENTITY
ROLLBACK




>I'm not quite sure that I understand the question but using
>
>INSERT INTO table DEFAULT VALUES
>
>will create a new row in the table and all the columns will contain defaults, NULLs, timestamps, or IDENTITY values depending on how the column was defined.
>
>-Mike
Sylvain Demers
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform