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

1 solution

Try adding
User Instance=True;
To your connection string - it may sort the problem.
 
Share this answer
 
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)



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