🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #500

Re: DBKit and Sybase datetime fields

#500
From: William Shipley
Date: Sat, 08 Aug 1992 10:06
26 lines
1785 bytes
In article <1992Aug7.204326.1433@Trirex.COM> mferris@trirex.com (Mike Ferris)  
writes:
> Has anyone tried to use DBKit with sybase datetime fields.  How do you do  
> it in modeller?  Can you just set it to string and have it auto-convert  
> (this seems too easy), or must I do something ugly like define a view in  
> sybase which converts the date to a string?  If I have to do a view, will  
> updates work right?

Just set it to be of type string.  Note that in DBModeller all you are doing is  
setting how the property is stored internally in the DBGenericRecord  
(undocumented), you can still treat any property as any type you like.

That is to say, just because you have a column of, say, type MONEY in Sybase,  
you can still tell DBModeller to store it as a string, if you really want.   
(This would probably have some bad side effects, but would mostly work.)

Lots of things in DBKit happen magically, conversion is one of them.

Note that there is currently a bug in the way dates are handled that prevents  
you from saving an entity with dates twice in a row without getting a "Record  
modified by someone else" warning from DBKit.

I have a fix for this, but I won't get into it on the Net.  Email me for  
details, if you get stuck on this.

-W
Technical Details
Message-ID: <1992Aug8.100657.4950@u.washington.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!wupost!sdd.hp.com!usc!rpi!usenet.coe.montana.edu!news.u.washington.edu!news
References: <1992Aug7.204326.1433@Trirex.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!wupost!sdd.hp.com!usc!rpi!usenet.coe.montana.edu!news.u.washington.edu!news
From: wjs@blorf.cpac.washington.edu (William Shipley)
Newsgroups: comp.sys.next.programmer
Subject: Re: DBKit and Sybase datetime fields
Message-ID: <1992Aug8.100657.4950@u.washington.edu>
Date: 8 Aug 92 10:06:57 GMT
References: <1992Aug7.204326.1433@Trirex.COM>
Sender: news@u.washington.edu (USENET News System)
Organization: University of Washington
Lines: 26