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 )
Changing from .assqltimestamp to .asdatetime
-
tonymeadors
- Posts: 35
- Joined: Wed 28 Feb 2007 17:56
-
AndreyZ
-
tonymeadors
- Posts: 35
- Joined: Wed 28 Feb 2007 17:56
Working well now
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
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