Hmmm,

not sure what happened there with the mime version turning up...

I've solved this.  I forgot to put the data into a DataRow.

Hammer.With.Head.Hits.Me

:)

Matt


Matthew Macdonald-Wallace wrote:
Hi once again!
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

ok, I'm trying to retrieve the data from my database and store the values in the Session as follows:

========

// create the data adapter
SqlDataAdapter DA = new SqlDataAdapter(sqlCmd);

// create the data set
DataSet DS = new DataSet();

// fill a table called "LoginResults" with the data from the query
DA.Fill(DS,"LoginResults");

// now the result is in the data-set, let's see what we've got!
if(DS.Tables["LoginResults"].Rows.Count != 0)
{
// if we get this far, then the user exists and the password is correct
// Log them in!
Session["uName"]=DS.Tables["LoginResults"].Columns["personnelLastName"].ToString();
Session["uid"] = DS.Tables["LoginResults"].Columns[0].ToString();
                                
FormsAuthentication.RedirectFromLoginPage(this.txtUname.Text,false);
}
else
{
this.lblError.Text = "Error. Username/Password do not match";
}

========

Am I missing the obvious here? Why won't the value of Session["uName"] be set to the value of the personnelLastName Column? All I get on the next page is "personnelLastName", instead of "Macdonald-Wallace" when I try and log in.

All help greatly appreciated...

Matt

____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
       Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.




____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to