dbTalk Databases Forums  

How do I use multiple tables

comp.database.ms-access comp.database.ms-access


Discuss How do I use multiple tables in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tmurray0539
 
Posts: n/a

Default How do I use multiple tables - 07-26-2003 , 03:50 PM






Hi All:

I am not quite sure how to refer to different tables within a select
statement using ADO recordsets. Can anyone show me how to do this?
When trying this:

sql = "Select tblGames.gameID FROM tblGames "
set rst = DBcon.Execute(sql)

Do while not rst.eof
response.write(rst(tblGames.gameID))
rst.movenext
Loop


I obtain this error


Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested
name or ordinal.

The code does work if I do this:

sql = "Select gameID FROM tblGames "
set rst = DBcon.Execute(sql)

Do while not rst.eof
response.write(rst(gameID))
rst.movenext
Loop

The only problem is that I need to refer to different fields from different
tables

Thank you

Terry




Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.