Multi select query (ADO) - Rookie!

A

Atlas

Is it possible to send multiple select statements in one batch to the
server?
Example:

fGRs.ActiveConnection = globalCn

strSQL = " SELECT SUM(A) AS sumA FROM
" & _
" SELECT SUM(B) AS sumB FROM
"


fGRs.Source = strSQL
fGRs.Open
txtBoxA = fGRs!sumA
txtBoxB = fGRs!sumB



Thanks
 
L

Larry Linson

Is it possible to send multiple select statements
in one batch to the server?
Example:
fGRs.ActiveConnection = globalCn
strSQL = " SELECT SUM(A) AS sumA FROM
" & _
" SELECT SUM(B) AS sumB FROM
"
fGRs.Source = strSQL
fGRs.Open
txtBoxA = fGRs!sumA
txtBoxB = fGRs!sumB


SELECT SUM(A) as sumA, SUM(B) as sumB FROM

should do what you want -- there's no need for multiple SELECTs.

Larry Linson
Microsoft Access MVP
 

Ask a Question

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.

Ask a Question

Top