Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0
I am trying to get the column name from excel sheet.But , I am getting this error.
An attempt to attach an auto-named database for file C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Web Application 10\Web Application 10\App_Data\vinoth.xls failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
1.I have Closed the connection and closed everything.But Still i an getting this error. Please guide me.
Posted 22-Jun-12 22:02pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Try adding
User Instance=True;
To your connection string - it may sort the problem.
P.Vinoth at 23-Jun-12 3:48am
i specified this in the config file itself but it showing the same error
P.Vinoth at 23-Jun-12 4:10am
please help me griff i tried that too still it shows error

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

Advertise | Privacy | Mobile
Web01 | 2.8.150129.1 | Last Updated 6 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100