|
-
Feb 20th, 2009, 04:32 AM
#1
Thread Starter
Member
setting ADODB variables
Hi
I want to know if my coding is advisable or it will consume space in memory. my code is this:
let's assume that active data object is already added in references and we have set connection using adocn variable
dim adocmd as adodb.command
dim adors as adodb.recordset
dim adocn as adodb.connection
1. first, i connect this to get tr_custCode value
set adocmd = new adocmd.command
set adocmd.activeconnection = adocn
adocmd.commandtext = "SELECT tr_custCode FROM trans"
adocmd.commandtype = adcmdStoredProc
set adors = adocmd.execute
intcustCode = adors!tr_custCode
2. Now that i got the value i want, i want to query more data from other table
set adocmd = new adocmd.command
set adocmd.activeconnection = adocn
adocmd.commandtext = "SELECT * FROM customer"
adocmd.commandtype = adcmdStoredProc
set adors = adocmd.execute
Now you see that I used the adocmd and adors twice and set it, does this affects consuming of memory? or i have to set adocmd and adors to nothing to free some memory?? thanks a lot guys. Im a newbie and I want to learn professional coding.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|