Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Besause of SQL???

Posted 21 Jan 2002 20:51:20
1
has voted
21 Jan 2002 20:51:20 Irakli Garakanidze posted:
I'v got several tables: Donors, Projects, Sectors, State. Keys for Donors are like 1EU, 1EUTA, 1EBRD, 1FAO, 1USA...
in one page which is supposed to display Projects done by certain donor I have placed sql:

"SELECT [Projects].[Project], [Projects].[ProjectID], [Projects].[PMoney], [Projects].[Strat], [Projects].[Endd], [Projects].[StateID], [Projects].[PrType], [Projects].[DonorID], [Projects].[SectorID], [Projects].[Descr], [Donors].[Donor], [Sectors].[Sector], [State].[State] FROM State INNER JOIN (Sectors INNER JOIN (Donors INNER JOIN Projects ON [Donors].[DonorId] =[Projects].[DonorID]) ON [Sectors].[SectorID] =[Projects].[SectorID]) ON [State].[StateID] =[Projects].[StateID]
WHERE Projects.DonorID= '" + Replace(rpd__MMColParam, "'", "''" + "' ORDER BY " + Replace(rpd__ord, "'", "''" + " " + Replace(rpd__how, "'", "''" + ""

I took it from Access query and added variebles MMColParam, ord and how (The first for DonorID which comes from different page, ord - for sorting different fields and how - for sorting these fields ASC and DESC)

I made default for MMColParam - '1EU' -> Clicked "Test" _> Good, '1EUTA' -> "Test" - eveything OK, but '1FAO' or 1EBRD - window shows 'no data' I checked in database... I have a lot of projects done bu 1FAO and 1EBRD....
why??
SOS



Replies

Replied 23 Jan 2002 11:30:30
23 Jan 2002 11:30:30 Joel Martinez replied:
I suggest testing the query in access first... try placing all those values in the criteria box one at a time and see if the results are different.



Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/

Reply to this topic