|
Prev: Does anybody know of any good books on ASP.NET Membership and the Login controls?
Next: SNL Sql
From: "Sylvain Lafontaine" sylvain aei ca on 19 Jul 2008 16:15 Yes, personally, I don't remember the exact details of how and when ADO will open a second connection (depends on so many details) as well as other details like the size of the local cache but in all cases, if you think that you need to have a second recordset opened at the same time, I don't see what could be the problem about creating a second connection object and use it for opening a second recordset. To the OP: all you have to do is to repeat the same procedure for creating and opening the second connection, command and recordset objects as with the first set of objects. -- Sylvain Lafontaine, ing. MVP - Technologies Virtual-PC E-mail: sylvain aei ca (fill the blanks, no spam please) "Erland Sommarskog" <esquel(a)sommarskog.se> wrote in message news:Xns9AE06AD27FE64Yazorman(a)127.0.0.1... > Joey Martin (joey(a)kytechs.com) writes: >> Let's assume I cannot do a join. How could I write this to work the >> right way? > > Why wouldn't you be able to do a join? > >> rs.Open objCommand >> >> While Not rs.EOF >> thetype=rs("prop_type") >> >> sqlphoto="select id from table2 where id ='" & rs("mls_acct") & "'" >> >> rsphoto.open sqlphoto, objConn >> thephoto=rsphoto("thumbfile") >> >> I have it working to grab the first row and run the subquery correctly. >> But, it does not go to the second loop. >> >> I get the following error: "Operation is not allowed when the object is >> open." and it's on this line: >> rsphoto.open sqlphoto, objConn > > I'm a little surprised, since, as Sylvain said, ADO usually opens a new > connection behind your back. > > But this is a server-side cursor, right? If you change your cursors to be > client-side instead, this is less of an issue, I believe. If you want to > use server-side cursors you need two connections. (Or investigate MARS, > but I think an extra connection is better.) > -- > Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se > > Books Online for SQL Server 2005 at > http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx > Books Online for SQL Server 2000 at > http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
First
|
Prev
|
Pages: 1 2 Prev: Does anybody know of any good books on ASP.NET Membership and the Login controls? Next: SNL Sql |