Foros del Web » Programando para Internet » ASP Clásico »

Error de sintaxis

Estas en el tema de Error de sintaxis en el foro de ASP Clásico en Foros del Web. Hola tengo que hacer un ciclo para que por cada persona me saca unos datos y unas graficas el problema esta es una función que ...
  #1 (permalink)  
Antiguo 24/02/2004, 13:54
 
Fecha de Ingreso: enero-2002
Ubicación: Bogotá
Mensajes: 438
Antigüedad: 22 años, 5 meses
Puntos: 2
Error de sintaxis

Hola tengo que hacer un ciclo para que por cada persona me saca unos datos y unas graficas el problema esta es una función que uso y este es el mensaje que me aparece

Error de compilación de Microsoft VBScript error '800a03ea'

Error de sintaxis

/proyectos/Tiempo establecido para entrega.vbs, line 47

sub BarChart2(data2, labels2, title2, axislabel2)
^


mis lineas de codigo son:

<%set resp=server.CreateObject("ADODB.recordset")
sqlresp="select p.codresp, a.nombre from propuesta p, administracion a order by p.codresp"
set resp=conn.execute(sqlresp)
while not resp.eof
Set rsc2=conn.execute(sqlc2)%>
<!-- #include file="Tiempo establecido para entrega.vbs" -->
<%resp.movenext
wend %>

y el archivo vbs contiene:

<%%>
<%'*********************************************** *******************
'AQUI EMPIEZA LA INTERACCIÓN PARA MAS DE MAS DE UNA PERSONA"
set Rs2=server.CreateObject ("ADODB.Recordset")
set Rsc2=server.CreateObject ("ADODB.Recordset")
set Rstip2=server.CreateObject ("ADODB.Recordset")

'rs.CursorType=1
RS2.CursorLocation = 3

'conn.open
'rstip.open sqltip,conn,3,3
sw=0
if request("item")<>"0" and request("item")<>"" then
sql2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo,to_days(p.fechacierre)-to_days(p.fechaentrega) as fechatot, a.nombre from propuesta p,administracion a where p.codresp=a.cod and p.codresp=1098 and not fechaentrega='0000-00-00 00:00:00' and not fechacierre='0000-00-00 00:00:00' and (to_days(fechacierre)-to_days(fechaentrega)) "+request("item")+" "+request("dias")+" and (codestado='Entregado' or codestado='Adjudicado') group by fechatot"
sqlc2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo from propuesta p,administracion a where p.codresp=a.cod and p.codresp=1098 and not fechaentrega='0000-00-00 00:00:00' and not fechacierre='0000-00-00 00:00:00' and (to_days(fechacierre)-to_days(fechaentrega)) "+request("item")+" "+request("dias")+" and (codestado='Entregado' or codestado='Adjudicado')"
sw=1
else
sql2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo,to_days(p.fechacierre)-to_days(p.fechaentrega) as fechatot, a.nombre from propuesta p, administracion a where p.codresp=a.cod and p.codresp=1098 and not fechaentrega='0000-00-00 00:00:00' and not fechacierre='0000-00-00 00:00:00' and (codestado='Entregado' or codestado='Adjudicado') group by fechatot"
sqlc2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo from propuesta p, administracion a where p.codresp=a.cod and p.codresp="&resp("p.codresp")&" and not fechaentrega='0000-00-00 00:00:00' and not fechacierre='0000-00-00 00:00:00' and (codestado='Entregado' or codestado='Adjudicado')"
end if
if cstr(request("finicio"))<>"" and cstr(request("ffinal"))<>"" then
if sw=1 then
sql2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo,to_days(p.fechacierre)-to_days(p.fechaentrega) as fechatot,a.nombre from propuesta p, administracion a where p.codresp=a.cod and p.codresp=1098 and not p.fechaentrega='0000-00-00 00:00:00' and not p.fechacierre='0000-00-00 00:00:00' and (p.codestado='Entregado' or p.codestado='Adjudicado') and p.fechaentrega between '"+request("finicio")+"' and '"+request("ffinal")+"' and (to_days(p.fechacierre)-to_days(p.fechaentrega)) "+request("item")+request("dias")+" group by fechatot"
sqlc2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo from propuesta p, administracion a where p.codresp=a.cod and p.codresp=1098 and not p.fechaentrega='0000-00-00 00:00:00' and not p.fechacierre='0000-00-00 00:00:00' and (p.codestado='Entregado' or p.codestado='Adjudicado') and p.fechaentrega between '"+request("finicio")+"' and '"+request("ffinal")+"' and (to_days(p.fechacierre)-to_days(p.fechaentrega)) "+request("item")+request("dias")+""
else
sql2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo,to_days(p.fechacierre)-to_days(p.fechaentrega) as fechatot, a.nombre from propuesta p, administracion a where p.codresp=a.cod and p.codresp=1098 and not p.fechaentrega='0000-00-00 00:00:00' and not p.fechacierre='0000-00-00 00:00:00' and (p.codestado='Entregado' or p.codestado='Adjudicado') and p.fechaentrega between '"+request("finicio")+"' and '"+request("ffinal")+"' and fecharecibo between '"+request("finicio")+"' and '"+request("ffinal")+"' group by fechatot"
sqlc2="select count(to_days(p.fechacierre)-to_days(p.fechaentrega)) as consecutivo from propuesta p, administracion a where p.codresp=a.cod and p.codresp=1098 and not p.fechaentrega='0000-00-00 00:00:00' and not p.fechacierre='0000-00-00 00:00:00' and (p.codestado='Entregado' or p.codestado='Adjudicado') and p.fechaentrega between '"+request("finicio")+"' and '"+request("ffinal")+"' and fecharecibo between '"+request("finicio")+"' and '"+request("ffinal")+"'"
end if
end if
response.Write(sql2)

'response.Write("el valor de rsc2 es "+rs2("nombre")+"<br>")

%>
<br>
<%rs2.open sql2,conn,3,3
resp=rs2("nombre")
if rs2.eof then
response.Write("<font size=1 face='MS Sans Serif'><strong>No hay registros para este query</strong></font>")
response.end
end if
Const graphHeight2 = 200
Const graphWidth2 =50
Const barImage2 = "images\color"

sub BarChart2(data2, labels2, title2, axislabel2)
'PARA HACER EL CICLO PARA LOS DIFERENTES RESPONSABLES

'PARA HACER LA SEGUNDA TABLA CON LOS DATOS
response.Write("<br><br>")
Response.Write("<table align=center width=30 border=1 cellspacing=0 STYLE=font: bold 10px MS Sans Serif;>")
response.Write("<tr>")
Response.Write("<td colspan=4><div align=center><font size=1 face='MS Sans Serif'><strong>"&resp&"</strong></font></div></td>"&chr(13))
response.write("</tr>")
Response.Write("<tr>" & chr(13))
Response.Write("<td>&nbsp;</td>"&chr(13))
Response.Write("<td nowrap><font size=1 face='MS Sans Serif'><strong>Cant. Propuestas</strong></font></td>" & chr(13))
Response.Write("<td><font size=1 face='MS Sans Serif'><strong>No. Días</strong></font></td>"&chr(13))
Response.Write("<td><font size=1 face='MS Sans Serif'><strong><center>%</center></strong></font></td>"&chr(13))
Response.Write("</tr>" & chr(13))
total=0
i2=0

for i=LBound(data2) to UBound(data2)
i2=i2+1
if i2=13 then
i2=0
end if

if i<>rs2.recordcount then

Response.Write("<tr>" & chr(13))
Response.Write(" <td> <IMG SRC=""" & barImage & cstr(i2+1) &".gif"& """ ></td> "&chr(13))
Response.Write("<td nowrap><font size=1 face='MS Sans Serif'><strong>"&labels2(i)&"</strong></font></td>" & chr(13))
Response.Write("<td><div align=center><font size=1 face='MS Sans Serif'><strong>"&data2(i)&"</strong></font></div></td>"&chr(13))

'response.Write("el valor de rs es "+cstr(rs("consecutivo"))+"<br>")

Response.Write("<td><div align=center><font size=1 face='MS Sans Serif'><strong>"&round((100*labels2(i))/cint(rsc2("consecutivo")),2)&"</strong></font></div></td>"&chr(13))
Response.Write("</tr>" & chr(13))
total=cint(data2(i))+total
else
' Response.Write("<tr>" & chr(13))
' Response.Write(" <td>&nbsp;</td> "&chr(13))
' Response.Write("<td nowrap><font size=1 face='MS Sans Serif'><strong>Total</strong></font></td>" & chr(13))
' Response.Write("<td><div align=center><font size=1 face='MS Sans Serif'><strong>"&total&"</strong></font></div></td>"&chr(13))
' Response.Write("</tr>" & chr(13))

'i2=i2+1

end if
next
response.Write("<tr>")
Response.Write("<td colspan=4><div align=center><font size=1 face='MS Sans Serif'><strong>Total: "&rsc2("consecutivo")&"</strong></font></div></td>"&chr(13))
Response.Write("</tr></table><br><br>" & chr(13))
'************************************************
'Print heading
Response.Write("<TABLE ALIGN=CENTER CELLSPACING=0 CELLPADDING=1 BORDER=0 STYLE='font: bold 12px 'MS Sans Serif';'")
Response.Write(" WIDTH=" & graphWidth & ">" & chr(13))
Response.Write("<TR><TH COLSPAN=" & UBound(data2) - LBound(data2) + 2)
Response.Write(">")
Response.Write("<FONT SIZE=+2>" & title2 & "</FONT></TH></TR>")
Response.Write("<TR><TD VALIGN=TOP ALIGN=RIGHT>" & chr(13))

'Find the highest value
Dim hi, low
hi = data2(LBound(data2))

Dim i
for i = LBound(data2) to UBound(data2)
if cint(data2(i)) > cint(hi) then
hi = data2(i)
end if
next

'Print out the highest value at the top of the chart
Response.Write(hi & "</TD>")

Dim widthpercent
widthpercent = CInt((1 / (UBound(data2) - LBound(data2) + 1)) * 100)
i2=0
For i = LBound(data2) to UBound(data2)
i2=i2+1
if i2=13 then
i2=0
end if
if i<>rs2.recordcount then
Response.Write(" <TD VALIGN=BOTTOM ROWSPAN=2 WIDTH=")
  #2 (permalink)  
Antiguo 24/02/2004, 13:54
 
Fecha de Ingreso: enero-2002
Ubicación: Bogotá
Mensajes: 438
Antigüedad: 22 años, 5 meses
Puntos: 2
Response.Write(widthpercent & "% >" & chr(13))
Response.Write(" <IMG SRC=""" & barImage & cstr(i2+1) &".gif"& """ WIDTH=100% ")
Response.Write("HEIGHT=" & CInt(data2(i))/cint(hi) * cint(graphHeight) & ">")
Response.Write(chr(13))
response.Write(labels2(i))
Response.Write(" </TD>" & chr(13))
end if
Next

Response.Write("</TR>")
Response.Write("<TR><TD VALIGN=BOTTOM ALIGN=RIGH>>0</TD></TR>")

'Write footer/labels
Response.Write("<TR><TD ALIGN=RIGHT VALIGN=BOTTOM><font size=1 face='MS Sans Serif'>")
Response.Write(axislabel2 & "</font></TD>" & chr(13))

for i = LBound(labels2) to UBound(labels2)
'Response.Write("<TD VALIGN=BOTTOM ALIGN=CENTER><font size=1 face='MS Sans Serif'>" & labels(i))
Response.Write("<TD VALIGN=BOTTOM ALIGN=CENTER><font size=1 face='MS Sans Serif'>")
Response.Write("</font></TD>" & chr(13))
next

Response.Write("</TR>" & chr(13))
Response.Write("</TABLE>")

end sub

%>
<%
'set rs=conn.execute(sql)
n=cint(rs2.recordcount)

Dim dataArray2()

Redim dataArray(n)
i=0
while not rs2.eof
dataArray(i)=rs2("fechatot")
i=i+1
rs2.movenext
wend


Dim labelArray2()

Redim labelArray2(n)

j=0
rs2.movefirst

while not rs2.eof
labelArray(j)=rs2("consecutivo")
j=j+1
rs2.movenext
wend
'end if
%>
<%
BarChart2 dataArray, labelArray,"Tiempo establecido para entrega"," "
%>

como puedo solucionar esto?
  #3 (permalink)  
Antiguo 25/02/2004, 06:09
 
Fecha de Ingreso: octubre-2003
Ubicación: Granada
Mensajes: 481
Antigüedad: 20 años, 8 meses
Puntos: 1
no veas no podias ser menos explicito y centrar el problema pq no podemos leer to el codigo y entenderlo amigo Un saludo
__________________
la duda es el principio del saber
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:34.