Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 1st, 2004, 03:15 AM
Authorized User
 
Join Date: Nov 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Please HELP Session Problem

HI
i'm facing a problem and i don't know why
i'm retrieving data from a sqlserver databse

select a from table name where ....
then i read the value
by using the executereader finction.
i want to store this value in a session variable.
whenever i store a float sqldatatype in a session no problem accured.
but when i store the a value that has a char sqldatatype in a session.
the following error occured:

cast from string " value of 'a'" to type 'Double' is not valid.

the session is stored in this way:

session("a") = Int(Datareader.Item("a"))

i know that it souldn't be converted to integer but what is the right data conversion that must be used in this case. I nedd to get the value from the query that is a char value as string. the value in the session should be as string

If Anyone can please HELP me.
THanks


Georges M. Kaddoum
__________________
<GMK>
 
Old December 1st, 2004, 05:35 AM
Authorized User
 
Join Date: Nov 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well
i've found the solution
i should keep it as it is without conversion.
session("a") = Datareader.Item("a")

thanks anyway.

Georges M. Kaddoum





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session Out Problem kasipandian J2EE 3 March 21st, 2008 03:35 PM
session problem MunishBhatia ASP.NET 2.0 Professional 9 October 6th, 2007 04:06 AM
Session problem abdulweb General .NET 3 August 27th, 2007 08:01 PM
session problem smsone PHP Databases 1 May 17th, 2006 05:34 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.