Ciao,
Sto eseguendo questa funzione che dovrebbe darmi tutti i soldi in entrata del database:
Soltanto durante l'eseguzione mi da questo errore:codice:Public Function INCassa(sqlwhere As String) As Double Dim sqlmoney As String Dim soldi As Double 'Mostra l'entrata monetaria sqlmoney = "SELECT sum(saldo) FROM fattury WHERE tipolgia=IC" If sqlwhere <> "NONE" Then sqlmoney = sqlmoney & sqlwhere End If With rs2 .ActiveConnection = objConn .CursorLocation = adUseServer .CursorType = adOpenKeyset .LockType = adLockOptimistic .Properties("IRowsetIdentity") = True .Open sqlmoney, , , , adCmdText End With Set Adodc2.Recordset = rs2 soldi = rs2(0) rs2.Close INCassa = soldi End Function
Nessun Valore Specificato Per Alcuni Parametri Necessari, la riga inq uestione è questa:
.Open sqlmoney, , , , adCmdText
ed il valore si sqlmoney è "SELECT sum(saldo) FROM fattury WHERE tipolgia=IC"

Rispondi quotando