C#连接Access数据时总报找不到dbo.mdb的问题
今天用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后,问题解决。
相关文档:
这是一个有关分页的实例,仅供参考(代码来自网络)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SQLite;
using System.Threading;
using System.Collections;
us ......
2008-04-10 09:45 //*******FactoryManage.cs using System;
using System.Reflection;
using System.Configuration;
using CoalTraffic.IDAL; namespace CoalTraffic.DALFactory
{
/// <summary>
/// 抽象工厂模式创建DAL。
......
function ImportRun()
{
if(document.all.Content.children.length>0)
{
var oTable=document.all.Content.children(0);
var oFldInfo=new Array();
var oSendDom=CreateXmlDom("<dl/>");
&nb ......
(1)首先要对内容的特殊字符进行过虑:
C# 代码:
public string res(string partno)
{
partno = partno.Replace("&", "");
partno = partno.Replace("/", "");
partno = partno.Replace("&", "");
return partno;
}
(2)从数据库中获得要生成地图的内 ......
Data Source=sqlservername;Initial Catalog=dbname;User ID=userid;Password=userpwd
Data Source=(local)\\SQLEXPRESS;Initial Catalog=数据库名;Integrated Security=True
Data Source=(local);Initial Catalog=数据库名;User ID=帐号;Password=帐号密码
Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\BegASPNET\ ......