protected void SqlEquip_Selecting(object sender, SqlDataSourceCommandEventArgs e) { SqlParameterCollection myCollection = (SqlParameterCollection)e.Command.Parameters; IEnumerator ie = myCollection.GetEnumerator(); string strSQL = string.Empty; while ((ie.MoveNext())) { SqlParameter param = (SqlParameter)ie.Current; string strValue = string.Empty; if (param.Value == null) { strValue = "NULL"; } else { strValue = param.Value.ToString(); strSQL += param.ParameterName.ToString() + "=" + strValue + "<BR />"; } } Response.Write(strSQL.ToString()); }and the "parsed parameters" for the stored procedure have the following values:
@upsino=%<BR />@sub_name=%<BR />@co_equipno=%<BR />@serial_no=%<BR />This still doesn't tell me why records with a NULL value in any one of the last three fields are excluded from the result set. The sql command that is run from the stored procedure is listed below in our earlier post.