General information
Category:
Coding, syntax & commands
>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.
On second thought, try setting the cursorlocation property of the connection object to client side cursor.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only