刚学做C#2005中Access数据库的连接,最后到了要"浏览"选择数据源的时候,却出现了一个"ConnectionString"要我填,我填
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=数据库路径
点OK的时候提示
Format of the initilization string does not conform to specification starting at index 0
是怎么回事啊?
我还是学生啊,麻烦高手们帮我解决一下啊,太谢谢了
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=数据库路径
点OK的时候提示
Format of the initilization string does not conform to specification starting at index 0
是怎么回事啊?
我还是学生啊,麻烦高手们帮我解决一下啊,太谢谢了
解决方案 »
- 求一LINQ语句
- 100分,100分,给分少了没人来看 哎 100了
- c#中如何连接oracle数据库,把数据存到datagridview1
- 控制 datagrid中的个别单元格 是否可编辑?
- performanceCounter获得进程占用率
- 用户身份鉴别成功后,当其空闲操作的时间超过规定值,通常为10分钟,应该对用户重新进行身份程序鉴别,怎么写ASP.NET程序
- 几个小bug求指导 !!最好能将改正的代码告诉我,实在是水平有限
- IrisSkin4 导致的窗体加载问题
- 求<visual c#基于组件的开发>,<advance remoting>
- hook 拦截 向一个软件拖文件要怎么做 WH_CALLWNDPROC WM_DROPFILES 这两个不会用
- 谁有c#操作EXCEL的例子?
- 简单问题,大家帮忙看下.
Provider=Microsoft.Jet.OLEDB.4.0; Data Source=d:\Northwind.mdb;User ID=Admin;Password=; 如果设了保护:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\Northwind.mdb;Jet OLEDB:System Database=d:\NorthwindSystem.mdw;User ID=*****;Password=*****;
Format of the initilization string does not conform to specification starting at index 0
晕,我觉得这不是我的操作上的错误,因为同样的,我在同学的电脑上操作也是可以的,但是在我电脑上操作就又问题了,是不是因为我电脑差什么组件没有安装啊?
我想原因可能不只是"Format of the initilization string does not conform to specification starting at index 0",可能会有别的什么异常什么的...这样吧,楼主自己用代码写一个连接数据库的测试程序,看是否能通过,用try..catch捕获一下..我觉得可能是什么版本过低的问题....
try
{
OleDbDataAdapter sda=new OleDbDataAdapter ("select * from 表名",con);
DataSet ds=new DataSet();
sda.Fill(ds,"yourTable");
this.DataGridView1.datasource=ds.Tables["yourTable"];
}
catch(OleDbException ex)
{
MessageBox.show(ex.Message);
}
catch(Exception ex)
{
MessageBox.show(ex.Message);
}你这样测试下,看会抛出什么异常来....