Click here to Skip to main content
15,913,758 members
Home / Discussions / Database
   

Database

 
AnswerRe: update special row Pin
Eddy Vluggen12-Apr-13 6:50
professionalEddy Vluggen12-Apr-13 6:50 
Questionthe insert command doesnt work Pin
sara-setare10-Apr-13 18:27
sara-setare10-Apr-13 18:27 
AnswerRe: the insert command doesnt work Pin
PIEBALDconsult10-Apr-13 19:00
mvePIEBALDconsult10-Apr-13 19:00 
GeneralRe: the insert command doesnt work Pin
sara-setare10-Apr-13 19:14
sara-setare10-Apr-13 19:14 
AnswerRe: the insert command doesnt work Pin
Pallavi Waikar10-Apr-13 19:55
Pallavi Waikar10-Apr-13 19:55 
GeneralRe: the insert command doesnt work Pin
sara-setare10-Apr-13 20:19
sara-setare10-Apr-13 20:19 
GeneralRe: the insert command doesnt work Pin
Richard Deeming11-Apr-13 1:53
mveRichard Deeming11-Apr-13 1:53 
AnswerRe: the insert command doesnt work Pin
Richard Deeming11-Apr-13 1:51
mveRichard Deeming11-Apr-13 1:51 
Avoiding SQL Injection[^] isn't hard:
C#
protected void  CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
    const string connectionstr = @"...";
    const string sqlstring = "insert into Authenticate (username, password) VALUES (@username, @password)";

    using (var con = new System.Data.SqlClient.SqlConnection(connectionstr))
    using (var objcommand = new System.Data.SqlClient.SqlCommand(sqlstring, con))
    {
        objcommand.Parameters.AddWithValue("@username", CreateUserWizard1.UserName);
        objcommand.Parameters.AddWithValue("@password", CreateUserWizard1.Password);
        
        con.Open();
        objcommand.ExecuteNonQuery();
    }
    
    Response.Redirect("~/Login.aspx");
}

Once you've fixed that problem, you then need to reconsider how you're storing the passwords. Currently, you're storing them as plain text, which is a terrible idea. If anyone managed to gain access to your database, they would be able to see every password used on your site.

Instead, you should be storing a salted hash of the passwords:
http://crackstation.net/hashing-security.htm[^]



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionOleDb Overflow error Pin
TheJudeDude10-Apr-13 9:13
TheJudeDude10-Apr-13 9:13 
AnswerRe: OleDb Overflow error Pin
TheJudeDude10-Apr-13 9:28
TheJudeDude10-Apr-13 9:28 
Questionhow to create the databse?? Pin
tazeen ansari10-Apr-13 0:22
tazeen ansari10-Apr-13 0:22 
AnswerRe: how to create the databse?? Pin
Eddy Vluggen10-Apr-13 0:35
professionalEddy Vluggen10-Apr-13 0:35 
AnswerRe: how to create the databse?? Pin
Shanalal Kasim12-Apr-13 0:03
Shanalal Kasim12-Apr-13 0:03 
AnswerRe: how to create the databse?? Pin
indra kurnia13-May-13 6:57
indra kurnia13-May-13 6:57 
QuestionTable Design help with 2 computed columns Pin
Simon_Whale10-Apr-13 0:14
Simon_Whale10-Apr-13 0:14 
AnswerRe: Table Design help with 2 computed columns Pin
Eddy Vluggen10-Apr-13 0:23
professionalEddy Vluggen10-Apr-13 0:23 
GeneralRe: Table Design help with 2 computed columns Pin
Simon_Whale10-Apr-13 1:28
Simon_Whale10-Apr-13 1:28 
AnswerRe: Table Design help with 2 computed columns Pin
Mycroft Holmes10-Apr-13 1:50
professionalMycroft Holmes10-Apr-13 1:50 
GeneralRe: Table Design help with 2 computed columns Pin
Simon_Whale10-Apr-13 1:55
Simon_Whale10-Apr-13 1:55 
GeneralRe: Table Design help with 2 computed columns Pin
Mycroft Holmes10-Apr-13 2:23
professionalMycroft Holmes10-Apr-13 2:23 
GeneralRe: Table Design help with 2 computed columns Pin
Simon_Whale10-Apr-13 2:24
Simon_Whale10-Apr-13 2:24 
QuestionHow To Use Pivot in SQL SERVER Pin
srikrishnach9-Apr-13 23:55
srikrishnach9-Apr-13 23:55 
AnswerRe: How To Use Pivot in SQL SERVER Pin
Eddy Vluggen10-Apr-13 0:35
professionalEddy Vluggen10-Apr-13 0:35 
AnswerRe: How To Use Pivot in SQL SERVER Pin
Mycroft Holmes10-Apr-13 1:45
professionalMycroft Holmes10-Apr-13 1:45 
AnswerRe: How To Use Pivot in SQL SERVER Pin
Shanalal Kasim12-Apr-13 0:06
Shanalal Kasim12-Apr-13 0:06 

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.