Click here to Skip to main content
Rate this: bad
good
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
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 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)

  Print Answers RSS
0 DamithSL 320
1 OriginalGriff 155
2 Peter Leow 115
3 Afzaal Ahmad Zeeshan 114
4 deepakdynamite 110
0 OriginalGriff 7,510
1 DamithSL 5,519
2 Sergey Alexandrovich Kryukov 4,994
3 Maciej Los 4,936
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 6 Oct 2012
Copyright © CodeProject, 1999-2014
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