[dba-SQLServer]SQL Server default value not happening

Billy Pang tuxedo_man at hotmail.com
Mon Mar 3 15:03:26 CST 2003


Try running this via query analyzer.  It will tell you whether there is a 
default constraint for the column in question:

SELECT TABLE_NAME, COLUMN_NAME, COLUMN_DEFAULT FROM 
INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME = 'type_in_column_name_here';

Billy

>From: "John W. Colby" <jcolby at colbyconsulting.com>
>Reply-To: dba-sqlserver at databaseadvisors.com
>To: <dba-sqlserver at databaseadvisors.com>
>Subject: RE: [dba-SQLServer]SQL Server default value not happening
>Date: Thu, 27 Feb 2003 09:18:19 -0500
>
>No, I understand that.  It is NOT being set AT ALL in the created record
>from inside the ADP.  That's how I discovered it wasn't being set.  This
>case is my active flag which must be set to see records.  Three records
>created yesterday were mysteriously missing.  The answer... the active flag
>is not being set true by default when the record is created.
>
>Further, IN DESIGN VIEW in the ADP, the default value doesn't show.
>
>John W. Colby
>Colby Consulting
>www.ColbyConsulting.com
>
>-----Original Message-----
>From: dba-sqlserver-admin at databaseadvisors.com
>[mailto:dba-sqlserver-admin at databaseadvisors.com]On Behalf Of Arthur
>Fuller
>Sent: Thursday, February 27, 2003 9:09 AM
>To: dba-sqlserver at databaseadvisors.com
>Subject: RE: [dba-SQLServer]SQL Server default value not happening
>
>
>I assume that you mean the SQL level default value rather than the Access
>level default. If so, I don't think you'll see it set until after you save
>the row. Same behaviour as ANPK values.
>
>-----Original Message-----
>From: dba-sqlserver-admin at databaseadvisors.com
>[mailto:dba-sqlserver-admin at databaseadvisors.com] On Behalf Of John W. 
>Colby
>Sent: February 27, 2003 7:41 AM
>To: AccessD
>Cc: AccessD-SQLServer
>Subject: [dba-SQLServer]SQL Server default value not happening
>
>I upsized my client billing to SQL Server the other day.  This morning I
>noticed that a couple of flag fields in my main time table are not being 
>set
>to their default value.  I went directly into EM and created a record in 
>the
>table and the flags are correctly set there.  I opened the ADP, opened the
>table there and entered a record, and the default value is NOT being set
>correctly there.
>
>Any ideas why the default values would work in EM but not in the ADP?
>
>John W. Colby
>Colby Consulting
>www.ColbyConsulting.com
>
>----------------------------------------------------
>Is email taking over your day?  Manage your time with eMailBoss.
>Try it free!  http://www.eMailBoss.com
>
>
>_______________________________________________
>dba-SQLServer mailing list
>dba-SQLServer at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>http://www.databaseadvisors.com
>
>_______________________________________________
>dba-SQLServer mailing list
>dba-SQLServer at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>http://www.databaseadvisors.com
>
>
>
>
>----------------------------------------------------
>Is email taking over your day?  Manage your time with eMailBoss.
>Try it free!  http://www.eMailBoss.com
><< winmail.dat >

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the dba-SQLServer mailing list