c# dataset 提示由于线程停在某个无法进行垃圾回收的点
using System;using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Reflection;
using MSN.Practices.Framework.Bases;
using MSN.Practices.Framework.AppException;
using MSN.Practices.Framework.Profile;
using MSN.Practices.Framework.DataAccess;
using MSN.Practices.Framework.Forms;
using JYS.ERP.BaseInfo;
using MSN.ERP.JYS.Public;
using MSN.Practices.Framework.Helper;
namespace JYS.ERP.Produce
{
public partial class FrmLabView : Form
{
#region Private Member
private string type = null;
public string id = "";
public string pid = "";
public string test_method = "";
private IDataAccess dataAccess = DataAccessFactory.CreateDataAccess();
private SqlDataAdapter sqlDataAdapter = new SqlDataAdapter();
#endregion
public FrmLabView()
{
InitializeComponent();
}
private void FrmLabView_Load(object sender, EventArgs e)
{
printRpt();
}
private void printRpt()
{
DataSet ds = new DataSet();/断点设到这里后就提示 由于线程停在某个无法进行垃圾回收的点 搞不清楚
string sql = "SELECT washing_change, washing_stain_Ac, washing_stain_C, " +
" washing_stain_N, washing_stain_P, washing_stain_Ar, washing_stain_W, " +
" washing_self_stain, washing_pass, " +
" Water_change, Water_stain_Ac, Water_stain_C, Water_stain_N, Water_stain_P," +
" Water_stain_Ar,Water_stain_W, Water_self_stain, Water_pass, " +
" seawater_change, seawater_stain_Ac, seawater_stain_C, seawater_stain_N," +
" seawater_stain_P, seawater_stain_Ar, seawater_stain_W,seawater_self_stain," +
" seawater_pass,Persipiration_change, Persipiration_stain_AC, Persipiration_stain_C," +
" Persipiration_stain_N, Persipiration_stain_P, Persipiration_stain_Ar, Persipiration_stain_W, " +
" Persipiration_stain_SS, Persipiration_pass," +
" PAlkaline_change, PAlkaline_stain_Ac, PAlkaline_stain_C , PAlkaline_stain_N ,PAlkaline_stain_P , " +
" PAlkaline_stain_Ar, PAlkaline_stain_W ,PAlkaline_stain_self_stain , PAlkaline_pass ," +
" chlorinepoolwater, " +
" CPW_change, CPW_pass, light, light_change, light_pass," +
" CDry_change, CDry_stain, CWet_change, CWet_stain,crocking_pass, " +
" Width,Weight,width_pass,Weight_pass," +
" StretchRecovery, " +
" Stretch_length, Stretch_width, Set_length, Set_width, " +
" Recovery_length, Recovery_width, streth_pass, Bursting, Bursting_pass ," +
" DC_Length, DC_width, DC_pass, Skewness, Skewness_pass, " +
" PHValue,PH_pass "+
"FROM Lab " +
"WHERE id = '" + this.id + "' ";
sqlDataAdapter = dataAccess.CreatDataAdapter(sql);
ds.Tables[0].Rows.Clear();
sqlDataAdapter.Fill(ds);
DSlabview c = new DSlabview();
c.printlab.AddprintlabRow(ds.Tables[0].Rows[0]["washing_change"].ToString(),
ds.Tables[0].Rows[0]["washing_stain_Ac"].ToString(),
ds.Tables[0].Rows[0]["washing_stain_C"].ToString(),
ds.Tables[0].Rows[0]["washing_stain_N"].ToString(),
ds.Tables[0].Rows[0]["washing_stain_P"].ToString(),
ds.Tables[0].Rows[0]["washing_stain_Ar"].ToString(),
ds.Tables[0].Rows[0]["washing_stain_W"].ToString(),
ds.Tables[0].Rows[0]["washing_self_stain"].ToString(),
ds.Tables[0].Rows[0]["washing_pass"].ToString(),
ds.Tables[0].Rows[0]["Water_change"].ToString(),
ds.Tables[0].Rows[0]["Water_stain_Ac"].ToString(),
ds.Tables[0].Rows[0]["Water_stain_C"].ToString(),
ds.Tables[0].Rows[0]["Water_stain_N"].ToString(),
ds.Tables[0].Rows[0]["Water_stain_P"].ToString(),
ds.Tables[0].Rows[0]["Water_stain_Ar"].ToString(),
ds.Tables[0].Rows[0]["Water_stain_W"].ToString(),
ds.Tables[0].Rows[0]["Water_self_stain"].ToString(),
ds.Tables[0].Rows[0]["Water_pass"].ToString(),
ds.Tables[0].Rows[0]["seawater_change"].ToString(),
ds.Tables[0].Rows[0]["seawater_stain_Ac"].ToString(),
ds.Tables[0].Rows[0]["seawater_stain_C"].ToString(),
ds.Tables[0].Rows[0]["seawater_stain_N"].ToString(),
ds.Tables[0].Rows[0]["seawater_stain_P"].ToString(),
ds.Tables[0].Rows[0]["seawater_stain_Ar"].ToString(),
ds.Tables[0].Rows[0]["seawater_stain_W"].ToString(),
ds.Tables[0].Rows[0]["seawater_self_stain"].ToString(),
ds.Tables[0].Rows[0]["seawater_pass"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_change"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_stain_AC"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_stain_C"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_stain_N"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_stain_P"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_stain_Ar"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_stain_W"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_stain_SS"].ToString(),
ds.Tables[0].Rows[0]["Persipiration_pass"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_change"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_stain_Ac"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_stain_C"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_stain_N"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_stain_P"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_stain_Ar"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_stain_W"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_stain_self_stain"].ToString(),
ds.Tables[0].Rows[0]["PAlkaline_pass"].ToString(),
ds.Tables[0].Rows[0]["chlorinepoolwater"].ToString(),
ds.Tables[0].Rows[0]["CPW_change"].ToString(),
ds.Tables[0].Rows[0]["CPW_pass"].ToString(),
ds.Tables[0].Rows[0]["light"].ToString(),
ds.Tables[0].Rows[0]["light_change"].ToString(),
ds.Tables[0].Rows[0]["light_pass"].ToString(),
ds.Tables[0].Rows[0]["CDry_change"].ToString(),
ds.Tables[0].Rows[0]["CDry_stain"].ToString(),
ds.Tables[0].Rows[0]["CWet_change"].ToString(),
ds.Tables[0].Rows[0]["CWet_stain"].ToString(),
ds.Tables[0].Rows[0]["crocking_pass"].ToString(),
ds.Tables[0].Rows[0]["Width"].ToString(),
ds.Tables[0].Rows[0]["Weight"].ToString(),
ds.Tables[0].Rows[0]["width_pass"].ToString(),
ds.Tables[0].Rows[0]["Weight_pass"].ToString(),
ds.Tables[0].Rows[0]["StretchRecovery"].ToString(),
ds.Tables[0].Rows[0]["Stretch_length"].ToString(),
ds.Tables[0].Rows[0]["Stretch_width"].ToString(),
ds.Tables[0].Rows[0]["Set_length"].ToString(),
ds.Tables[0].Rows[0]["Set_width"].ToString(),
ds.Tables[0].Rows[0]["Recovery_length"].ToString(),
ds.Tables[0].Rows[0]["Recovery_width"].ToString(),
ds.Tables[0].Rows[0]["streth_pass"].ToString(),
ds.Tables[0].Rows[0]["Bursting"].ToString(),
ds.Tables[0].Rows[0]["Bursting_pass"].ToString(),
ds.Tables[0].Rows[0]["DC_Length"].ToString(),
ds.Tables[0].Rows[0]["DC_width"].ToString(),
ds.Tables[0].Rows[0]["DC_pass"].ToString(),
ds.Tables[0].Rows[0]["Skewness"].ToString(),
ds.Tables[0].Rows[0]["Skewness_pass"].ToString(),
ds.Tables[0].Rows[0]["PHValue"].ToString(),
ds.Tables[0].Rows[0]["PH_pass"].ToString());
CRlabview labview = new CRlabview();
labview.SetDataSource(c);
crystalReportViewer1.ReportSource = c;
}
}
} --------------------编程问答-------------------- 没有重起一下计算机试一下。我遇到过一次这样报错,重启了后好了。 --------------------编程问答-------------------- 我重启过了 奇怪 别的窗口里面代码DATASET 都是好的 就这个新建的窗口不行 --------------------编程问答-------------------- 有人能帮我解释下 吗 会是哪里问题
补充:.NET技术 , C#