Re: query on recordset in visual basic
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Wed, 16 Jan 2008 08:29:01 -0600
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:uC3OMpEWIHA.2000@xxxxxxxxxxxxxxxxxxxxxxx
ekkehard.horner wrote:
Someone is asking me to do a "query on a recordset" in VBScript,
claiming that in Visual Basic this
set conn=ADODB.connection
set rs1=ADODB.recordset
set rs2=ADODB.recordset
conn=<<set to someDB>>
rs1.open "select ename,age from emp"
rs2.open "select ename from rs1 where age >10"
msgbox rs2.recordcount
works. I doubt that - how could someDB know/access rs1 -
but not being familiar with Visual Basic, I thought it
wise to ask the experts.
You're correct. He is wrong. You need a database engine to compile and
run sql queries.
If it is possible in Visual Basic,
It's not VB that is the "bottleneck" here. ADODB is the class library
being used to access the database and retrieve the data, as well as
providing the functionality to work with the retrieved data. ADODB does
not provide database-engine functionality.
What you CAN do is utilize the Filter property to get near this
functionality:
http://msdn2.microsoft.com/en-us/library/ms676691(VS.85).aspx
lol
I totally missed "rs1" buried in the second query.
His last question now makes a bit of sense. Think I'll go get another cup.
-ralph
.
- References:
- query on recordset in visual basic
- From: ekkehard.horner
- Re: query on recordset in visual basic
- From: Bob Barrows [MVP]
- query on recordset in visual basic
- Prev by Date: Re: query on recordset in visual basic
- Next by Date: Re: query on recordset in visual basic
- Previous by thread: Re: query on recordset in visual basic
- Next by thread: Re: query on recordset in visual basic
- Index(es):
Relevant Pages
|
|