Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADODB RecordSet RecordCount Question
Message
De
28/12/1999 10:22:14
 
 
À
24/12/1999 16:53:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00308445
Message ID:
00309151
Vues:
29
>John, Thanks for the reply. Yes I know where you are. We met at DEVCON in California but I'm sure you met so many people there that you would not remember shaking hands.
>
>I tried your code and also return 23 for the count.
>
>My ADO Version is 2.1.
>
>It seems that this -1 occurs only when I am using a complex Query. I know that the tables and fields don't mean anything to you but below is the Query I build that returns the -1. Perhaps you see something there that I am missing.
>
>tempstr = "SELECT "
>tempstr = tempstr + "tr.transid,tr.tcodeid,tr.tradedate,tr.shares,tr.dollars,tr.price,tc.tcode,ac.account "
>tempstr = tempstr + "FROM trans AS tr,tcode AS tc,account AS ac "
>tempstr = tempstr + "WHERE tr.assetid = " + ALLTRIM(STR(netasset.assetid,10,0))
>tempstr = tempstr + " AND tr.tradedate>=" + "'" + odate + "'"
>tempstr = tempstr + " AND tc.tcodeid = tr.tcodeid AND ac.accountid = " + ALLTRIM(STR(netasset.accountid,10,0))
>oRs.Open(tempstr,oConn,3,4)
>
>odate is an object reference to a date parameter passed to this procedure.
>
>By the way, your white paper on ADO is one of the most useful things I've read to explain the workings of this kind of Data Access. Thanks.
It's a long shot, but you may try rewriting your query to use a command object to increase the commandtimeout property. Sometimes depending on your network connection and the complexity of the query it may take more than the default 30 seconds for it to execute and return. Although you should be getting an error if this is the case.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform