I'm working on a form that will return information from a DB. When the user presses the search button it wil lexecute a Stored Procedure (SP_WEPK_X12_LOOKUP_INBOUND01).
This stored procedure will return 6 columns
EDI_TRANSACTION
SEND_PARTNER
REFERENCE_ID
RECEIVED_ON
SA_CTRL_NUM
ACK
I like ot execute the store procedure and grab the results (6 firlds) and set each one to its own variable (string) so I can use them later on the application.
Here is the code I have that executes the stored procedure.
Any help with this is appreciated
Thanks RJL1
This stored procedure will return 6 columns
EDI_TRANSACTION
SEND_PARTNER
REFERENCE_ID
RECEIVED_ON
SA_CTRL_NUM
ACK
I like ot execute the store procedure and grab the results (6 firlds) and set each one to its own variable (string) so I can use them later on the application.
Here is the code I have that executes the stored procedure.
Code:
{
SqlCommand cmd = new SqlCommand();
SqlParameterCollection sqlParameters = (SqlParameterCollection)cmd.Parameters;
sqlParameters.AddWithValue("REFID", txtRefID.Text);
var m = cmd.CommandText = "SP_WEPK_X12_LOOKUP_INBOUND01";
cmd.CommandType = CommandType.StoredProcedure;
cs.Open();
cmd.Connection = cs;
cmd.ExecuteNonQuery();
cs.Close();
}
Any help with this is appreciated
Thanks RJL1