VB.NET and SQL Server

Need help storing/retrieving data from a database

Page 1 of 1

4 Replies - 1701 Views - Last Post: 22 May 2007 - 03:38 PM Rate Topic: -----

#1 thewolfisloose  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-May 07

VB.NET and SQL Server

Posted 20 May 2007 - 03:30 PM

Hi, I am very new to VB, I downloaded VB 2005 express and picked up the for dummies book just 4 days ago. I have familiarised myself with the basics but now I want to set myself a challenge...
I am building an application which has a login/register form at the beginning. I have finished all the front end for this part of my app but I need someone to point me in the right direction to get it to function.

I want users to be able to register and provide: username, password and email address. I want these details to be written to a database. I will need my app to check the database to see if the username is already taken.
Once this is done I want the user to be able to login with the registration details he provided, read from said database.

How should I go about this? What techniques should I use?
Any help will be greatly appreciated!

EDIT: modified title to be more descriptive ~ jayman9

This post has been edited by jayman9: 22 May 2007 - 02:22 PM


Is This A Good Question/Topic? 0
  • +

Replies To: VB.NET and SQL Server

#2 thewolfisloose  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-May 07

Re: VB.NET and SQL Server

Posted 21 May 2007 - 07:48 AM

EDIT: I have managed to get as far as adding the user details to the database on the registration form but I do not know how to check whether the username already exists or not. Ideas?

I still need to do the actual login bit also... reading from the database. (I'm using SQL server 2005 (.mdf))
Was This Post Helpful? 0
  • +
  • -

#3 thewolfisloose  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-May 07

Re: VB.NET and SQL Server

Posted 22 May 2007 - 12:28 PM

ok.... What do I need to tell you to get someone to give me some advice on this??
Was This Post Helpful? 0
  • +
  • -

#4 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: VB.NET and SQL Server

Posted 22 May 2007 - 02:21 PM

Not everybody is on here all the time. So please be patient until someone is able to provide you with an answer to your question. Sometimes that can take anywhere from a few minutes to a few days.

Also, use more descriptive titles when creating posts that help describe the problem you are having. Similar to the new title I gave your topic.

Now to answer your question.

How are you currently retrieving data from the database: ie. Data Adapter and data set, hard coded SQL statements, etc. ?

Are you familiar with writing SQL statements?

As far as checking the database for usernames and passwords, you will need to write some SQL statements using the WHERE clause and providing the information that you are looking for in the database. If you don't know how to write SQL, then you will need to set up data adapters to retrieve the specific information that you want from the database.

You might try reading some of the following tutorials to get you started with ADO.NET.
http://www.developer...o.uk/show/4278/
http://www.developer...uk/show/4286/1/
http://www.developer....co.uk/show/48/

It will also be beneficial if you supply the code that you have currently created in your attempt to complete your project. Then we can see where you stand and offer suggestions as to what you need to do.
Was This Post Helpful? 0
  • +
  • -

#5 thewolfisloose  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 20-May 07

Re: VB.NET and SQL Server

Posted 22 May 2007 - 03:38 PM

Ok thank you very much for replying. I knew my title was bad but i'm used to forums not allowing me to change the title.

I'm using a data adapter and dataset to retrieve data. I am struggling to understand how these work but I will take a look at the links you posted. When I post again, if I'm still having problems, I'll post my code. Cheers
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1