|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can a Guru take a look at my code
Hi there,
I keep getting "Item cannot be found in the collection corresponding to the requested name or ordinal. Error 3265" even though the field is not empty while selecting its value. <% Sub GetContent ( ByVal Url, ByVal PageName, ByRef txtArray, ByRef numTxt ) dim cn, RS, counter, cmd, errCode Set cn = Server.CreateObject("ADODB.Connection") Set RS = Server.CreateObject("ADODB.Recordset") Set cmd = Server.CreateObject("ADODB.Command") cn.ConnectionString = connString cn.Open HandleFatalError cmd.ActiveConnection = cn On Error Resume Next With cmd .CommandType = adCmdStoredProc .Parameters.Append cmd.CreateParameter("RETURN_VALUE", adInteger, adParamReturnValue) .CommandText = "sp_WEB_get_content" .Parameters.Append cmd.CreateParameter("@pUrl", adVarChar, adParamInput, 100, Url) .Parameters.Append cmd.CreateParameter("@pContentType", adVarChar, adParamInput, 20, "text" ) .Parameters.Append cmd.CreateParameter("@pPageName", adVarChar, adParamInput, 50, PageName ) .CommandTimeout = LongTimeout End With RS.Open cmd,,,,adCmdStoredProc HandleFatalError counter = 0 Do While Not RS.EOF txtArray(counter) = RS.Fields(0).value counter = counter + 1 RS.MoveNext Loop RS.Close numTxt = counter if RS.open = True then RS.Close End if cn.close Set RS = nothing Set cmd = nothing Set cn = nothing End Sub %> Any help is appreciated niju |
|
#2
|
||||
|
||||
|
Item not found means that if you saying;
Select * from table where unique_id = 1 If unique_id didn't exist then you would recive that error, take a look at your code and find you typo. |
|
#3
|
||||
|
||||
|
I understand this error to mean, the code is requesting a certain field value from a recordset, for which that field was not returned.
|
|
#4
|
||||
|
||||
|
Same thing, you just stated it better.
) |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Can a Guru take a look at my code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|