CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Español

 Error ADODB.Recorset utilzando codecharge

Print topic Send  topic

Author Message
Oscar
Posted: 11/21/2006, 3:09 AM

Hola a todos

Trabajo con una web realizada en ASP utilizando codecharge 3.0 y
SQLServer2005

La pagina web a la que intento acceder me da el siguiente error:

ADODB.Recordset error '800a0e78'
La operación no está permitida si el objeto está cerrado.
C:\INETPUB\WWWROOT\JPT\OBRAS\..\Common.asp/Classes.asp, línea 3319


Sin embargo si trato de acceder a otras paginas del web no tengo problemas,
o al menos que conozca.

La linea 3319 del archivo classes.asp es la siguiente: "If Not
IsEmpty(mCountSQL) And Len(CountSQL) = 0 And NOT DataSource.Recordset.EOF
Then"


Se trata de una linea de la funcion "DoOpen" que la pone el codecharge
automaticamente y definida de la siguiente forma:

Private Function DoOpen()
Dim Command
Dim builtSQL
Dim DataSource
Dim CountRecordset
Dim ResultRecordset
Dim CCSEventResult
Dim ParameterValue
Dim Parameter

Set DataSource = new clsDataSource
If IsObject(Connection) Then _
Set DataSource.Connection = Connection
Set DataSource.Command = Me

Select Case CommandType
Case dsTable, dsSQL
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me)
If InStr(SQL, "{SQL_Where}") > 0 Or InStr(SQL,"{SQL_OrderBy}") > 0
Then
SQL = Replace(SQL, "{SQL_Where}", IIf(Len(Where) > 0, " WHERE " &
Where, ""))
If InStr(SQL,"{SQL_OrderBy}") > 0 Then
SQL = Replace(SQL, "{SQL_OrderBy}", IIf(Len(OrderBy) > 0, "
ORDER BY " & OrderBy, ""))
Else
SQL = SQL & IIf(Len(OrderBy) > 0, " ORDER BY " & OrderBy, "")
End If
builtSQL = ParseParams(SQL, WhereParameters)
Else
builtSQL = ParseParams(SQL & IIf(Len(Where) > 0, " WHERE " &
Where, "") & IIf(Len(OrderBy) > 0, " ORDER BY " & OrderBy, ""),
WhereParameters)
End If
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me)
Set DataSource.Recordset = OpenRecordset(builtSQL,False)
If ActivePage > 0 And IsNeedMoveToPage Then
DataSource.MoveToPage ActivePage
End If
If Not IsEmpty(mCountSQL) And Len(CountSQL) = 0 And NOT
DataSource.Recordset.EOF Then
If DataSource.Recordset.State = adStateOpen Then
Dim Counter : Counter = 0
While NOT DataSource.Recordset.EOF AND Counter < mPageSize+1
Counter = Counter + 1
DataSource.Recordset.MoveNext
Wend
DataSource.RecordCount = IIF(ActivePage>0,(ActivePage - 1) *
mPageSize, 0) + Counter
End If
If ActivePage > 0 Then
DataSource.Recordset.MoveFirst
DataSource.MoveToPage ActivePage
End If
End If


CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me)
If Errors.Count > 0 Then
DataSource.Errors.AddErrors Errors
End If
Set DoOpen = DataSource

Case dsProcedure
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me)
Set Command = CreateSP()
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me)
Set DataSource.Recordset = Connection.Execute(Command)

If IsArray(CommandParameters) Then
For I = 0 To UBound(CommandParameters)
If IsArray(CommandParameters(I)) Then
If CommandParameters(I)(3)=adParamInputOutput Or _
CommandParameters(I)(3)=adParamOutput Or _
CommandParameters(I)(3)=adParamReturnValue Then
DataSource.HasOutPutParameters = True
Exit For
End If
End If
Next

If Connection.Database = "MSSQLServer" Then
If DataSource.HasOutPutParameters Then
While (Not DataSource.Recordset is Nothing)
Set DataSource.Recordset=DataSource.Recordset.NextRecordset
Wend
End If
End If

For I = 0 To UBound(CommandParameters)
If IsArray(CommandParameters(I)) Then
If CommandParameters(I)(3)=adParamInputOutput Or _
CommandParameters(I)(3)=adParamOutput Or _
CommandParameters(I)(3)=adParamReturnValue Then
Parameters.ParameterSources(CommandParameters(I)(1))=Command.Parameters(CommandParameters(I)(0))
DataSource.HasOutPutParameters = True
End If
End If
Next

If Connection.Database = "MSSQLServer" Then
If DataSource.HasOutPutParameters Then
Set DataSource.Recordset = Connection.Execute(Command)
End If
End If
End If

If ActivePage > 0 Then
DataSource.MoveToPage ActivePage
End If

If DataSource.Recordset.State > 0 Then
Dim TempNumber : TempNumber = 0
Do While TempNumber <> RecordsetNumber
Set DataSource.Recordset = DataSource.Recordset.NextRecordset
If DataSource.Recordset is Nothing Then
DataSource.Errors.AddError("wrong RecordsetNumber")
Exit Do
End If
TempNumber = TempNumber + 1
Loop
End If

CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me)
If Connection.Errors.Count > 0 Then
DataSource.Errors.AddErrors Connection.Errors
End If

Set Command = Nothing
Set DoOpen = DataSource

Case dsListOfValues
Dim I
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me)
Set DataSource.Recordset = CreateObject("ADODB.Recordset")
DataSource.Recordset.Fields.Append "bound", adBSTR, 256,
adFldCacheDeferred + adFldUpdatable
DataSource.Recordset.Fields.Append "text", adBSTR, 256,
adFldCacheDeferred + adFldUpdatable
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me)
DataSource.Recordset.Open
For I = 0 To UBound(mLOV(0))
DataSource.Recordset.AddNew
DataSource.Recordset.Fields("bound").Value = mLOV(0)(I)
DataSource.Recordset.Fields("text").Value = mLOV(1)(I)
Next
DataSource.Recordset.Update
DataSource.Recordset.MoveFirst
CCSEventResult = CCRaiseEvent(CCSEvents, "AfterExecuteSelect", Me)
Set DoOpen = DataSource
End Select
End Function


Alguna idea para resolver cual es el problema.


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.