Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To 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 February 26th, 2007, 09:55 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Basic Login Form

Hi, I need help to create a basic login form for a Windows application. It needs to check the username and password against a SQL database, the details of the project are below:

Project Name: stockVB
Login Form name: loginfrm
Login Username textbox: usertxtbox
Login Password textbox: passtxtbox
Login Button: loginbtn
Form to open upon successful login: mainmenu
SQL database Dataset name: stockds
SQL database Connection string name: stockcs
User details table: users
Username column: Username
Password column: Password

I hope this is all the infomation you need, I am quite new at this so i need it quite basic.

Thanks

Andrew
 
Old February 26th, 2007, 10:06 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

....I assume you are looking for someone to create this for you? You are not going to have any luck with that here, however, if you have a piece of problematic code or something such as that i would be happy to help you with it, i just wont do your work for you.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html

Discussion:
http://p2p.wrox.com/topic.asp?TOPIC_ID=56429
 
Old February 26th, 2007, 10:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

homework?

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
 
Old February 26th, 2007, 11:55 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, as I said I am new at this and unfortunatly I have got no where with it. All I need is some help to know how to verify a textbox against a SQL database column, I just need somewhere to start really because at the moment I am just going no where.

Thanks

Andrew

 
Old February 26th, 2007, 11:59 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Basically, you would do something like this:

SQL String:
"SELECT * FROM users where Username='" & txtUsername.Text &"' AND password='" & txtPassword.Text &"'"

If the above query returns 0 results, the username or password is invalid, if it returns a row (It should always only return 1 row) then the username and password are correct.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html

Discussion:
http://p2p.wrox.com/topic.asp?TOPIC_ID=56429





Similar Threads
Thread Thread Starter Forum Replies Last Post
Login form haswalt VB Databases Basics 3 June 25th, 2007 12:27 AM
Login Form NetNoob BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 November 3rd, 2006 01:01 AM
how to make a windows form using visual basic? method Access VBA 1 March 9th, 2005 04:38 PM
Login to web portal from visual basic form Raghavendra_Mudugal VB How-To 0 December 2nd, 2004 03:10 AM
Incredibly Basic Question, pop up form Kikketer VB.NET 2002/2003 Basics 9 June 12th, 2004 08:52 AM





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