Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
QuestionExtract Dataset to Excel Pin
cyrus_thevirus7-Feb-06 11:33
cyrus_thevirus7-Feb-06 11:33 
QuestionSend Text Message to Phone Pin
cyrus_thevirus7-Feb-06 11:27
cyrus_thevirus7-Feb-06 11:27 
AnswerRe: Send Text Message to Phone Pin
Ravi Bhavnani7-Feb-06 11:52
professionalRavi Bhavnani7-Feb-06 11:52 
Questionhow to set textbox1.text in one form from other forms ? Pin
hdv2127-Feb-06 11:24
hdv2127-Feb-06 11:24 
AnswerRe: how to set textbox1.text in one form from other forms ? Pin
DigitalKing7-Feb-06 15:28
DigitalKing7-Feb-06 15:28 
GeneralRe: how to set textbox1.text in one form from other forms ? Pin
hdv2127-Feb-06 17:22
hdv2127-Feb-06 17:22 
GeneralRe: how to set textbox1.text in one form from other forms ? Pin
DigitalKing7-Feb-06 20:14
DigitalKing7-Feb-06 20:14 
Questionupdate problem Pin
Ado_bado7-Feb-06 11:22
Ado_bado7-Feb-06 11:22 
hi,
i'm trying to update a database by a datatable through a stored prcedure like that :

private void button2_Click(object sender, System.EventArgs e)<br />
         	{<br />
	                Cursor =Cursors.WaitCursor;  <br />
	        	if(MessageBox.Show("are you sure you want to Delete","Question",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == DialogResult.Yes)<br />
			{<br />
				dataSet6.Tables["SELECT_STAFF_REAL"].Rows[x].Delete();<br />
				try<br />
				{<br />
			                DataTable table1=dataSet6.Tables["SELECT_STAFF_REAL"].GetChanges();<br />
					if(table1!=null)   <br />
					{<br />
	               				sqlDataAdapter6.Update(table1);   <br />
						dataSet6.Tables["SELECT_STAFF_REAL"].AcceptChanges();<br />
<br />
						gridEx1.DataSource=dataSet6.Tables["SELECT_STAFF_REAL"];<br />
			}<br />
		}<br />
		catch(Exception err)<br />
		{<br />
			MessageBox.Show(err.Message);<br />
		}<br />
	}<br />
	rowCount--;<br />
	Cursor =Cursors.Default;<br />
}


and this is the stored procedure:

CREATE procedure select_staff_real @job varchar(20) ,@field varchar(20)<br />
as<br />
SELECT STAFF.S_SSN, STAFF.S_NAME AS Name, STAFF.S_USER_NAME, STAFF.S_PASS_WORD, STAFF.S_E_MAIL AS [E-Mail], STAFF.S_ADDRESS, STAFF.S_CITY, STAFF.S_PHONE_NUMBER AS [Home Phone], STAFF.S_MOBILE_NUMBER AS [Mobile Phone], STAFF.S_SALARY, STAFF.S_COMMENT, DESIGNATION.D_ID, DESIGNATION.D_TYPE AS Designation, STAFF.S_DESIGNATION_ID FROM STAFF INNER JOIN DESIGNATION ON STAFF.S_DESIGNATION_ID = DESIGNATION.D_ID<br />
<br />
where d_type like '%'+@job+'%' and s_name like '%' +@field +'%'<br />
GO


and i have error that tells me that the parameter @job must be assigned to a value.

so my question is what is the reason of that error.
or how to update a datasource by using stored procedure

thanx
QuestionDatagrid Context Menu Pin
OrbeaOrca7-Feb-06 10:11
OrbeaOrca7-Feb-06 10:11 
QuestionSendMessage problems Pin
sowhatman007-Feb-06 9:21
sowhatman007-Feb-06 9:21 
AnswerRe: SendMessage problems Pin
sowhatman007-Feb-06 23:54
sowhatman007-Feb-06 23:54 
QuestionCan't get "TreeNodeCollection.Contains" to validate node Pin
JstDaNuGuy7-Feb-06 9:15
JstDaNuGuy7-Feb-06 9:15 
AnswerCan a guy get some help over here??? Pin
JstDaNuGuy8-Feb-06 4:41
JstDaNuGuy8-Feb-06 4:41 
QuestionGroupbox border color Pin
VPMahank7-Feb-06 8:53
VPMahank7-Feb-06 8:53 
AnswerRe: Groupbox border color Pin
DigitalKing7-Feb-06 15:32
DigitalKing7-Feb-06 15:32 
QuestionCustom Object that has 'nested' collections Pin
kloepper7-Feb-06 8:52
kloepper7-Feb-06 8:52 
AnswerRe: Custom Object that has 'nested' collections Pin
Guffa7-Feb-06 9:16
Guffa7-Feb-06 9:16 
GeneralRe: Custom Object that has 'nested' collections Pin
kloepper7-Feb-06 9:46
kloepper7-Feb-06 9:46 
AnswerRe: Custom Object that has 'nested' collections Pin
Guffa7-Feb-06 10:56
Guffa7-Feb-06 10:56 
QuestionInclude files Pin
dvsr7-Feb-06 8:51
dvsr7-Feb-06 8:51 
AnswerRe: Include files Pin
Guffa7-Feb-06 9:21
Guffa7-Feb-06 9:21 
GeneralRe: Include files Pin
dvsr8-Feb-06 4:43
dvsr8-Feb-06 4:43 
AnswerRe: Include files Pin
Guffa8-Feb-06 6:07
Guffa8-Feb-06 6:07 
QuestionHRESULT E_FAIL Error? Pin
Mertli Ozgur Nevres7-Feb-06 6:36
Mertli Ozgur Nevres7-Feb-06 6:36 
AnswerRe: HRESULT E_FAIL Error? Pin
Dave Kreskowiak7-Feb-06 7:01
mveDave Kreskowiak7-Feb-06 7: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.