numericUpDown控件用法
程序如下:
conn = new SqlCeConnection(@"Data Source =\Program Files\RealtimeMonitor\realtimedata.sdf");
conn.Open();
SqlCeCommand cmd1 = conn.CreateCommand();
cmd1.CommandText = "BCD";
cmd1.CommandType = CommandType.TableDirect;
SqlCeDataAdapter da = new SqlCeDataAdapter(cmd1);
DataSet thisdataset = new DataSet();
da.Fill(thisdataset, "BCD");
this.numericUpDown.Value = Convert.ToInt32(thisdataset.Tables["BCD"].Rows[16][0]);//此处有问题
我用的平台是VS.net 2005、Windows CE、Sql Mobile平台,BCD是表名,numericUpDown是控件名。为啥数据库里的数据不能显示在numericUpDown控件里,控件里显示的始终是最开始初始化的值。请大虾帮忙