pinheiroa
asked on
Invalid value for key 'attachdbfilename'.
Hello everyone,
I'm developing this website, basically it's asp.net pages(dev in WD2005) and a SQL DB (Express 2005), and I stuck with this error:" Invalid value for key 'attachdbfilename'", when I try to open this one webpage.
Before I go to this page I navigate throw others that read and write to the DB and everything it's ok.
The "webserver" is a xp professional, but I developed in an other pc with Vista, and if I run the website from the WD2005 there' s no problem with the page.
The database is in the App_Data.
Pls help me, this is driving me nuts.
Thank you
I'm developing this website, basically it's asp.net pages(dev in WD2005) and a SQL DB (Express 2005), and I stuck with this error:" Invalid value for key 'attachdbfilename'", when I try to open this one webpage.
Before I go to this page I navigate throw others that read and write to the DB and everything it's ok.
The "webserver" is a xp professional, but I developed in an other pc with Vista, and if I run the website from the WD2005 there' s no problem with the page.
The database is in the App_Data.
Pls help me, this is driving me nuts.
Thank you
Post the code from your page, this is to little info to work with...
The problem is in your connection striing you are trying to attach to the database, when all you need to do is connect to it. Post your connection string and everyone will be able to point out the folly of your ways :)
ASKER
The error changed to this:
Server Error in '/Equivale' Application.
An attempt to attach an auto-named database for file C:\Dev\Web\Estagio\BD\Hora
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlE
Source Error:
Line 9:
Line 10:
Line 11: Dim candidato As TextBox = CType(FormView1.FindContro
Line 12: Dim data As TextBox = CType(FormView1.FindContro
Line 13: Dim estado As TextBox = CType(FormView1.FindContro
and here are the web config connections strings:
<connectionStrings>
<add name="HorarioConnectionStr
providerName="System.Data.
<add name="HorarioConnectionStr
providerName="System.Data.
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;Attach
providerName="System.Data.
<add name="HorarioConnectionStr
providerName="System.Data.
<add name="ConnectionString2" connectionString="Data Source=.\SQLEXPRESS;Attach
providerName="System.Data.
</connectionStrings>
Again you are trying to attach to the database, when you should be connecting to it. You are using the wrong connection string. It should look like this:
connectionString="Data Source=.\SQLEXPRESS;Integr ated Security=True;Connect Timeout=30;User Instance=True"
I can repeat that in Spanish, if it is not clear.
connectionString="Data Source=.\SQLEXPRESS;Integr
I can repeat that in Spanish, if it is not clear.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin