ciao,
questa query funzionante su ACCESS:
codice:
sql = "SELECT Selezioni.Nome, Selezioni.ID, Selezioni.Img1, Avg(Votazioni.Voto) AS Media, " 
sql = sql & "Count(Votazioni.Voto) AS TotaleVoti "
sql = sql & "FROM Selezioni LEFT JOIN Votazioni ON Selezioni.ID = Votazioni.Partecipante "
sql = sql & "WHERE SELEZIONI.Sesso = 'Donna' " 
sql = sql & "GROUP BY Selezioni.Nome, Selezioni.ID, Selezioni.Img1 "
sql = sql & "ORDER BY AVG(Votazioni.Voto) DESC"
quando la eseguo mi da questo errore:

Cast from type 'DBNull' to type 'Currency' is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Cast from type 'DBNull' to type 'Currency' is not valid.

Source Error:


Line 70: query.Fill(querydataset, startRecord, Int32.Parse(PageSize), "ext_content")
Line 71: queryres.DataSource = querydataset
Line 72: queryres.DataBind() -> errore


come mai? cosa può essere?