.net应用程序未将对象引用设置到对象的实例
来源:百度知道 编辑:UC知道 时间:2024/06/25 20:19:01
static void Main()
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
OleDbConnection oleDbCon=new OleDbConnection("Provide=Microsoft.Jet.OLEDB.4.0;UID=Admin;Data Source=f:\\tree.mdb");
oleDbCom.Connection.Open(); //这里报错
oleDbCom.CommandText="select node_name,node_path from tree order by node_path,node_postion";
dr=oleDbCom.ExecuteReader();
this.treeView1.SelectedNode=this.treeView1.TopNode;
while(dr.Read())
{
TreeNode nd=new TreeNode();
nd.Text=dr.GetString(0);
bool fl=true;
while(fl)
{
if(this.treeView1.SelectedNode.FullPath.Equals(dr.GetString(1)))
{
fl=false;
}
else
{
if(dr.GetString(1).IndexOf(this.treeView1.SelectedNode.FullPath)>=0)
{
for(int i=0;i<treeView1.Select
{
Application.Run(new Form1());
}
private void Form1_Load(object sender, System.EventArgs e)
{
OleDbConnection oleDbCon=new OleDbConnection("Provide=Microsoft.Jet.OLEDB.4.0;UID=Admin;Data Source=f:\\tree.mdb");
oleDbCom.Connection.Open(); //这里报错
oleDbCom.CommandText="select node_name,node_path from tree order by node_path,node_postion";
dr=oleDbCom.ExecuteReader();
this.treeView1.SelectedNode=this.treeView1.TopNode;
while(dr.Read())
{
TreeNode nd=new TreeNode();
nd.Text=dr.GetString(0);
bool fl=true;
while(fl)
{
if(this.treeView1.SelectedNode.FullPath.Equals(dr.GetString(1)))
{
fl=false;
}
else
{
if(dr.GetString(1).IndexOf(this.treeView1.SelectedNode.FullPath)>=0)
{
for(int i=0;i<treeView1.Select
OleDbConnection oleDbCon=new OleDbConnection("Provide=Microsoft.Jet.OLEDB.4.0;UID=Admin;Data Source=f:\\tree.mdb");
oleDbCom这个没定义吧,你上面是oleDbCon
单词写错了!
oleDbCon/oleDbCom
写错字母了吧
一般都是没有值应用了啊
.net应用程序未将对象引用设置到对象的实例
什么是未将对象引用设置到对象的实例?c#.net
.net xml.node 未将对象引用设置到对象的实例错误
[求助].net 未将对象引用设置到对象的实例
asp.net--未将对象引用设置到对象实例。我给200分,说到做到
ASP.NET(C#)运行错误:System.NullReferenceException: 未将对象引用设置到对象的实例
ASP.net(C#) 未将对象引用设置到对象的实例
asp.net 未将对象引用设置到对象的实例
asp.net(c#)未将对象引用设置到对象的实例
“未将对象引用设置到对象的实例”错误!(VB.NET)