Home > Database > Mysql Tutorial > body text

C# 连接Access数据时总报找不到dbo.mdb的问题

WBOY
Release: 2016-06-07 18:07:26
Original
1487 people have browsed it

今天用OleDb连接Access时总报找不到dbo.mdb的问题。可是我的连接字符串中明明写着local.mdb。

单步跟踪调试发现Connection中的连接字符串也是
”Provider=Microsoft.Jet.OLEDB.4.0; Data Source=local.mdb;”,
根本没有dbo.mdb的事。后来查过排查发现是schema的问题。

SQL Server中有schema的概念所以我们一般都习惯写成dbo.xxxTable,所以如果你要是也在Access中这样写的话,就会报如上找不到dbo.mdb的问题。修改SQL语句,去掉dbo后,问题解决。
Related labels:
c#
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template