Newbie using multiple recordsets

D

Darren

Hi All,

This should be a simple one, but I still can't work it out for myself.
:(

I have a webpage that I displays information from my access db. On one
area of the page I will be displaying information from tblNews.

But then I would like to close that recordset and open a new one with
information from tblEvents.

And then close that one and open another recordset from the
tblContacts.

You can probably tell from the tbl names that is a simple bulletin
board, it's for a sports club. It displays the lastest club news,
upcoming events and club contacts.

Thanks in advance guys, I've spent an hour trying to find a decent
tutorial online but have had no luck.

Cheers,
Darren Stahlhut
 
S

Steven Burn

'// News....... obviously tblNews is your table
rst.open = "Select * FROM tblNews", DB, adOpenStatic, adLockPessimistic
strNews = rst("Latest")
rst.close

'// Events....... obviously tblEvents is your table
rst.open = "Select * FROM tblEvents", DB, adOpenStatic, adLockPessimistic
strEvents = rst("Upcoming")
rst.close

'// Contacts....... obviously tblContacts is your table
rst.open = "Select * FROM tblContacts", DB, adOpenStatic, adLockPessimistic
do until rst.eof
strContacts = rst("Contacts") & vbcrlf
loop
rst.close

response.write strNews & vbcrlf & strEvents & vbcrlf & strContacts

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
S

Steven Burn

hehe.....whoops :eek:\

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
B

Bob Barrows

Darren said:
Hi All,

This should be a simple one, but I still can't work it out for myself.
:(

I have a webpage that I displays information from my access db. On one
area of the page I will be displaying information from tblNews.

But then I would like to close that recordset and open a new one with
information from tblEvents.

And then close that one and open another recordset from the
tblContacts.

You can probably tell from the tbl names that is a simple bulletin
board, it's for a sports club. It displays the lastest club news,
upcoming events and club contacts.

Thanks in advance guys, I've spent an hour trying to find a decent
tutorial online but have had no luck.

Cheers,
Darren Stahlhut

Can't you get the records from all these tables at once? Can they be joined?
Unioned?

If you provide a little more detail, we may be able to explain how to get
this information in a single recordset.

Bob Barrows
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top