473,795 Members | 3,006 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a "logged out" object

UPon a user succesfully logging in, i'm having trouble creating a "log
out" link on a protected page so that users can end their session (i'm
more used to classic asp with this). Below is my subroutine to check
for login, as i want to find a way to reverse " Session("ok") ="yes" "
for a log out object:

Sub dologin(Source as Object, E as EventArgs)
Dim strConn as string =
"SERVER=xxxxxxx ;DATABASE=xxxxx x;UID=xxxx;PWD= xxxx;"
Dim MySQL as string = "Select name,password,u sid from authusers " & _
"Where name = '" & lgname.text & "' and password = '" &
lgpassword.text & "'"
Dim MyConn as New SQLConnection(s trConn)
Dim objDR as SQLDataReader
Dim Cmd as New SQLCommand(MySQ L, MyConn)
MyConn.Open()
objDR=Cmd.Execu teReader(system .data.CommandBe havior.CloseCon nection)

if Not objDR.Read() then
label1.text = "<i>Sorry - your user ID & password were not
found</i>"
objDR.Close
Myconn.Close
else
objDR.close
Myconn.Open
objDR=Cmd.Execu teReader(system .data.CommandBe havior.CloseCon nection)
Session("ok") ="yes"
response.redire ct("protectedpa ge.aspx")

End If
End Sub
Nov 22 '05 #1
0 1356

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7375
by: Akhlaq Khan | last post by:
we are developing an intranet application (web based) which needs to detect the logged in user ID of the user hitting the website. the intranet is huge and based on win2k active directory (around 20-30 different domains) with 25K+ users. i dont want to use "NT challenge response" for this pupose. I am exploring ways using ADSI and WMI to query the Active directory by using the IP address in the incoming web request and trying to figure...
0
294
by: Chumley the Walrus | last post by:
UPon a user succesfully logging in, i'm having trouble creating a "log out" link on a protected page so that users can end their session (i'm more used to classic asp with this). Below is my subroutine to check for login, as i want to find a way to reverse " Session("ok") ="yes" " for a log out object: Sub dologin(Source as Object, E as EventArgs) Dim strConn as string =
3
8073
by: Henne | last post by:
Hello, in VB6 we werr able to make ActiveX-DLL's (In Process Components) and ActiveX-Exe (Out Of Process Components). Out Application is build of one main application that starts other modules. These modules are ActiveX-Exe's. The main application controls the modules via ActiveX. We decided to use ActiveX-Exe because we want to run the modules in
2
5358
by: Berata | last post by:
Hello all, in VB6 we were able to create ActiveX-DLL's (In Process Components) and ActiveX-Exe's (Out of Process Components). We habe build up an application that exists of an main module (Standard Exe) that calls and controls other modules (ActiveX-Exe). We decided for ActiveX-Exe because they run in different processes. That means if one module shuts down, the others are still alive. Second reasons
1
2928
by: Roy Danon | last post by:
Hi, For some reason while trying to retrieve an existing value from the session object I recieve the following error : Microsoft VBScript runtime (0x800A0007) Out of memory: 'session' What can cause this error/
14
7354
by: stic | last post by:
Hi, I'm in a middle of writing something like 'exception handler wraper' for a set of different methodes. The case is that I have ca. 40 methods form web servicem, with different return values (and types), and with out parmeters. What I want to do is to support each method call with exception (http 404, soap exception, and other types of exceptions) and wrap it with try & catch (a lots of catch ;-)
2
15190
by: yotaxp | last post by:
Hello, all. This line has been pestering me, and I can't seem to figure out why the problem is occuring. I'm trying to paint a GraphicsPath onto a Bitmap, using the Graphics class, but it always seems to crash, and throw the "Out of Memory" exception when it comes to the point I need the create the object. I've been fairly strict with IDisposable.Dispose(), and the 'using' as well. It always seems to be at this exact line, when the...
4
6884
by: Rachel McConnell | last post by:
Hello, I have a Java web application using Hibernate to connect to a PostgreSQL backend. I am seeing the below stack trace during processing of a set of data consisting of around 1000 objects; for a 200 object set I don't see the exception. I believe the salient point is the Out Of Memory bit - marked below by *****'s The fact that this exception occurs during a call to
1
6658
by: Dave | last post by:
Calling an external webservice, sometimes we get "operation has timed out." the full stack trace is below (I've just replaced personal info). The webservice provider suggested it timed out trying to connect to their service which may be related to network issues. I don't see that information in the stack trace. How do you even begin to debug this to determine if it's on our end or theirs? Thanks!
7
14700
by: John Layton | last post by:
Hi there, Is it possible to pass null to a function taking an "out" (or "ref") parameter in C#. I'd like to do something like the following (which doesn't compile of course). Thanks in advance. int SomeValue; Func(null, SomeValue); // Any way to pass null for either arg? void Func(out int Param1, out int Param2)
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10448
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10167
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.