|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper Build Web 2.0 Applications Without Hand-Coding Download now! |
|
#1
|
|||
|
|||
|
Porblems using the Stored Procedure - SQL 7.0
<i><b>Originally posted by : Joćo Luiz (jluiz@easynet.com.br)</b></i><br /><br />I have the problem to the Stored Procedure using SQL 7.0, the SP not return value, process next error:<br /><br />ADODB.Recordset error '800a0e78' <br />Operation is not allowed when the object is closed. <br />/100/203/gstsbg41.asp, line 43 <br /><br />The Code is:<br />Set Rs = Server.CreateObject ("ADODB.Recordset")<br />Set Rs2 = Server.CreateObject ("ADODB.Recordset")<br />Set ObjComm = Server.CreateObject("adodb.Command")<br /><br /> Server.ScriptTimeOut = 1000<br /> ObjComm.ActiveConnection = Con<br /> ObjComm.CommandType = 04<br /> ObjComm.CommandTimeout = 1000<br /> ObjComm.CommandText = "[corerjp979538].[Calcula Data Posicao Mensal]"<br /><br /> Con.CursorLocation = 3 'adUseClient<br /><br />Set rs = ObjComm.Execute <br /><br />If Not rs.eof then<br /> dt_carga = Trim(rs("dt_carga").value) <br /> response.write(dt_carga)<br /> rs.close<br />else<br /> dt_carga = ""<br /> rs.close<br /> response.end<br />end if<br /><br />ObjComm.CommandText = "[corerjp984377].[GPAR - GSTSBG41 - FORMALIZADOS E SOLICITADOS - SINTETICO]"<br />ObjComm.Parameters("@DT_CARGA") = dt_carga<br /><br />Set rs2 = ObjComm.Execute <br />'Set Rs2 = Con.Execute ("SELECT * FROM Temp_Resultado")<br /><br />'Rs.Open ObjComm<br /><br />'Rs2.Open "Execute [corerjp947134].[GPAR - GSTSBG41 - FORMALIZADOS E SOLICITADOS - SINTETICO] '2001-05-31'", Con<br /><br />If not(Rs2.EOF) then '- The Line error.<br /> response.write "entrou"<br />response.end<br /><br />The SP using the temporary table if select the data, and the finish i have one SELECT in tamporary table, using Query Analyser the reponse is:<br /><br />Warning: Null value eliminated from aggregate.<br /><br />(1 row(s) affected)<br />...<br />(1 row(s) affected)<br /><br />Fields and Values of the SELECT<br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Venkat Atluri (v_raoatluri@hotmail.com)</b></i><br />Where was the Con object initialized or defined? First the connection has to be opened and then it should be asociated with thecommand object before using the Execute method of the command object.<br />Please check your code for this sequence and it may help.<br /><br />Venkat Atluri.<br /><br /><br />------------<br />Joćo Luiz at 6/25/2001 9:53:54 AM<br /><br /><br />I have the problem to the Stored Procedure using SQL 7.0, the SP not return value, process next error:<br /><br />ADODB.Recordset error '800a0e78' <br />Operation is not allowed when the object is closed. <br />/100/203/gstsbg41.asp, line 43 <br /><br />The Code is:<br />Set Rs = Server.CreateObject ("ADODB.Recordset")<br />Set Rs2 = Server.CreateObject ("ADODB.Recordset")<br />Set ObjComm = Server.CreateObject("adodb.Command")<br /><br /> Server.ScriptTimeOut = 1000<br /> ObjComm.ActiveConnection = Con<br /> ObjComm.CommandType = 04<br /> ObjComm.CommandTimeout = 1000<br /> ObjComm.CommandText = "[corerjp979538].[Calcula Data Posicao Mensal]"<br /><br /> Con.CursorLocation = 3 'adUseClient<br /><br />Set rs = ObjComm.Execute <br /><br />If Not rs.eof then<br /> dt_carga = Trim(rs("dt_carga").value) <br /> response.write(dt_carga)<br /> rs.close<br />else<br /> dt_carga = ""<br /> rs.close<br /> response.end<br />end if<br /><br />ObjComm.CommandText = "[corerjp984377].[GPAR - GSTSBG41 - FORMALIZADOS E SOLICITADOS - SINTETICO]"<br />ObjComm.Parameters("@DT_CARGA") = dt_carga<br /><br />Set rs2 = ObjComm.Execute <br />'Set Rs2 = Con.Execute ("SELECT * FROM Temp_Resultado")<br /><br />'Rs.Open ObjComm<br /><br />'Rs2.Open "Execute [corerjp947134].[GPAR - GSTSBG41 - FORMALIZADOS E SOLICITADOS - SINTETICO] '2001-05-31'", Con<br /><br />If not(Rs2.EOF) then '- The Line error.<br /> response.write "entrou"<br />response.end<br /><br />The SP using the temporary table if select the data, and the finish i have one SELECT in tamporary table, using Query Analyser the reponse is:<br /><br />Warning: Null value eliminated from aggregate.<br /><br />(1 row(s) affected)<br />...<br />(1 row(s) affected)<br /><br />Fields and Values of the SELECT<br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Porblems using the Stored Procedure - SQL 7.0 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|