Thought I had this working, but turns out I don't.
I set the defaults in SQL. If I add new entries to the table via
Entreprise Manager, the defaults are ok.
If I add from my ADP, all the values stay at false!
Below is a test script to show what I mean.
I two different results
A) SQL
I go to Entreprise Manager, do Open Table, return all rows. Add new
entries. BooleanB and BooleanC will be True.
B) ADP
Open the aaaTable in my ADP, add new rows, all 3 Boolean values will be
False.
This is doing my head in!
Any help appreciated.
Diarmuid
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[aaaTable]') and OBJECTPROPERTY(id, N'IsUserTable') =
1)
drop table [dbo].[aaaTable]
GO
CREATE TABLE [dbo].[aaaTable] (
[MessID] [int] IDENTITY (1, 1) NOT NULL ,
[BooleanA] [bit] NULL ,
[BooleanB] [bit] NULL ,
[BooleanC] [bit] NULL ,
[MessText] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
Robert Morley said:
Yeah, that's another annoying thing about SQL...try using 1 instead,
that'll do it.
Rob
Acutally, I have one more question.
The table won't accept True as a default value. What should I be using?
Thanks
Diarmuid