Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
/workfinal/apu2.asp, line 47
[code=auto:0]
<%
VAR_CONN = "DRIVER={SQL SERVER};SERVER=****; UID=***;"
VAR_CONN = VAR_CONN & "DATABASE=***;"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open VAR_CONN
set rs=Server.CreateObject("ADODB.recordset")
sql = "Select codigo,sum(valor) from lan_ where (lan1 ='"& Session("c") &"' or lan2 ='"&Session("w")&"' or lan3 ='" &Session("w")&"') and year(data) = '"& Session("ano")&"' and rec_codigo ='A23' group by codigo "
Set rg = Conn.execute(sql)
If isNull(rg("sum(valor)"))=true Then
Response.Write "Nullo"
else
Response.Write "'" & rg("sum(valor)") & " ' "
end if
%>[/QUOTE]
Se me pudessem ajudar agradecia mto
Edição feita por: ordep, 08/03/2006, 07:31.