I have a client event in my workflow that loads a form for the user to complete.
I obtain the serial number, etc, and all is good. I also, within the same client event, hand the URL for the form + serial number to a process datafield.
I need to write this process datafield to SQL, but I need to do it within the same client event.
Whatever I try, I cannot get this to work.
Can I do a SQL insert within a client event? Or am I barking up the wrong tree?
Many thanks,
Richard
Edit: Here is the code I am trying to compile:
.Value.ToString();
sqlComm.CommandText += strVar ;
OpenConnection(ref sqlConn);
sqlComm.ExecuteNonQuery();
}
catch (System.Exception ex)
{
throw new System.Exception(ex.Message);
}
sqlConn.Close();
K2.Synchronous = true;
}
private void OpenConnection(ref System.Data.SqlClient.SqlConnection SqlConn) {
if (SqlConn.State == System.Data.ConnectionState.Closed) {
SqlConn.Open();
}
}