Access-2007 DataBase连接字符串问题? [英] Access-2007 DataBase Connection String problem ?
问题描述
我在目录C中有一个Access-2007数据库的小项目:\ SVHML_ERP \ Data \ SVHML_Management.accdb
因此我的连接string是
Hi, I have a small project with Access-2007 Database available in directory C:\SVHML_ERP\Data\SVHML_Management.accdb
Therefore my connection string is
SVHMLConStr = "Provider=Microsoft.ace.Oledb.12.0; Data Source='C:\\SVHML_ERP\\Data\\SVHML_Management.accdb'; Persist Security Info=False "
但Iam收到的错误如
OleDb Exception未得到处理:
找不到文件C:\Documents and Settings \Paraman \ My Documents \ visualual studio 2010 \project \
My_Applications\My_Applications\My_ERPDataSVHML_Management.accdb
有没有人可以指出我的错误...
谢谢和问候
Paramu
But the Iam getting the error like
OleDb Exception was unhandled :
"Could not find file C:\Documents and Settings\Paraman\My Documents\visual studio 2010\project\
My_Applications\My_Applications\My_ERPDataSVHML_Management.accdb
Does anybody can point me the mistake...
Thanks & Regards
Paramu
推荐答案
尝试放置Access-2007数据库e in
My_Applications\My_Applications\bin\Debug \
并使用此连接string
Provider = Microsoft.ACE.OLEDB.12.0; Data Source ='bday_DB.accdb'
希望它会有所帮助。,
try to place your Access-2007 Database in
My_Applications\My_Applications\bin\Debug\
and use this connection string
Provider=Microsoft.ACE.OLEDB.12.0;Data Source='bday_DB.accdb'
Hope it will help.,
我发现错误是因为SQL Server数据库在Select Query上输入错误...因此连接字符串没有一个问题...
从查询中删除SQl服务器数据库名称后,路径已清除并正常工作......
感谢所有帮助和宝贵的会议记录
I found the error because of SQL Server Database has been mistyped on Select Query... Therefore the connection string has not a problem...
After removing the SQl Server Database Name from Query, the path has cleared and works fine...
Thanks for all the helps & Valuable minutes
这篇关于Access-2007 DataBase连接字符串问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!