缺少using指令

usingSystem.Data.SqlClient;usingSystem.Collections.Generic;usingSystem.ComponentModel... using System.Data.SqlClient;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication6
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
OracleConnection connection = new OracleConnection("user id=chtobacco;data source=TOBACCO_172.40.1.215;password=tobacco");
connection.Open();
string cmdText = "select * from STU";
Sqlcommand cmd = new Sqlcommand (cmdText,conn);
Sqldatareader reader = cmd.executeReader();
while(reader.read()==true)
{
txtbox1.text = reader["ID"].tostring();
txtbox2.text = reader["NAME"].tostring();
textBox3.Text = reader["AGE"].tostring();
break;

}
conn.Close();

}

private void textBox1_TextChanged(object sender, EventArgs e)
{
// textBox1.Text = reader["ID"].tostring();
}

private void textBox2_TextChanged(object sender, EventArgs e)
{
//textBox2.Text = reader["NAME"].tostring();
}

private void textBox3_TextChanged(object sender, EventArgs e)
{
//textBox3.Text = reader["AGE"].tostring();
}
}
}
错误 1 找不到类型或命名空间名称“EventArgs”(是否缺少 using 指令或程序集引用?) C:\Documents and Settings\User\My Documents\Visual Studio 2008\Projects\WindowsFormsApplication6\WindowsFormsApplication6\Form1.cs 19 48 WindowsFormsApplication6
展开
 我来答
goddess111
2012-02-27 · 超过16用户采纳过TA的回答
知道答主
回答量:86
采纳率:100%
帮助的人:44.8万
展开全部
reader 的作用域
reader是你的临时变量
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
pp新
2012-02-27
知道答主
回答量:20
采纳率:0%
帮助的人:9.9万
展开全部
加上using System;
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式