Ask a Question related to ASP Database, Design and Development.
-
Anorlu #1
Getrows = funny result
Hi,
I want to use Getrows on a recordset.
using 3 recordsets:
set rs2003 = Server.CreateObject("ADODB.recordset")
set rs2002 = Server.CreateObject("ADODB.recordset")
....
---like this-------------------
Dim mycommand2003
set mycommand2003 = Server.CreateObject("ADODB.Command")
with mycommand2003
.Activeconnection=cnnSimple
.CommandText = " xxxxxxxxxxxxxxxxxxxxxx"
end with
set rs2003 = mycommand2003.execute
---------------------- > everythink ok
so I can work with all the data by using "rs2003.Fields("xxx")"
---working with recordset.
Now before the first one, I add now : arrs2003 = rs2003.getRows()
only this simple row.
BUT : now I don't get no data anymore for the other recordsets ! Funny
!
Does some one had already something like this...
Please I will be happy for every answer ...
Ann
Anorlu Guest
-
getrows breaks if WHERE in sql
Hello all willing to assist. This should be simple but it's killing me. I have this query (Access2k): strsql="SELECT M.NewRingNum " strsql=... -
Paging and getrows
Assuming the code below, whats the most efficient way to get the actual record count as the full array count doesnt exist :-) I want to keep the... -
GetRows and ASP 2.0
Hello, Are there a lot of differences between ASP 2.0 and 3.0. My development environment is a bit more up to date then my production system. I... -
GetRows Mystery
I'm facing an odd behavior in using the GetRows Method. I'm not sure what's causing it because it has been working fine until now. I have a sproc... -
Using GetRows()
I am getting information out of a table to place into to an Array. rs=DataConn.Execute(strSQL) At this point I place it into the array ... -
Ken Schaefer #2
Re: Getrows = funny result
What happens when you try to get data out of the other recordsets?
Also,
.Activeconnection=cnnSimple
should be:
Set .ActiveConnection = cnnSimple
At the moment you are assigning the value of the .ConnectionString property
of the cnnSimple object to the .ActiveConnection property of the Command
object (since .ConnectionString() is the default property). Instead, to
utilise connection pooling, you want to assign the actual ConnectionObject
to the .ActiveConnection Property.
Cheers
Ken
"Anorlu" <anorlu@hotmail.com> wrote in message
news:c529aab0.0310170700.4adee8af@posting.google.c om...
: Hi,
:
: I want to use Getrows on a recordset.
:
: using 3 recordsets:
:
: set rs2003 = Server.CreateObject("ADODB.recordset")
: set rs2002 = Server.CreateObject("ADODB.recordset")
: ...
: ---like this-------------------
: Dim mycommand2003
: set mycommand2003 = Server.CreateObject("ADODB.Command")
: with mycommand2003
: .Activeconnection=cnnSimple
: .CommandText = " xxxxxxxxxxxxxxxxxxxxxx"
: end with
: set rs2003 = mycommand2003.execute
: ---------------------- > everythink ok
:
:
: so I can work with all the data by using "rs2003.Fields("xxx")"
: ---working with recordset.
:
: Now before the first one, I add now : arrs2003 = rs2003.getRows()
: only this simple row.
: BUT : now I don't get no data anymore for the other recordsets ! Funny
: !
:
: Does some one had already something like this...
: Please I will be happy for every answer ...
:
: Ann
Ken Schaefer Guest
-
Anorlu #3
Re: Getrows = funny result
I got it, after e Getrows, I have to use Movefirst, because after a
Getrows, it's EOF...
mmm ok that's not good, as I don't want use Movefirst,
--> Movefirst reopen the recordset, the time consumption increase.
I want to work with the recordset and the tables at the same time.
Similar as if I create a clone. But the clone methode does not
working.
There I always get :
set rs2003b = rs2003.clone
if rs2003b.EOF then
REsponse.write ("Error rs2003b.EOF")
end if
And I get : Error rs2003b.EOF
Anorlu Guest
-
Ken Schaefer #4
Re: Getrows = funny result
Hi,
Once you have called .GetRows, your data is in the array. Why do you need to
use the Recordset?
I thought you were talking about *other* recordsets.
If you want to call .MoveFirst on the same recordset you just called
..GetRows on, then you need a scrollable cursor (eg adOpenStatic, or
adOpenKeyset), but the defeats the whole purpose of .GetRows
Cheers
Ken
"Anorlu" <anorlu@hotmail.com> wrote in message
news:c529aab0.0310200158.478ba617@posting.google.c om...
: I got it, after e Getrows, I have to use Movefirst, because after a
: Getrows, it's EOF...
:
: mmm ok that's not good, as I don't want use Movefirst,
:
: --> Movefirst reopen the recordset, the time consumption increase.
:
: I want to work with the recordset and the tables at the same time.
: Similar as if I create a clone. But the clone methode does not
: working.
:
: There I always get :
:
: set rs2003b = rs2003.clone
: if rs2003b.EOF then
: REsponse.write ("Error rs2003b.EOF")
: end if
:
: And I get : Error rs2003b.EOF
Ken Schaefer Guest



Reply With Quote

