|
-
February 26th, 2006, 07:23 PM
#1
Default value doesnt work?
This is a wierd one - maybe I dont understand it (most likely)
I have 2 tables.
table 1 has a field of which a default value has been given in the design of the table.
this works perfect, so if i leave this specific field blank by default, it fills the blank value in as set in the "Default Value"
cool!
table 2 has a relationship to table 1 by ID. so table1.ID is the primary key.
in table 2 there is also another field, and as with table 1 I made a default value for this new field.
thing is, for some reason its not working. So if i leave this field blank, the "Default Value" will not kick in at all.
what am I doing wrong?
-
February 27th, 2006, 04:21 AM
#2
Re: Default value doesnt work?
How is your table schema written? Have you actually set a default for this field?
Regards
I don't mind that you think slowly but I do mind that you are publishing faster than you think. Wolfgang Pauli, physicist, Nobel laureate (1900-1958)
-
February 27th, 2006, 04:24 AM
#3
Re: Default value doesnt work?
Please show the db-schema (the create table scripts), the pk-fk relationships and the query that you use to test this functionality.
It should not happen as long as the relationship is not invalidated! What database server are you using?
Can you help me with my homework assignment?, Before you post!, Use code tags, How to post!, Codeguru technical FAQs, C++ FAQ Lite, Stroustrup: C++ Style and Technique FAQ, Guru of the Week, Comeau C and C++ FAQs, Comeau C++ Templates FAQs, CUJ @ DDJ, Spam threshold
My Blogs : Learning C++ is fun | Abnegator's reflections
Open Threads : C++ Aha! Moments | Nature of work in C++?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|