Click here to Skip to main content
15,891,473 members
Home / Discussions / Database
   

Database

 
QuestionConnection Via DSN in VB.Net Pin
MODI_RAHUL5-Sep-05 3:20
MODI_RAHUL5-Sep-05 3:20 
AnswerRe: Connection Via DSN in VB.Net Pin
Andy Brummer5-Sep-05 4:05
sitebuilderAndy Brummer5-Sep-05 4:05 
GeneralRe: Connection Via DSN in VB.Net Pin
miah alom6-Sep-05 9:44
miah alom6-Sep-05 9:44 
GeneralRe: Connection Via DSN in VB.Net Pin
Andy Brummer6-Sep-05 12:18
sitebuilderAndy Brummer6-Sep-05 12:18 
GeneralRe: Connection Via DSN in VB.Net Pin
Anonymous7-Sep-05 3:23
Anonymous7-Sep-05 3:23 
QuestionPlease help me,,(MySql Front Installation) Pin
Jeeva Mary Varghese4-Sep-05 18:38
Jeeva Mary Varghese4-Sep-05 18:38 
QuestionUser And Password with ... Pin
mostafa_h4-Sep-05 8:58
mostafa_h4-Sep-05 8:58 
AnswerRe: User And Password with ... Pin
Colin Angus Mackay4-Sep-05 9:50
Colin Angus Mackay4-Sep-05 9:50 
First, 15 chars for a password is too small. Normally the passwords I use are 20+ chars and it irritates me when a website cannot accept such a long password. The longer the password, the more secure it is because it takes longer to crack. You should use something like an nvarchar(128) for a password.

Also, you should consider looking at encryption routines so that the password is stored in a secure fashion.


manije wrote:
By the Way if Password type=int [length=4] , what's the result the check ?

That doesn't make any sense.

To check the password on your current set up:
SqlConnection conn = new SqlConnection(myConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = "SELECT id_user FROM TheUserTable "+
    "WHERE username = @username AND password = @password";
cmd.Parameters.Add("@username", myUserName);
cmd.Parameters.Add("@password", myPassword);
conn.Open();
object result = cmd.ExecuteScalar();
if (result == null)
{
    // The user / password combination is not valid. Login fails
}
else
{
    // The user / password combination passes. This is a valid user.
    int userID = (int)result;
}


Does this help?


My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More


QuestionUser And Password Pin
mostafa_h4-Sep-05 2:57
mostafa_h4-Sep-05 2:57 
AnswerRe: User And Password Pin
Colin Angus Mackay4-Sep-05 4:48
Colin Angus Mackay4-Sep-05 4:48 
Questionhow do i access a column from database Pin
ashima143-Sep-05 20:22
ashima143-Sep-05 20:22 
AnswerRe: how do i access a column from database Pin
Colin Angus Mackay3-Sep-05 21:31
Colin Angus Mackay3-Sep-05 21:31 
QuestionUpdate DataSet Pin
Zeeshan Gulzar3-Sep-05 4:15
Zeeshan Gulzar3-Sep-05 4:15 
AnswerRe: Update DataSet Pin
Besinci4-Sep-05 9:38
Besinci4-Sep-05 9:38 
GeneralRe: Update DataSet Pin
Zeeshan Gulzar6-Sep-05 5:51
Zeeshan Gulzar6-Sep-05 5:51 
QuestionVB and remote database(web) Pin
aluizs2-Sep-05 18:03
aluizs2-Sep-05 18:03 
Questioninset a Datacolumn Pin
PaulaM2-Sep-05 3:23
PaulaM2-Sep-05 3:23 
AnswerRe: inset a Datacolumn Pin
Besinci2-Sep-05 9:37
Besinci2-Sep-05 9:37 
Questionupdating the DB Pin
minkinin2-Sep-05 3:16
minkinin2-Sep-05 3:16 
AnswerRe: updating the DB Pin
Besinci2-Sep-05 10:04
Besinci2-Sep-05 10:04 
GeneralRe: updating the DB Pin
minkinin4-Sep-05 20:20
minkinin4-Sep-05 20:20 
GeneralRe: updating the DB Pin
Besinci4-Sep-05 21:24
Besinci4-Sep-05 21:24 
GeneralRe: updating the DB Pin
minkinin4-Sep-05 22:27
minkinin4-Sep-05 22:27 
GeneralRe: updating the DB Pin
Besinci5-Sep-05 7:49
Besinci5-Sep-05 7:49 
GeneralRe: updating the DB Pin
minkinin6-Sep-05 23:38
minkinin6-Sep-05 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.