Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Yi Zhao
Sat, 26 Sep 1992 01:52
NeXT DBKit Adaptor Problem : Please Help !
Author: Yi Zhao
Date: Sat, 26 Sep 1992 01:52
Date: Sat, 26 Sep 1992 01:52
31 lines
1816 bytes
1816 bytes
Greetings,
I have a problem with the NeXT DBDatabase (DBKit) Adaptor.
I am writing a custom Adaptor, and I based my implementation on the "SimpleAdaptor"
example given by NeXT, which appears to have bugs.
My question is: Is it the responsibility of the Adaptor code to insert records
into the Binder's container ? The documentation on DBBinder seems to indicate
otherwise; it seems to suggest that the adaptor only has to fetch a row of data in its
- (BOOL)fetchData:(DBBinder*)aBinder method, and that the database will insert the
row into a new record in the container after every invocation of the fetchData:
method.
This is not what I observe.
If I say:
[myBinder setDatabase:myDatabase];
[myBinder setContainer:myContainer];
[myBinder reset];
[myBinder fetch]
printf("Count of myContainer = %d\n", [myContainer count]);
I expect the printf to print 2, corresponding to 2 records that I know are present;
however, it prints only 1.
Is the fetchData: method in the Adaptor code responsible for inserting
a record into the Binder's container after it fetches a row of data ?
Is there any sample custom Adaptor code somewhere that I could look at ?
The SimpleAdaptor code from NeXT is real old, the copyright date is 1991.
I would really appreciate any help from you DBKit experts.
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