Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 September 23rd, 2005, 05:20 AM
Authorized User
 
Join Date: Sep 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default User Login - For Session

Hi

Can someone help me. When you've got a login page for password & username, how do you (after validating un & pw) keep it in memory for the rest of the time that the user uses the secure information?

Regards
Helga

 
Old September 25th, 2005, 08:29 AM
Registered User
 
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

do youwant to Keep both UN and PW OR only user identity.

anyhow
If it is windows based application. create one global variable with public keyward and access it.

If it is Web Based application you can kepp it in following places
Session
Cache

Thanks and Regards
venkatesh krishnasamy
 
Old September 25th, 2005, 12:20 PM
aty aty is offline
Registered User
 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aty
Default

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim con As New SqlClient.SqlConnection
        con = New SqlClient.SqlConnection(Application("conn"))
        con.Open()

        Dim bkod As New SqlClient.SqlParameter("@bkod", SqlDbType.Char)
        Dim bsifre As New SqlClient.SqlParameter("@bsifre", SqlDbType.Char)

        bkod.Direction = ParameterDirection.Input
        bkod.Value = Trim(txtKOD.Text)

        bsifre.Direction = ParameterDirection.Input
        bsifre.Value = Trim(txtSIFRE.Text)

        Dim sp As String = "BM_GIR"

        Dim cmd As New SqlClient.SqlCommand(sp, con)
        cmd.CommandType = CommandType.StoredProcedure

        With cmd.Parameters
            .Add(bkod)
            .Add(bsifre)
        End With

        Dim deger As Boolean = False

        If cmd.ExecuteScalar <> "" Then deger = True

        If deger = True Then
            Application.Lock()
            Application.Contents("bkod") = txtKOD.Text
            Application.Contents("bsifre") = txtSIFRE.Text
            Application.UnLock()

            Response.Redirect("pen.htm")
            Literal1.Text = "Giris Bilgileriniz dogru. "
        Else
            Literal1.Text = "Giris Bilgileriniz hatali. "
        End If

        cmd.Dispose()
        con.Dispose()
        con.Close()
        con = Nothing
    End Sub






Similar Threads
Thread Thread Starter Forum Replies Last Post
login script: user can't hit "return" for login dmerrill Java Basics 13 July 14th, 2006 07:25 PM
login failed for user domain\user babakwx SQL Server 2000 2 May 30th, 2006 12:28 PM
Newbie Help. Login to unique login page per user Kainan Classic ASP Professional 10 May 3rd, 2005 07:47 AM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM





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