Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

C#
SVHMLConStr = "Provider=Microsoft.ace.Oledb.12.0; Data Source='C:\\SVHML_ERP\\Data\\SVHML_Management.accdb'; Persist Security Info=False "

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
Posted

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.,
 
Share this answer
 
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900