连接数据库报错 我用的是access的数据库, 未处理的“System.Data.OleDb.OleDbException”类型的异常出现在 system.data.dll 中。请问怎么处理的??? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Data.OleDb;namespace y{ /// <summary> /// Form1 的摘要说明。 /// </summary> public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox3; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button4; private System.Data.OleDb.OleDbConnection oleDbConnection1; private System.Data.OleDb.OleDbCommand oleDbCommand1; private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1; private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1; private y.DataSet1 dataSet11; private System.Data.OleDb.OleDbConnection oleDbConnection2; private System.Data.OleDb.OleDbCommand oleDbCommand2; private System.Data.OleDb.OleDbCommand oleDbUpdateCommand2; private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2; private y.DataSet2 dataSet21; private System.Data.OleDb.OleDbConnection oleDbConnection3; private System.Data.OleDb.OleDbCommand oleDbCommand3; private System.Data.OleDb.OleDbCommand oleDbUpdateCommand3; private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter3; private y.DataSet3 dataSet31; private System.Windows.Forms.DataGrid dataGrid1; private y.DataSet1 dataSet12; /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.Container components = null; ublic Form1() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // } /// <summary> /// 清理所有正在使用的资源。 /// </summary> private void button1_Click(object sender, System.EventArgs e) { oleDbDataAdapter1.SelectCommand.CommandText="select * from train where (车次=?)"; oleDbDataAdapter1.SelectCommand.Parameters["车次"].Value=textBox1.Text; oleDbDataAdapter1.Fill(dataSet11); }主要是这段代码了 vs2008怎么设置value值? 各种求WPF做的系统DEMO及源代码 有关定时器的使用及多线程的问题。 vs2010GDI命名空间 ADO.NET 中,怎么得到批SQL命令的每个影响行数,跟 SQL 查询分析器里的一样效果! 如何取得修饰HTML元素的CSS式样? 基于抽象类放射创建对象报错! 请高手解,子窗体读取主窗体或其它子窗体内某控件的值。 哪有 SQL Server Management Studio Express的下载地址? 大家好,本人急求 怎样编程求这道方程式的值? 求助:如何写程序操作datagridview中添加新行中的空行???????????
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;namespace y
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Data.OleDb.OleDbConnection oleDbConnection1;
private System.Data.OleDb.OleDbCommand oleDbCommand1;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;
private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
private y.DataSet1 dataSet11;
private System.Data.OleDb.OleDbConnection oleDbConnection2;
private System.Data.OleDb.OleDbCommand oleDbCommand2;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand2;
private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter2;
private y.DataSet2 dataSet21;
private System.Data.OleDb.OleDbConnection oleDbConnection3;
private System.Data.OleDb.OleDbCommand oleDbCommand3;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand3;
private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter3;
private y.DataSet3 dataSet31;
private System.Windows.Forms.DataGrid dataGrid1;
private y.DataSet1 dataSet12;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent(); //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
{
oleDbDataAdapter1.SelectCommand.CommandText="select * from train where (车次=?)";
oleDbDataAdapter1.SelectCommand.Parameters["车次"].Value=textBox1.Text;
oleDbDataAdapter1.Fill(dataSet11);
}
主要是这段代码了