I have the following code:
If rs.BOF = True and rs.EOF = True Then
With rs
.AddNew
.Fields("UserID"
.Value = Request.Cookies("UserID"
.Fields("CltRefNo"
.Value = Request.Form("txtRefNo"
.Fields("OnrPolicyNo"
.Value = Request.Form("txtPolicyNo"
.Fields("OnrLastName"
.Value = Request.Form("txtVloLName"
.Fields("OnrFirstName"
.Value = Request.Form("txtVloFName"
.Fields("OnrAddress"
.Value = Request.Form("txtVloAddress"
.Fields("OnrCity"
.Value = Request.Form("txtVloCity"
.Fields("OnrStateProv"
.Value = Request.Form("txtVloStProv"
.Fields("OnrPostalCode"
.Value = Request.Form("txtVloPostalCode"
.Fields("OnrCountry"
.Value = Request.Form("txtVloCountry"
.Fields("OnrPhone1"
.Value = Request.Form("txtVloPhone1"
.Fields("OnrPhone2"
.Value = Request.Form("txtVloPhone2"
.Fields("OnrCell"
.Value = Request.Form("txtVloCell"
.Fields("OnrFax"
.Value = Request.Form("txtVloFax"
.Fields("OnrEMail"
.Value = Request.Form("txtVloEMail"
.Update
End With
Response.Cookies("ClaimNo"
= rs.Fields("ClaimNo"
.Value
Response.Write (Request.Cookies("ClaimNo"
)
Response.Write ("Hello"
'Response.Redirect "VesselInfo.asp"
Else
rs.MoveFirst
Response.Write ("Already in Database!"
End If
Shouldn't this set a cookie for the ClaimNo field in the database? The ClaimNo field is an identity column.
Once the recordset is added I need to know what the ClaimNo is for that record.
I'm using the Response.Write(Request.Cookies("ClaimNo"
) just to see if the Cookie is working. It's not. Rob
Just my $.02.
If rs.BOF = True and rs.EOF = True Then
With rs
.AddNew
.Fields("UserID"
.Fields("CltRefNo"
.Fields("OnrPolicyNo"
.Fields("OnrLastName"
.Fields("OnrFirstName"
.Fields("OnrAddress"
.Fields("OnrCity"
.Fields("OnrStateProv"
.Fields("OnrPostalCode"
.Fields("OnrCountry"
.Fields("OnrPhone1"
.Fields("OnrPhone2"
.Fields("OnrCell"
.Fields("OnrFax"
.Fields("OnrEMail"
.Update
End With
Response.Cookies("ClaimNo"
Response.Write (Request.Cookies("ClaimNo"
Response.Write ("Hello"
'Response.Redirect "VesselInfo.asp"
Else
rs.MoveFirst
Response.Write ("Already in Database!"
End If
Shouldn't this set a cookie for the ClaimNo field in the database? The ClaimNo field is an identity column.
Once the recordset is added I need to know what the ClaimNo is for that record.
I'm using the Response.Write(Request.Cookies("ClaimNo"
Just my $.02.