home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5362 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.6 KB  |  43 lines

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