Group:  Microsoft Access ยป microsoft.public.access.adp.sqlserver
Thread: Check Boxes

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Check Boxes
"Vayse" <vayse[ at ]deadspam.com> 07.07.2006 15:46:04
Hi
I read that Binary in SQL is the equivalent of Yes/No field in Access.
Yet I can't get a check box to the update the binary field. How do I go
about this?
Thanks
Diarmuid


Re: Check Boxes
"Robert Morley" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> 07.07.2006 15:55:15
Close, but no cigar. :)

A "bit" field in SQL is the equivalent of a Yes/No, not "binary". Try that,
and let us know if there are any problems.


Rob

"Vayse" <vayse[ at ]deadspam.com> wrote in message
news:urjBpvdoGHA.3900[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> Hi
> I read that Binary in SQL is the equivalent of Yes/No field in Access.
> Yet I can't get a check box to the update the binary field. How do I go
> about this?
> Thanks
> Diarmuid
>


Re: Check Boxes
"Vayse" <vayse[ at ]deadspam.com> 10.07.2006 08:14:23
hehe.
Thanks, that fixed it.

"Robert Morley" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> wrote in message
news:uR3CE3doGHA.5084[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> Close, but no cigar. :)
>
> A "bit" field in SQL is the equivalent of a Yes/No, not "binary". Try
> that, and let us know if there are any problems.
>
>
> Rob
>
> "Vayse" <vayse[ at ]deadspam.com> wrote in message
> news:urjBpvdoGHA.3900[ at ]TK2MSFTNGP04.phx.gbl...
>> Hi
>> I read that Binary in SQL is the equivalent of Yes/No field in Access.
>> Yet I can't get a check box to the update the binary field. How do I go
>> about this?
>> Thanks
>> Diarmuid
>>
>
>


Re: Check Boxes
"Vayse" <vayse[ at ]deadspam.com> 10.07.2006 08:56:31
Acutally, I have one more question.
The table won't accept True as a default value. What should I be using?
Thanks
Diarmuid


"Vayse" <vayse[ at ]deadspam.com> wrote in message
news:uUDD1g$oGHA.2444[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> hehe.
> Thanks, that fixed it.
>
> "Robert Morley" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> wrote in message
> news:uR3CE3doGHA.5084[ at ]TK2MSFTNGP03.phx.gbl...
>> Close, but no cigar. :)
>>
>> A "bit" field in SQL is the equivalent of a Yes/No, not "binary". Try
>> that, and let us know if there are any problems.
>>
>>
>> Rob
>>
>> "Vayse" <vayse[ at ]deadspam.com> wrote in message
>> news:urjBpvdoGHA.3900[ at ]TK2MSFTNGP04.phx.gbl...
>>> Hi
>>> I read that Binary in SQL is the equivalent of Yes/No field in Access.
>>> Yet I can't get a check box to the update the binary field. How do I go
>>> about this?
>>> Thanks
>>> Diarmuid
>>>
>>
>>
>
>


Re: Check Boxes
"Robert Morley" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> 10.07.2006 21:57:55
Yeah, that's another annoying thing about SQL...try using 1 instead, that'll
do it.


Rob

"Vayse" <vayse[ at ]deadspam.com> wrote in message
news:%23KEUW4$oGHA.220[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> Acutally, I have one more question.
> The table won't accept True as a default value. What should I be using?
> Thanks
> Diarmuid


Re: Check Boxes
"Vayse" <vayse[ at ]deadspam.com> 20.07.2006 11:44:51
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" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> wrote in message
news:%23eSnYyGpGHA.4848[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> Yeah, that's another annoying thing about SQL...try using 1 instead,
> that'll do it.
>
>
> Rob
>
> "Vayse" <vayse[ at ]deadspam.com> wrote in message
> news:%23KEUW4$oGHA.220[ at ]TK2MSFTNGP05.phx.gbl...
>> Acutally, I have one more question.
>> The table won't accept True as a default value. What should I be using?
>> Thanks
>> Diarmuid
>
>


Re: Check Boxes
"Robert Morley" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> 20.07.2006 18:04:19
I think ADP might allow you to save different defaults than the table does.
Try designing the table in ADP and see if it shows something different.
Also, for bit fields, use 1 or 0 as your default value, if you're not
already. SQL Server seems to think TRUE is a reserved word in some places,
but doesn't actually use it in most...I've yet to figure out when/why it's
valid and when not.

That's all that comes to mind off-hand. Good luck!



Rob

"Vayse" <vayse[ at ]deadspam.com> wrote in message
news:eLsFmH$qGHA.1368[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> 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" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> wrote in message
> news:%23eSnYyGpGHA.4848[ at ]TK2MSFTNGP03.phx.gbl...
>> Yeah, that's another annoying thing about SQL...try using 1 instead,
>> that'll do it.
>>
>>
>> Rob
>>
>> "Vayse" <vayse[ at ]deadspam.com> wrote in message
>> news:%23KEUW4$oGHA.220[ at ]TK2MSFTNGP05.phx.gbl...
>>> Acutally, I have one more question.
>>> The table won't accept True as a default value. What should I be using?
>>> Thanks
>>> Diarmuid
>>
>>
>
>


Re: Check Boxes
"Vayse" <vayse[ at ]deadspam.com> 21.07.2006 08:12:52
Thanks. I'm using 1 or 0.
The defaults worked correctly when I added a record through ADO code.Which
is what I going to do anyway.
Its just didn't work when I added through double clicking on the table in
the ADP.
So its ok for now, as I'm using ADO. I'll have to give it another look,
after taking a little break.
Diarmuid


"Robert Morley" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> wrote in message
news:OTHS0eCrGHA.3680[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
>I think ADP might allow you to save different defaults than the table does.
>Try designing the table in ADP and see if it shows something different.
>Also, for bit fields, use 1 or 0 as your default value, if you're not
>already. SQL Server seems to think TRUE is a reserved word in some places,
>but doesn't actually use it in most...I've yet to figure out when/why it's
>valid and when not.
>
> That's all that comes to mind off-hand. Good luck!
>
>
>
> Rob
>
> "Vayse" <vayse[ at ]deadspam.com> wrote in message
> news:eLsFmH$qGHA.1368[ at ]TK2MSFTNGP05.phx.gbl...
>> 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" <rmorley[ at ]magma.ca.N0.Freak1n.sparn> wrote in message
>> news:%23eSnYyGpGHA.4848[ at ]TK2MSFTNGP03.phx.gbl...
>>> Yeah, that's another annoying thing about SQL...try using 1 instead,
>>> that'll do it.
>>>
>>>
>>> Rob
>>>
>>> "Vayse" <vayse[ at ]deadspam.com> wrote in message
>>> news:%23KEUW4$oGHA.220[ at ]TK2MSFTNGP05.phx.gbl...
>>>> Acutally, I have one more question.
>>>> The table won't accept True as a default value. What should I be using?
>>>> Thanks
>>>> Diarmuid
>>>
>>>
>>
>>
>
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net