ASP Timeout expired

02/02/2004 - 12:20 por Luis Esteban Valencia | Informe spam
My page is having this error

update mesciclo set mes = 01, ano 04 where id=1
Microsoft OLE DB Provider for SQL Server error '80040e31'

Timeout expired

/logistica/reciclopedido2.asp, line 134


The code of the page is this.

See the line 2. It seems it doesnt work.s

<%
Set Conn = Server.CreateObject("ADODB.Connection")
conn.connectiontimeout = 0
Conn.open = "Provider=SQLOLEDB.1;" & _
"Persist Security Info=True;" & _
"User ID=sa;" & _
"Initial Catalog=asw;" & _
"Data Source=MED13NT"

sql ="update mesciclo set mes = "&request.form("mes")&",
ano="&request.Form("ano")&" where id=1"
response.write sql
conn.execute(sql)

conn.execute("exec ciclo_pmes")
THE ERROR IS IN THIS LINE.

Preguntas similare

Leer las respuestas

#6 Benjamin Porter
02/02/2004 - 18:59 | Informe spam
Permisos del SQL Server al usuario IUSR para ejecucion de SP's...
Pregunta: desde asp has podido ejecutar otros SP?




Atentamente
_____________________
Benjamin Porter

(Evidentemente sin el ".punto")






"Luis Esteban Valencia" escribió en el mensaje
news:
Y a puse comentarios y en la unica linea en que falla es en esta

conn.execute("exec ciclo_pmes")

El codigo del Storre Procedure es este. Lo extraño es que ese SP si


funciona
desde el QUERY ANALIZER:
Porque??

CREATE PROCEDURE [CICLO_PMES] AS
DROP TABLE CICLO_PEDIDO

declare @mes int,@ano int
set @mes= (select mes from mesciclo where id=1)
set @ano= (select ano from mesciclo where id=1)

SELECT



'MES'=MONTH(OHODAT),CLIENTE,NOMBRE,GRUPO_CLIENTE,CIUDAD,CANAL,ZONA,'MERCADO'
ÊSE IDCOUN WHEN 'ACO' THEN 'Nacional' ELSE 'Exportacion' END,
'PEDIDO'>


IDORNO,'FACTURA'=IDINVN,'LINEA'=IDOLIN,'PRODUCTO'=IDPRDC,'FECHA_PEDIDO'=OHOD
AT,'FECHA_FACTURA'=IDIDAT,

'CICLO'=convert(int,convert(datetime,IDIDAT)-convert(datetime,OHODAT)),
'CLASIF'= (CASE when
(convert(int,convert(datetime,IDIDAT)-convert(datetime,OHODAT))) BETWEEN 0
and 2 THEN 2
when
(convert(int,convert(datetime,IDIDAT)-convert(datetime,OHODAT))) BETWEEN 3
and 5 THEN 5
when
(convert(int,convert(datetime,IDIDAT)-convert(datetime,OHODAT))) BETWEEN 6
and 10 THEN 10
when
(convert(int,convert(datetime,IDIDAT)-convert(datetime,OHODAT))) BETWEEN


11
and 15 THEN 15
when
(convert(int,convert(datetime,IDIDAT)-convert(datetime,OHODAT))) BETWEEN


16
and 30 THEN 30
when
(convert(int,convert(datetime,IDIDAT)-convert(datetime,OHODAT))) >30
THEN 40
END)
INTO CICLO_PEDIDO from srbisd,srbsol,srbsoh,ORDENES_PERF
where /*IDCUNO= 42250 AND*/ CLIENTE=IDCUNO AND idorno=olorno and
idprdc=olprdc and ohorno=idorno and ohorno=olorno and
year(ididat)=@ano and month(ohodat)=@mes and
idolin=olline order by idorno,olline




GO




"Benjamin Porter" escribió en el mensaje
news:
> Me parece que definitivamente no está conectando al servidor SQL...
>
> 1) Prueba haciendo una consulta de lectura ("select")
> 2) Prueba la misma pagina pero omite el codigo que está entre la BD.open


y
> BD.CLose. Esto debería abrir y cerrar la base, si funciona el problema
está
> en los query, si no funciona, olvidate de los query, la base simplemente
no
> está abriendo.
> 3) Postea el codigo de tu pagina y remarca la linea 134, para ver por


qué
se
> produce el error.
>
>
> Atentamente
> _____________________
> Benjamin Porter
>
> (Evidentemente sin el ".punto")
>
>
>
>
> "Luis Esteban Valencia" escribió en el mensaje
> news:%
> > Quite esas lineas . y sigue el error
> >
> >
> >
> > Microsoft OLE DB Provider for SQL Server error '80040e31'
> >
> > Timeout expired
> >
> > /logistica/reciclopedido2.asp, line 134
> >
> >
> >
> >
> >
> > "Benjamin Porter" escribió en el mensaje
> > news:%
> > > <english=on>
> > > Hi. Since this is a spanish speaker newsgroup, and your name looks
like
> a
> > > spanish name, I'll answer your question in spanish.
> > > </english>
> > >
> > > Lo que veo es que en la linea 2 estás dando nada de tiempo para que


se
> > > ejecuten las operaciones sobre la base de datos... aunque la


respuesta
> > > logica sería "deja ese valor en 30,60,etc", creo que mejor eliminas
esa
> > > linea, no le veo sentido a especificar el timeout para la conexion,
> salvo
> > > que tengas una razon real para hacerlo...
> > >
> > >
> > >
> > >
> > > Atentamente
> > > _____________________
> > > Benjamin Porter
> > >
> > > (Evidentemente sin el ".punto")
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > "Luis Esteban Valencia" escribió en el mensaje
> > > news:
> > > > My page is having this error
> > > >
> > > > update mesciclo set mes = 01, ano 04 where id=1
> > > > Microsoft OLE DB Provider for SQL Server error '80040e31'
> > > >
> > > > Timeout expired
> > > >
> > > > /logistica/reciclopedido2.asp, line 134
> > > >
> > > >
> > > > The code of the page is this.
> > > >
> > > > See the line 2. It seems it doesnt work.s
> > > >
> > > > <%
> > > > Set Conn = Server.CreateObject("ADODB.Connection")
> > > > conn.connectiontimeout = 0
> > > > Conn.open = "Provider=SQLOLEDB.1;" & _
> > > > "Persist Security Info=True;" & _
> > > > "User ID=sa;" & _
> > > > "Initial Catalog=asw;" & _
> > > > "Data Source=MED13NT"
> > > >
> > > > sql ="update mesciclo set mes = "&request.form("mes")&",
> > > > ano="&request.Form("ano")&" where id=1"
> > > > response.write sql
> > > > conn.execute(sql)
> > > >
> > > > conn.execute("exec ciclo_pmes")
> > > > THE ERROR IS IN THIS LINE.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una pregunta AnteriorRespuesta Tengo una respuesta
Search Busqueda sugerida