This is Jeff's workaround for the TTimeField:
 

>Yes, change TIBCustomDataSet.SetInternalSQLParams to

>SQL_TYPE_TIME:

>begin

>ts.Date := 1;

>ts.Time := PInt(data)^;

>Qry.Params[i].AsTime := TimeStampToDateTime(ts);

>end;

>In all previous versions of Delphi TimeStampToDateTime would allow a Date of 0,

>D6 it raises a conversion error. Statically link in the change.

The static link is the problem.  Since it is impossible (and a violation of your license agreement) to re-build ibxpress60.bpl, you will find that you CANNOT SET ANY VALUE in a TTimeField using IBXPress with packages under Delphi 6. 

Workarounds? 

1) Let the server set the time by using default values...(works only if you are inserting 'NOW') 

2) Redesign your app so that is statically linked (impossible if you use plug-ins)

3) Wait until after BorCon.  Jeff has promised a patch.  (best option, but not for the impatient or for those with deadlines)

4) Stick with Delphi 5 (works)

----- Original Message -----
Sent: Friday, July 20, 2001 3:41 PM
Subject: D6 Timestamp Error: was [DUG]: Delphi 5 & 6...

On the D6 Timestamp error.
 
The following is a quote from a posting by Jeff Overcash of "TeamB":
 
"....  D6 has a problem with MSecsToTimeStamp in that if you have MSecs less than a days worth the returned TimeStamp is invalid and TimeStampToDateTime will raise an EConvertError on the returned TimeStamp. ..."
 
Perhaps a Borland staff member can elaborate? One would guess Borland will issue a  caution and workaround soon.
 
Regards
 
Russell
----- Original Message -----
Sent: Friday, July 20, 2001 1:53 PM
Subject: Re: [DUG]: Delphi 5 & 6...

I have 4, 5, and 6 all installed on the same machine.
 
The only problem I have is with D6 itself: BEWARE if you use TTimeFields in your database you may run into problems.  Certainly with IBXpress TTimeFields are currently broken.  There is a workaround but not if you use packages.

Reply via email to