Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Session Varaible set by Database Value Not Working


Message #1 by "Andy F. Jespersen" <andyj@m...> on Fri, 22 Dec 2000 04:24:14 -0000
I am attempting to set a session variable with a database field value. I

attempt to see the contents of the variable with a Response.Write session(

"cartid" ) and the contents of the database field value with a

Response.Write newbasket( "basketid" ), both contents come back blank.



	Set newbasket=Server.CreateObject("ADODB.recordset")

	newbasket.Open "baskets", oConn,3,2

	newbasket.AddNew

	newbasket.Update

	session( "cartid" ) = newbasket( "basketid" )



Any help would be greatly appreceated...



Thanx in advance...



Andy Jespersen



--- 

FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

INSIGHTS IN YOUR INBOX!

Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb?s

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by "bizindia" <bizindia@h...> on Fri, 22 Dec 2000 14:33:53 +0530
This is a multi-part message in MIME format.



------=_NextPart_000_0015_01C06C24.354D3A50

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



HI,

1) First  thing you check if the value comming from database is not 

blank or null

2) Take the values comming from the database in varaible and then assign 

it to session

Hope this would help you out,If there is any thing other then do feel  

free to ask

Thanks

Palan



----------------------------------------------------------------------

Find Your Dream Job right here at Jobsure...

----------------------------------------------------------------------



http://www.JobSure.com

JobSure@J...

-----------------------------------

  ----- Original Message -----

  From: Andy F. Jespersen

  To: ASP Databases

  Sent: Friday, December 22, 2000 9:54 AM

  Subject: [asp_databases] Session Varaible set by Database Value Not 

Working





  I am attempting to set a session variable with a database field value. 

I

  attempt to see the contents of the variable with a Response.Write 

session(

  "cartid" ) and the contents of the database field value with a

  Response.Write newbasket( "basketid" ), both contents come back blank.



  Set newbasket=3DServer.CreateObject("ADODB.recordset")

  newbasket.Open "baskets", oConn,3,2

  newbasket.AddNew

  newbasket.Update

  session( "cartid" ) =3D newbasket( "basketid" )



  Any help would be greatly appreceated...



  Thanx in advance...



  Andy Jespersen



  ---

  FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

  INSIGHTS IN YOUR INBOX!

  Get the latest and best C++, Visual C++, Java, Visual Basic, and XML 

tips, tools, and

  developments from the experts.  Sign up for one or more of EarthWeb?s

  FREE IT newsletters at http://www.earthweb.com today! 




leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com









--- 

FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

INSIGHTS IN YOUR INBOX!

Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb?s

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com








Message #3 by Stephane_Dattenny@D... on Fri, 22 Dec 2000 01:59:50 -0600
Hi



What you want to do is strange !!



newbasket.AddNew

newbasket.Update



????? I think you want to retreive the identity field after having inserted

a new row in your table.



Look at http://support.microsoft.com/support/kb/articles/Q190/3/70.ASP

and http://support.microsoft.com/support/kb/articles/Q221/9/31.ASP







Best regards / Cordialement

 

Stephane Dattenny

Dell Computers - EMEA IT - VB and Web developer

Phone: +33 (0)4 99 75 49 88 



 





-----Original Message-----

From: Andy F. Jespersen [mailto:andyj@m...]

Sent: 22 December 2000 05:24

To: ASP Databases

Subject: [asp_databases] Session Varaible set by Database Value Not

Working





I am attempting to set a session variable with a database field value. I

attempt to see the contents of the variable with a Response.Write session(

"cartid" ) and the contents of the database field value with a

Response.Write newbasket( "basketid" ), both contents come back blank.



	Set newbasket=Server.CreateObject("ADODB.recordset")

	newbasket.Open "baskets", oConn,3,2

	newbasket.AddNew

	newbasket.Update

	session( "cartid" ) = newbasket( "basketid" )



Any help would be greatly appreceated...



Thanx in advance...



Andy Jespersen







---

FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS

IN YOUR INBOX!

Get the latest and best HTML, XML, and JavaScript tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb's

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index