Click here to Skip to main content
15,896,726 members
Home / Discussions / Database
   

Database

 
GeneralRe: the output of select command Pin
sara-setare12-Apr-13 19:44
sara-setare12-Apr-13 19:44 
Questionupdate special row Pin
sara-setare12-Apr-13 1:20
sara-setare12-Apr-13 1:20 
AnswerRe: update special row Pin
Tim Carmichael12-Apr-13 1:35
Tim Carmichael12-Apr-13 1:35 
AnswerRe: update special row Pin
Shanalal Kasim12-Apr-13 3:11
Shanalal Kasim12-Apr-13 3:11 
AnswerRe: update special row Pin
David Mujica12-Apr-13 3:11
David Mujica12-Apr-13 3:11 
GeneralRe: update special row Pin
sara-setare12-Apr-13 3:50
sara-setare12-Apr-13 3:50 
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 
Hi all
I have a problem with database.I work on " add new user.aspx "file witch add a new user to the table(Authenticate)but it doesnt work! this is my code in add new user.aspx file:
<script runat="server">
protected void  CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection();
string connectionstr=@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\EHSAN\Documents\Visual Studio 2010\Projects\The Club\The Club\App_Data\Database1.mdf;Integrated Security=True;User Instance=True";
       con.ConnectionString=connectionstr;
       string sqlstring;
       sqlstring ="insert into Authenticate (username,password)VALUES ("+ CreateUserWizard1.UserName+","+CreateUserWizard1.Password+")";
       System.Data.SqlClient.SqlCommand objcommand = new System.Data.SqlClient.SqlCommand(sqlstring, con);
       Response.Redirect("~/Login.aspx");
}
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="server">
<asp:CreateUserWizard ID="CreateUserWizard1" Runat="server" 
        oncreateduser="CreateUserWizard1_CreatedUser">
</asp:CreateUserWizard>
</asp:Content>

I execute that but it doesnt add any new row to my table!!!!
plz help me!
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 
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 

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.