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!

INNER JOIN IN ADO / ACCESS / ASP

Status
Not open for further replies.

apple17

Programmer
Joined
Jul 5, 2005
Messages
46
Location
US
I have a query that works in the Access database engine, however when I execute it as part of my ASP page, it only returns the FIRST location joined with each program_update.

SELECT Program_Updates.ProgramID, Program_Updates.Name,
Location.StartDate, Location.EndDate, Location.LocationName
FROM Program_Updates INNER JOIN Location
ON Program_Updates.ProgramID = Location.ProgramID
WHERE Location.EndDate >= #1/1/1900# and Location.StartDate <= #12/31/2010# AND Name LIKE '%%'

For data, I have 1 program with 3 locations and 1 program with 1 location. In Access I get 4 rows. In my ASP page, I get 2 rows, one for each location.

TIA!
 
Are you sure that you're recordset has only 2 rows? Can you post the code where you move through the recordset?

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
try removing the WHERE condition and see what results you get...i doubt about date limiters in your where clause going wrong...what is the data type of the date field in your database...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top