gnom
06-04-2005, 12:22 PM
I've just build a database in Access 2003 and uploaded it to my account on Brinkster.
There are two tables:
Referee:
PK id int
country_id int
name char
.....
Country:
PK id int
name char
.....
There is a relation between Country.id and Refree.country_id
But now i have a problem: a simple query works ok
sSQL = "SELECT * FROM Referee"
but not with JOIN:
sSQL = "SELECT * FROM Referee JOIN Country ON Referee.country_id=Country.id"
it doesn't work - there is an syntax error.
What is wrong? Database is for sure good, relation is defined well.
Suppose that this query works - how can I display the name of country?
Set oRS = oConn.Execute(sSQL)
...oRS("Country.name").Value...
...will this work?
Please help, It is my first asp + sql project. My Brinkster account doesn't support MS SQL- I have to use Access...
Thanks in advance
There are two tables:
Referee:
PK id int
country_id int
name char
.....
Country:
PK id int
name char
.....
There is a relation between Country.id and Refree.country_id
But now i have a problem: a simple query works ok
sSQL = "SELECT * FROM Referee"
but not with JOIN:
sSQL = "SELECT * FROM Referee JOIN Country ON Referee.country_id=Country.id"
it doesn't work - there is an syntax error.
What is wrong? Database is for sure good, relation is defined well.
Suppose that this query works - how can I display the name of country?
Set oRS = oConn.Execute(sSQL)
...oRS("Country.name").Value...
...will this work?
Please help, It is my first asp + sql project. My Brinkster account doesn't support MS SQL- I have to use Access...
Thanks in advance