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 |