Click here to Skip to main content
15,903,203 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to set the default page on asp.net Pin
Christian Graus27-Apr-07 14:39
protectorChristian Graus27-Apr-07 14:39 
QuestionASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen27-Apr-07 12:22
Ibuprofen27-Apr-07 12:22 
AnswerRe: ASP.NET C# Code Behind SQL Update on a form Pin
Christian Graus27-Apr-07 13:19
protectorChristian Graus27-Apr-07 13:19 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen27-Apr-07 13:20
Ibuprofen27-Apr-07 13:20 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Christian Graus27-Apr-07 13:57
protectorChristian Graus27-Apr-07 13:57 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen27-Apr-07 13:21
Ibuprofen27-Apr-07 13:21 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Christian Graus27-Apr-07 13:56
protectorChristian Graus27-Apr-07 13:56 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen27-Apr-07 13:58
Ibuprofen27-Apr-07 13:58 
It is in in the actual code behind? How else could it be in the .CS file? I am confused... Been working way to long to answer questions LOL... Going on 100+ hours...


I got it to work...

private void Button1_Click(object sender, System.EventArgs e)<br />
		{<br />
			<br />
			bool bNoError=true;<br />
			<br />
			OleDbConnection con = new OleDbConnection(strConnection);<br />
			string strSQL;<br />
			DataSet ds = new DataSet();<br />
			<br />
			strSQL="UPDATE t_EOT_User set [q1]='"+q1.SelectedValue+"', [q2]='"+q2.Text+"',"+<br />
				" [q3]='"+q3.SelectedValue+"', [q4]='"+q4.Text+"', [q5]='"+q5.SelectedValue+"',"+<br />
				" [q6]='"+q6.Text+"', [q7]='"+q7.SelectedValue+"', [q8]='"+q8.Text+"',"+<br />
				" [q9]='"+q9.SelectedValue+"', [q10]='"+q10.Text+"',"+<br />
				" [q11]='"+q11.SelectedValue+"', [q12]='"+q12.Text+"',"+<br />
				" [q13]='"+q13.SelectedValue+"', [q14]='"+q14.Text+"',"+<br />
				" [q15]='"+q15.Text+"', [q16]='"+q16.Text+"',"+<br />
				" [q17]='"+q17.Text+"', [q18]='"+q18.Text+"',"+<br />
				" [q19]='"+q19.SelectedValue+"', [q20]='"+q20.SelectedValue+"',"+<br />
				" [q21]='"+q21.SelectedValue+"', [q23]='"+q23.Text+"',"+<br />
				" [q24]='"+q24.SelectedValue+"', [q26]='"+q26.Text+"',"+<br />
				" [q28]='"+q28.Text+"', [q34]='"+q34.SelectedValue+"',"+<br />
				" [q35]='"+q35.Text+"', [q38]='"+q38.SelectedValue+"',"+<br />
				" [q39]='"+q39.Text+"', [q40]='"+q40.SelectedValue+"',"+<br />
				" [q42]='"+q42.Text+"', [q43]='"+q43.SelectedValue+"',"+<br />
				" [q44]='"+q44.Text+"', [q45]='"+q45.SelectedValue+"',"+<br />
				" [q46]='"+q46.Text+"', [q47]='"+q47.SelectedValue+"',"+<br />
				" [q48]='"+q48.Text+"', [q51]='"+q51.SelectedValue+"',"+<br />
				" [q52]='"+q52.Text+"', [q53]='"+q53.SelectedValue+"',"+<br />
				" [q54]='"+q54.Text+"', [q57]='"+q57.SelectedValue+"',"+<br />
				" [q58]='"+q58.Text+"', [q61]='"+q61.Text+"',"+<br />
				" [q62]='"+q62.Text+"', [q63]='"+q63.SelectedValue+"',"+<br />
				" [q66]='"+q66.SelectedValue+"', [q67]='"+q67.Text+"',"+<br />
				" [q70]='"+q70.SelectedValue+"', [q71]='"+q71.Text+"',"+<br />
				" [q72]='"+q72.SelectedValue+"', [q73]='"+q73.Text+"',"+<br />
				" [q74]='"+q74.SelectedValue+"', [q75]='"+q75.Text+"',"+<br />
				" [q84]='"+q84.SelectedValue+"', [q85]='"+q85.Text+"',"+<br />
				" [q86]='"+q86.SelectedValue+"', [q87]='"+q87.Text+"',"+<br />
				" [q88]='"+q88.SelectedValue+"', [q89]='"+q89.Text+"',"+<br />
				" [q90]='"+q90.Text+"', [q91]='"+q91.Text+"',"+<br />
				" [q98]='"+q98.SelectedValue+"', [q99]='"+q99.SelectedValue+"',"+<br />
				" [q100]='"+q100.Text+"', [q101]='"+q101.SelectedValue+"',"+<br />
				" [q102]='"+q102.Text+"', [q103]='"+q103.SelectedValue+"',"+<br />
				" [q104]='"+q104.Text+"' WHERE RecNum="+RecNum.Text;<br />
<br />
			OleDbDataAdapter da = new OleDbDataAdapter(strSQL,con);	<br />
			//			int RecNum=0;<br />
			try<br />
			{<br />
				OleDbCommand cmd = con.CreateCommand();<br />
				cmd.CommandText=strSQL;<br />
				con.Open();<br />
				cmd.ExecuteNonQuery();<br />
			}<br />
			catch(Exception err)<br />
			{<br />
				string s= err.Message;<br />
				bNoError=false;<br />
			}<br />
			finally<br />
			{<br />
				con.Close();<br />
			}<br />
						<br />
			if(bNoError)<br />
			{<br />
				Response.Redirect("../Common/DataSubmitted.aspx");<br />
			}<br />
			else<br />
				HandleErrors();<br />
		}<br />
		<br />
	}

GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Christian Graus27-Apr-07 14:38
protectorChristian Graus27-Apr-07 14:38 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen27-Apr-07 14:55
Ibuprofen27-Apr-07 14:55 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Christian Graus27-Apr-07 15:14
protectorChristian Graus27-Apr-07 15:14 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen28-Apr-07 6:31
Ibuprofen28-Apr-07 6:31 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Christian Graus28-Apr-07 12:16
protectorChristian Graus28-Apr-07 12:16 
AnswerRe: ASP.NET C# Code Behind SQL Update on a form Pin
DavidNohejl28-Apr-07 3:20
DavidNohejl28-Apr-07 3:20 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen28-Apr-07 6:33
Ibuprofen28-Apr-07 6:33 
GeneralRe: ASP.NET C# Code Behind SQL Update on a form Pin
Ibuprofen28-Apr-07 6:34
Ibuprofen28-Apr-07 6:34 
Questionadd/update in detail view Pin
Alex Ru27-Apr-07 9:32
Alex Ru27-Apr-07 9:32 
QuestionForce Numeric in Textbox Pin
aransiola27-Apr-07 9:07
aransiola27-Apr-07 9:07 
AnswerRe: Force Numeric in Textbox Pin
overfreeze27-Apr-07 12:45
overfreeze27-Apr-07 12:45 
AnswerRe: Force Numeric in Textbox Pin
Christian Graus27-Apr-07 13:21
protectorChristian Graus27-Apr-07 13:21 
QuestionLong Surveys / Questionnaires TIMEOUT ISSUES` Pin
Ibuprofen27-Apr-07 6:02
Ibuprofen27-Apr-07 6:02 
AnswerRe: Long Surveys / Questionnaires TIMEOUT ISSUES` Pin
Christian Graus27-Apr-07 20:05
protectorChristian Graus27-Apr-07 20:05 
QuestionSending SMS via ASP.NET Web Service Pin
Nirmal8427-Apr-07 5:17
Nirmal8427-Apr-07 5:17 
AnswerRe: Sending SMS via ASP.NET Web Service Pin
Psycho-*Coder*-Extreme27-Apr-07 10:27
Psycho-*Coder*-Extreme27-Apr-07 10:27 
QuestionResizing Image Pin
Tarik Guney27-Apr-07 4:01
Tarik Guney27-Apr-07 4:01 

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.