Heres my problem I have a sql string
that is suposed to return me an ad with its name, its compagny name and the number of time it played between the dates that are in 2 DatePicker.
The string return me the corect number of time and all the info I want, execpt that if theres no paying between the dates, instead of returning 0, it does not return a row.
Is there a way to make it return a row with a 0 or should I create an ad class and store all the ad in an arrays of ads and then filter the dates?
Code:
sql="SELECT PubliciteArchive.ID, PubliciteArchive.Nom, PubliciteArchive.Type,PubliciteArchive.Duree,ClientArchive.Nom as Compagnie, Count(PresentationArchive.PubID) AS nbPres "+
"FROM PubliciteArchive, PresentationArchive, ClientArchive "+
"WHERE (((PubliciteArchive.ID)=[PubID] AND ClientArchive.ID=PubliciteArchive.ClientID) AND DatePResentation > #"+dtpDebut.Value+"# AND DatePresentation < #"+dtpFin.Value+"#) "+
"GROUP BY PubliciteArchive.ID, PubliciteArchive.Nom , PubliciteArchive.Type,PubliciteArchive.Duree,ClientArchive.Nom";
that is suposed to return me an ad with its name, its compagny name and the number of time it played between the dates that are in 2 DatePicker.
The string return me the corect number of time and all the info I want, execpt that if theres no paying between the dates, instead of returning 0, it does not return a row.
Is there a way to make it return a row with a 0 or should I create an ad class and store all the ad in an arrays of ads and then filter the dates?
Last edited by a moderator: