Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set default value for field?
Message
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00818645
Message ID:
00818646
Views:
19
Hi Jeff,

You're right, it *is* easy. (bg)

I just went into a table with several DateTime columns, and entered

getdate()

into the Default Value section of the Table Designer for three of them. SQL Server saved the table just fine (albeit placing an extra set of parentheses around what I typed).

Could you possibly have a trigger or a formula specified for the column in question?


>This is easy in FoxPro, of course, so I'm thinking it must be just as easy in MS-SQL, and that I only need to find out the right syntax.
>
>I've created a DateTime field, and I want it to automatically populate with the current system date & time when a record is added.
>
>Trouble is, whenever I try to enter anything—anything at all—into the Default Value field in Table Designer, I get an error: "Error validating the default for column 'tPaymentReceivedDate'."
>
>What's an overworked genius to do?
>
>TIA,
>Jeff
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform