home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5964 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.5 KB

  1. Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!news.u.washington.edu!news
  2. From: wjs@blorf.cpac.washington.edu (William Shipley)
  3. Newsgroups: comp.sys.next.programmer
  4. Subject: Re: DBKit API questions
  5. Message-ID: <1992Sep4.005823.8849@u.washington.edu>
  6. Date: 4 Sep 92 00:58:23 GMT
  7. Article-I.D.: u.1992Sep4.005823.8849
  8. References: <+alnfk#.yikes@netcom.com>
  9. Sender: news@u.washington.edu (USENET News System)
  10. Organization: University of Washington
  11. Lines: 29
  12.  
  13. Michael Brill wrote:
  14. > Help DBKit Gods!
  15. > I have a field in a Sybase database that is a long int representing date&time
  16. > (result of time() function).
  17. >  [and he wants to]
  18. >   (A) Display & edit both the date and time in separate columns, or else 
  19. >       if I can't split 1 Sybase field into 2 DBKit attributes, then I'd 
  20. >       settle for:
  21. >   (B) Display & edit the date portion of the field
  22.  
  23. The Oracle has pondered your question carefully, and speaks thusly:
  24.  
  25. What you'd really like to do here is use the custom object interface in DBKit.
  26.  
  27. You can't, however, because of a SybaseAdaptor bug.
  28.  
  29. Another way to do this would be to create a custom Association subclass, which  
  30. converts your int to a date or time string on the fly.  You'd then hook two of  
  31. these custom Associations to the integer date property, and you'd be rocking.
  32.  
  33. The trick is to hook up all of your associations in IB, and then replace the  
  34. date ones with your custom versions at run time.
  35.  
  36. -William Shipley
  37. The Omni Group
  38. DBKit consulting
  39.  
  40. PS: You owe the oracle a "Ren and Stimpy LOVE DBKit" T-shirt.
  41.