Click here to Skip to main content
12,454,066 members (57,753 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#2.0 C#
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 21:02pm

1 solution

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

Solution 1

Try adding
User Instance=True;
To your connection string - it may sort the problem.
  Permalink  
Comments
P.Vinoth 23-Jun-12 3:48am
   
i specified this in the config file itself but it showing the same error
P.Vinoth 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 6 Oct 2012
Copyright © CodeProject, 1999-2016
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