Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics 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 June 22nd, 2004, 03:03 AM
Authorized User
 
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default login script in vb.net

hi im new to vb.net and i was wondering if anyone can help me. i have a backend database in sqlserver2000, and a windows form developed in vb.net to access the data. i need a login script so only a selective few users can access the application.

 I have a table in my database called 'login' which has username and password fields.

thanks

 
Old June 22nd, 2004, 07:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

Just have a user ID/password form that loads up first. User types userid/password in, you verify against the database, and then open up the application form and close the login form.

Brian
 
Old June 22nd, 2004, 02:03 PM
Authorized User
 
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yeah but i cant do the coding any ideas anyone?

 
Old June 22nd, 2004, 03:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

What do you mean you can't do the coding? What are you looking for us to help with? Please be more specific.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 22nd, 2004, 04:39 PM
Authorized User
 
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i understand that i have to verify the userid's and the passwords against the database, but i dont understand how to do this. if i can see some code then i will grasp the idea and take it further

 
Old June 23rd, 2004, 09:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I truly suggest you go to google.com and search for something like "Database Authentication .NET". It will come up with many examples of what your talking about.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 23rd, 2004, 11:34 AM
Authorized User
 
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ive looked on google for examples all tht i can find is examples implemented in asp.net, im doing a vb.net standalone application its not web related

 
Old June 23rd, 2004, 12:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

The functionality is the same- you just need to change the login page from a webform to a winform.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 23rd, 2004, 01:54 PM
Authorized User
 
Join Date: Jun 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if i am to use asp.net code to do this login function, when starting up studio.net do i need to open a new asp.net application or windows application. by the way users are required to enter information via a winform

 
Old June 23rd, 2004, 05:45 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Obviously, you need a Windows application if you need Windows Forms. What Hal is referring to is the code behind the logic and forms. For a task like this, you need some ADO.NET code that passes the username and password to a database and performs the validation. That part is identical in Windows Forms and Web Forms, so you should be able to reuse most of the code. Also the way you retrieve the username and password from the forms could be identical (e.g. string name = txtUserName.Text)

I think you need to look a little harder. Searching Google for "windows forms" login brought back a very useful list of links.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Eurochild by Massive Attack (Track 7 from the album: Protection) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling one VB.NET script from another kwilliams VB.NET 2 September 11th, 2006 06:26 AM
login script: user can't hit "return" for login dmerrill Java Basics 13 July 14th, 2006 07:25 PM
login script in vb.net sand133 VB Databases Basics 2 March 31st, 2006 03:41 AM
login script Apocolypse2005 Javascript 3 June 24th, 2005 04:07 PM
Login Script natmaster PHP How-To 10 June 19th, 2003 03:50 PM





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