Changing from .assqltimestamp to .asdatetime

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tonymeadors
Posts: 35
Joined: Wed 28 Feb 2007 17:56

Changing from .assqltimestamp to .asdatetime

Post by tonymeadors » Tue 04 Oct 2011 13:13

Under Delphi 7 our apps worked equally with Oracle,
SQL Server, IB and Firebird. To do so required filling
datetime parameters thus:

q.parambyname('adate').assqltimestamp:= datetimetosqltimestamp(d);

Because using .asdatetime gave numerous problems in D7.


With unidac under Delphi2010 we have found the opposite.
Using .assqltimestamp does not smoothly work across these
dbtypes at this time.

BUT - returning to .asdatetime seems to work slick as
a whistle.

So we are changing back to assignments throughout:
q.parambyname('adate').asdatetime:= d;

Hope this helps,

tonyM

(to hold our datetimes we use
timestamp in IB and FB
datetime in sql server
date in oracle )

AndreyZ

Post by AndreyZ » Wed 05 Oct 2011 13:50

Please specify the exact problems that you encountered with the AsSQLTimeStamp property under Delphi 2010, and we will try to help you.

tonymeadors
Posts: 35
Joined: Wed 28 Feb 2007 17:56

Working well now

Post by tonymeadors » Tue 11 Oct 2011 18:09

We are now consistently filling parameters with datetime without
any problems - using xxx.asdatetime:=d;

In an ealier post I suggested that IB was giving an error
when using .assqltimestamp.

from that post:
=================================
With tuniquery, the following gives an error with Interbase:

uniquery.sql.add('update ap_master set check_date=:xdatetime');
uniquery.parambyname('xdatetime').assqltimestamp:= datetimetosqltimestamp(now);

interbase yields:
"EConvertError with message Unknown Datatype"
sql server works
oracle works

=================================

Your staff replied that this was being addressed
and would be found fixed in the next release.

So all is well - both for me now, and for future
uses of assqltimestamp.

Thanks for your great work,
tonyM

AndreyZ

Post by AndreyZ » Fri 14 Oct 2011 07:58

We have released new builds of all DAC components. You can try them and check if the problem with the AsSQLTimeStamp property is solved.

Post Reply