Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get default values
Message
From
18/10/2001 09:53:25
 
 
To
13/04/2000 16:23:00
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00358965
Message ID:
00570218
Views:
20
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform