Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Creating sub-recordsets

Reply
Thread Tools

Creating sub-recordsets

 
 
Giles
Guest
Posts: n/a
 
      06-05-2005
How do I create a recordset from another?

e.g.
sSQL1="SELECT * FROM ThisTable"
rs1.open sSQL1,conn

sSQL2="Select * from (rs1?) WHERE name='fred' "
rs2.open sSQL2,conn

TIA
Giles


 
Reply With Quote
 
 
 
 
Bob Lehmann
Guest
Posts: n/a
 
      06-05-2005
Why don't you just run the second statement to begin with?

Bob Lehmann

"Giles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How do I create a recordset from another?
>
> e.g.
> sSQL1="SELECT * FROM ThisTable"
> rs1.open sSQL1,conn
>
> sSQL2="Select * from (rs1?) WHERE name='fred' "
> rs2.open sSQL2,conn
>
> TIA
> Giles
>
>



 
Reply With Quote
 
 
 
 
Giles
Guest
Posts: n/a
 
      06-05-2005
The first statement takes about 5 secs to execute. Didn't make myself v
clear - the 1st statement is full of conditions, to a Search database. The
second is to filter and order search results into various categories without
having to make the main trip again.
Giles

>"Bob Lehmann" wrote > Why don't you just run the second statement to begin
>with?
>
> "Giles" wrote in message
>> How do I create a recordset from another?
>>
>> e.g.
>> sSQL1="SELECT * FROM ThisTable"
>> rs1.open sSQL1,conn
>>
>> sSQL2="Select * from (rs1?) WHERE name='fred' "
>> rs2.open sSQL2,conn



 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-05-2005
Giles wrote:
> How do I create a recordset from another?
>
> e.g.
> sSQL1="SELECT * FROM ThisTable"
> rs1.open sSQL1,conn
>
> sSQL2="Select * from (rs1?) WHERE name='fred' "
> rs2.open sSQL2,conn
>

Use the recordset's Filter property.

Bob Barrows
PS. Avoid Selstar: http://www.aspfaq.com/show.asp?id=2096
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
Giles
Guest
Posts: n/a
 
      06-06-2005

"Bob Barrows [MVP]" wrote
> Giles wrote:
>> How do I create a recordset from another?
>>
>> e.g.
>> sSQL1="SELECT * FROM ThisTable"
>> rs1.open sSQL1,conn
>>
>> sSQL2="Select * from (rs1?) WHERE name='fred' "
>> rs2.open sSQL2,conn
>>

> Use the recordset's Filter property.
>
> Bob Barrows
> PS. Avoid Selstar: http://www.aspfaq.com/show.asp?id=2096


Thanks Bob. I do avoid * where poss since joining this NG - almost as bad as
top (or bottom) posting! However, the article seems to suggest that if you
want all fields, it is better to explicitly name the lot. Is that right?
Does everyone do that?
Giles


 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      06-06-2005
Giles wrote:
> "Bob Barrows [MVP]" wrote
>> Giles wrote:
>>> How do I create a recordset from another?
>>>
>>> e.g.
>>> sSQL1="SELECT * FROM ThisTable"
>>> rs1.open sSQL1,conn
>>>
>>> sSQL2="Select * from (rs1?) WHERE name='fred' "
>>> rs2.open sSQL2,conn
>>>

>> Use the recordset's Filter property.
>>
>> Bob Barrows
>> PS. Avoid Selstar: http://www.aspfaq.com/show.asp?id=2096

>
> Thanks Bob. I do avoid * where poss since joining this NG - almost as
> bad as top (or bottom) posting! However, the article seems to suggest
> that if you want all fields, it is better to explicitly name the lot.


"seems to suggest"? I thought it was worded strongly enough that it would do
more than "seem to suggest" ,,,

> Is that right?


Yes

> Does everyone do that?


Everyone who :
a) knows the pitfalls of selstar
b) is not lazy
c) wants to reduce network traffic and the time connected to the database,
resulting in better performance and resource utilization



Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net Web Controls 0 06-01-2005 02:36 PM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net 0 06-01-2005 02:36 PM
Re: Creating a network with a single wireless computer Pavel A. Wireless Networking 1 08-03-2004 12:19 AM
Re: Creating a network with a single wireless computer Tim Levy Wireless Networking 0 08-02-2004 07:32 PM
creating Network Traffic Wireless Networking 1 07-06-2004 03:52 PM



Advertisments