Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get default values
Message
De
18/10/2001 09:53:25
 
 
À
13/04/2000 16:23:00
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00358965
Message ID:
00570218
Vues:
21
>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 know it's old but I see you didn't get a response. See if this works for you:
Select column_name, column_default 
  From information_schema.columns 
  Where table_name="mytable"
I found this through a message reference by Sergey :) HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform