Whilst not related to Delphi, I was wondering if anyone here could answer me
this wee question, I have the following Perl code:
$Conn = CreateObject OLE "ADODB.Connection";
$Conn->Open($currentdb);
$sql = "SELECT ConfigurationID, StartDate FROM Configuration \
WHERE StartDate BETWEEN '$startdate 00:00:00' AND \
'$startdate 23:59:59'";
print $sql, "\n";
$rs = $Conn->Execute($sql);
$configchange = $Conn->RecordCount > 0;
print "RecordCount = ", $rs->RecordCount, "\n\n";
The query when run returns 1 record (as shown in the query analyser when the
same query is run), however, $rs->RecordCount shows -1. I remember awhile
ago reading somewhere about problems with RecordCount and ADO (or maybe that
was Access?) but was wondering if anyone new anything about the the
resultset object that the query returns, should I be looking at another
property other than RecordCount?
I could always fire another query with the same WHERE clause but with
COUNT(*) instead of the columns, but if I could do with only one DB access
I'd like to.
BTW: Perl/ADO is kinda neat :) Now if only I could figure out how to call a
perl function from my delphi app :)
Mark
--
Mark Derricutt "People in prayer for me, everyone there for me,
ICQ: 1934853 sometimes I feel I should face this alone, my
Wrk: 377-9941 soul exposed... it calm's me to know that I
Fax: 377-9947 won't!" = Dream Theater - Scarred
DDI: 375-3754
Now Playing: Iced Earth - Reaping Stone
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz