|
 |
access_asp thread: How to move a record from a record Set A into record Set B
Message #1 by "Kenneth Chao" <kenchao828@h...> on Fri, 14 Mar 2003 17:37:50
|
|
Hi,
I have a problem of running the recordset when I want to move a
record from record set A into record set B while the condition is met.
Currently, I have to insert the value into the destination table one by
one, for example:
while not rsCons.eof
rsNewFO.open "tmpTable", strConnect, adOpenStatic, adLockOptimistic,
adCmdtable
rsNewFO.AddNew
rsNewFO("commdesc") = rsCons("commdesc")
rsNewFO("xctryname") = rsCons("xctryname")
.....
.....
rsNewFO.update
rsNewFO.Close
rsCons.delete
rsCons.movenext
wend
What I am wondering is that if there is anyway to do it faster and
codeless. That is, rsCons.moverecord to rsNewFO (this is the ideal suido
code that what I want).
Thanks for the help.
Kenneth
Message #2 by "Kelly Zhu" <kzhu@t...> on Fri, 14 Mar 2003 11:29:38 -0600
|
|
build command obj to run "select ....from table a into table b where ...."
----- Original Message -----
From: "Kenneth Chao" <kenchao828@h...>
To: "Access ASP" <access_asp@p...>
Sent: Friday, March 14, 2003 5:37 PM
Subject: [access_asp] How to move a record from a record Set A into record
Set B
> Hi,
>
> I have a problem of running the recordset when I want to move a
> record from record set A into record set B while the condition is met.
> Currently, I have to insert the value into the destination table one by
> one, for example:
> while not rsCons.eof
> rsNewFO.open "tmpTable", strConnect, adOpenStatic, adLockOptimistic,
> adCmdtable
> rsNewFO.AddNew
> rsNewFO("commdesc") = rsCons("commdesc")
> rsNewFO("xctryname") = rsCons("xctryname")
> .....
> .....
> rsNewFO.update
> rsNewFO.Close
> rsCons.delete
> rsCons.movenext
> wend
>
> What I am wondering is that if there is anyway to do it faster and
> codeless. That is, rsCons.moverecord to rsNewFO (this is the ideal suido
> code that what I want).
>
> Thanks for the help.
>
>
> Kenneth
|
|
 |