Ciao.
Eseguo questa query di somma valori:
Se unita ha dei record nel db è tutto ok, mentre se non ha nulla la pagina restituisce:codice:if unita <> "" then ARR_DALFORM = split(unita, "-") unita0 = ARR_DALFORM(0) unita1 = ARR_DALFORM(1) sumSQL = "select sum(somma_record) as tot_record from tabsf6 where id_unita = "& unita0 &" and servizio = true " else sumSQL = "select sum(somma_record) as tot_record from tabsf6 where servizio = true " end if response.write sumSQL &" " set rec = conn.execute (sumSQL) tot_record = formatnumber(rec("tot_record"),3)
Come risolvo?Error Type:
Microsoft VBScript runtime (0x800A000D)
Tipo non corrispondente.: 'formatnumber'
Grazie