Skip to main content
November 18, 2010
Question

Keeping A Session Item

  • November 18, 2010
  • 1 reply
  • 406 views

I am trying to create a session object from a text field located in a form that has an insert record behavour attached to it. ASP VB. The value, an ID from a previous record is not passing to the next page. Is there something in an insert record behavour does that keeps this from passing? If so please advise another method?

Thanks!

This topic has been closed for replies.

1 reply

Participating Frequently
November 18, 2010

>Is there something in an insert record

>behavour does that keeps this from passing?

No.

November 19, 2010

ok... can you help me further then..

Here is what the field looks like in the form.

<input name="ListingID" type="hidden" id="ListingID" value="<%=(Recordset1.Fields.Item("ID").Value)%>" />

Here is what the session variable looks like in the page it is supposed to pass to.

<%session("sessListingID")=Request.Form("ListingID")%>

Here is the query that says the record is empty.

<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("sessListingID") <> "") Then
  Recordset1__MMColParam = Session("sessListingID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows

Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_re2010_STRING
Recordset1_cmd.CommandText = "SELECT * FROM Vendors WHERE ID = ?"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, Recordset1__MMColParam) ' adDouble

Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>

Yes, I have confirmed the record does exist, and it does test out in Dreamweaver.

November 22, 2010

Anybody?