M
Mike
Well OKAY you got me. I never use CreateObject for recordsets!
:-((
Ray,
I bet my dog could take your cats
Mike
:-((
Ray,
I bet my dog could take your cats
Mike
slavery story on NPR this morning on the way to work, and I didn't want to
mis-speak about my cats.
I bet my dog could take your cats
Aaron Bertrand - MVP said:So you'd rather portray images of beastiality? :-0
Aaron Bertrand - MVP said:Not all foobars like that are malicious. You also need to protect yourself
from the boneheads with errant copy & pastes, etc. And we *know* we all
have those people within our intranets.
Ray at said:No way man. My one cat is one 16 pound muscle with legs, and he can kick
ass on anything!
Ray at said:echo middletree>>C:\vendetta.log
Phillip Windell said:I have 5. That's about all the neighbors can handle. It had
something to do with their flower beds but I always ignore them when
they are in one of those moods.
--
Phillip Windell [CCNA, MVP, MCP]
(e-mail address removed)
WAND-TV (ABC Affiliate)
www.wandtv.com
Ray at said:echo middletree>>C:\vendetta.log
Ray at work, father to seven cats
Mike said:Whenever I see a neighbors cat in one of my flower beds I turn my dog loose.
I imagine some cats are still running.
Mike
Phillip Windell said:I have 5. That's about all the neighbors can handle. It had
something to do with their flower beds but I always ignore them when
they are in one of those moods.
--
Phillip Windell [CCNA, MVP, MCP]
(e-mail address removed)
WAND-TV (ABC Affiliate)
www.wandtv.com
Ray at said:Well, I can always choose the pdf over the cat.
echo middletree>>C:\vendetta.log
Ray at work, father to seven cats
OK, let me try again. Let's illustrate what happens when you execute thesemiddletree said:I really don't understand the above too well, but I'll keep digesting
it.
Bob Barrows said:OK, let me try again. Let's illustrate what happens when you execute these
two lines of code:
Set rs = server.createobject("adodb.recordset")
'ADO creates a closed recordset object and points rs at it
Set rs = conn.execute(strSQL)
'ADO creates a Command object which does the following 3
'things:
' 1. executes strSQL
' 2. creates a new, open recordset object to receive the results
'At this point, there are two recordset objects in memory: the one
'created by the createobject statement, and at which rs is still
'pointing, and the new one which was just created by the Command
'object
' 3. points rs at the new recordset
'So now rs is pointing at the new recordset. Now, there is no longer
'any variable pointing at the original, still-closed recordset, and so,
'it is released from memory
To sum up, when you use createobject("adodb.recordset") followed by
connection.execute (or command.execute) you have wound up creating two
recordset objects when you only intended to create one.
Is this a big deal? Not really. The initial recordset, with no Field objects
in its Fields collection, has a relatively small footprint in memory, is
created very quickly, and does not stay there very long. Still:
Best practice is to skip the createobject statement when using Execute to
retrieve data into a recordset.
Is that better?
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.