Stream Problem....

Results 1 to 2 of 2

Thread: Stream Problem....

  1. #1
    Join Date
    Dec 1969

    Default Stream Problem....

    &#039;--Create the disconnected recordset to store the cart content information<BR> Set objContents = Server.CreateObject("ADODB.Recordset")<BR><BR> objcontents.fields.append "ProdID",adVarChar,1<BR> objcontents.fields.append "Qty",adVarChar,1<BR> objcontents.fields.append "Options",adVarChar,255<BR><BR> objContents.CursorLocation = adUseClient<BR> objContents.CursorType = adOpenStatic<BR><BR> objContents.Open <BR><BR> &#039;--Check to see if there is already items in the cart, if so load them into the recordset<BR> If Not objRS("Contents") = "null" then<BR> objContents.Open (stmContents)<BR> End If<BR><BR><BR> &#039;--Add the newly added product information into the cart XML string.<BR> objContents.AddNew<BR> objContents.Fields("ProdID") = request.form("ProdID")<BR> objContents.Fields("Qty") = request.form("Qty")<BR> objContents.Fields("Options") = session("Options")<BR> objContents.Update<BR><BR><BR> &#039;--Now that the recordset is updated with the newly added item, restream it to XML<BR> objContents.Save stmContents, adPersistXML<BR><BR>response.write stmContents adReadAll<BR>Response.End<BR><BR>The response.write line generates a Type Mismatch error. I can do a stmContents.SavetoFile and it writes out a file just fine, but I don&#039;t understand why I can&#039;t store the information in a variable. I can&#039;t even write it to the screen. Any ideas would be mighty helpful.

  2. #2
    Join Date
    Dec 1969

    Default RE: Stream Problem....

    &#062;response.write stmContents adReadAll<BR><BR>What is that adReadAll? If you are doing a Response.Write, you shouldn&#039;t need to specify other parameters unless you calling a function. In that case, you would need parenthesis around the parameters.<BR><BR>-Doug

Posting Permissions

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