Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Mark N. Roder
Wed, 29 Jul 1992 16:56
Working with SYBASE bits with DBKit
Author: Mark N. Roder
Date: Wed, 29 Jul 1992 16:56
Date: Wed, 29 Jul 1992 16:56
22 lines
1111 bytes
1111 bytes
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. -- Mark Roder NeXT Consultant, Mayo Foundation NeXT Mail: roder@mayo.edu Office Vision: m.roder phone: 284-5306
Re: Working with SYBASE bits with DBKit
Author: & Garrett
Date: Thu, 30 Jul 1992 14:52
Date: Thu, 30 Jul 1992 14:52
31 lines
1669 bytes
1669 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads