Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the proper syntax to use a access query

Status
Not open for further replies.

1712

Technical User
Joined
Nov 8, 2000
Messages
66
Location
NL
I have created a query in access and want to use it in a select statement in my asp code.

I tried to simply do:
select * from query
and it comes back with an error that it could not find the table/query

The whole reason for doing this is because I cannot seem to find the reason why I get an error on the following code

sqlstr = "SELECT * FROM nanny inner join references on nanny.id = references.id"
sqlstr = sqlstr & " WHERE nanny.id = " & request("id")

The error says something is wrong with my from statement.
 
Insert...
Code:
Response.Write strSQL
...just before the line opening the recordset. Usually it's easier to see a SQL syntax problem after the SQL has been put together, and this trick will display it on the page.
 
And I can't see a problem, at first glance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top