Stream Object not getting all the records.

Results 1 to 2 of 2

Thread: Stream Object not getting all the records.

  1. #1
    Join Date
    Dec 1969

    Default Stream Object not getting all the records.

    Hi All,<BR> I&#039;m having a problem with getting all the records from a recordset into stream object. No matter how many records i get in the recordset, i get only specific number of records once i convert the recordset into a stream. For example, after querying i&#039;m getting 600 records and once i saved the recordset into a stream object, and saved it back into recordset, i&#039;m getting only 352 records. One thing i understood was that only specific amount of data was being saved, but dont know why. Same code was working for other people on the same server.<BR>I would really appreciate any help.<BR>Please look at the code below.<BR>-------------------------------------<BR> set objRst = Server.CreateObject("ADODB.Recordset")<BR> set objRst = objCn.Execute(strSQL, iCount)<BR> if Err.number &#060;&#062; 0 then<BR> Response.Write "Quering Problem." & vbcrlf & vbcrlf<BR> Response.End<BR> end if<BR> set objCn = Nothing<BR> if objRst.EOF or objRst.BOF then<BR> Response.Write "No Records."<BR> Response.End<BR> end if<BR> iCount = 0<BR> if not objRst.EOF then<BR> while not objRst.EOF<BR> iCount = iCount + 1<BR> objRst.MoveNext<BR> wend<BR> end if<BR> Response.Write "Count before streaming: " & iCount<BR> objRst.MoveFirst<BR><BR> Dim stmResults<BR> set stmResults = server.CreateObject("ADODB.Stream")<BR> stmResults.Mode = 3 &#039;read write<BR> stmResults.Open<BR> stmResults.Type = 1 &#039;adTypeBinary<BR> objRst.Save stmResults,0<BR><BR> Dim rstnew<BR> set rstnew = Server.CreateObject("ADODB.Recordset") <BR> rstnew.Open stmResults<BR> Response.Write rstnew.RecordCount<BR> if Err.Number &#060;&#062; 0 then<BR> Response.Write "Err.Number & " - " & Err.Description<BR> set stmResults = Nothing<BR> set objRst = Nothing<BR> Response.End<BR> end if<BR> set objRst = Nothing<BR> set stmResults = Nothing<BR>-------------------------------------

  2. #2
    Join Date
    Dec 1969

    Default RE: Stream Object not getting all the records.

    What are you trying to do? I think that ADODB.RecordSet.GetString() may help, but I can&#039;t tell.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts