home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!gatech!ncar!uchinews!news
- From: colin@agincourt.bsd.uchicago.edu (& Garrett)
- Subject: Re: Working with SYBASE bits with DBKit
- Message-ID: <1992Jul30.145239.835@midway.uchicago.edu>
- Sender: news@uchinews.uchicago.edu (News System)
- Organization: University of Chicago Computing Organizations
- References: <1992Jul29.165653.12826@bmw.mayo.edu>
- Date: Thu, 30 Jul 1992 14:52:39 GMT
- Lines: 31
-
- In article <1992Jul29.165653.12826@bmw.mayo.edu> roder@mayo.edu (Mark N.
- Roder) writes:
- > Has anybody worked with bits under SYBASE using DBKit(3.0 PR2)?
- > I am having some problems. The table was created using:
- > CREATE TABLE dbo.PERSON
- > ([.......]
- > death_ind bit not null,
- > [.....])
- >
- > How do I access this? When setting up the model, you don't get a
- > bit choice, only int, string,float,etc. The model comes up with it as a
- > Int. When I try doing a setValue:forProperty:at method, It returns a
- > 0(error).
- >
- >
- > Any help would be appreciated. E-mail if you need more details.
-
- Well in sybfront.h you find the line:
- typedef unsigned char DBBIT; /* DataServer bit type */
-
- So it shouldn't be a problem that DBKit wants to store these as integers.
- NeXT probably just didn't want to trouble with another datatype yet, and
- the only problem is that you waste three bytes for each DBBIT value you
- retrieve and store.
- I wrote a little test app so I could try setValue:forProperty:at: with a
- bit field and I didn't have any problems, so I don't think it's that
- that's tripping you up.
- ' luck.
-
- Colin Garrett
- colin@delphi.bsd.uchicago.edu
-