ASP.Net Code: Connection Strings with MS SQL server 2005
<remove name="LocalSqlServer">
<add name="LocalSqlServer" connectionstring="Data Source=localhost;Initial Catalog=aspnetdb;Integrated Security=True" providername="System.Data.SqlClient">
<add name="golddbConnectionString" connectionstring="Data Source=localhost;Initial Catalog=golddb;Integrated Security=True" providername="System.Data.SqlClient">
+
exec sp_grantloginaccess 'NT AUTHORITY\NETWORK SERVICE'
exce sp_addsrvrolemember @loginame = 'NT AUTHORITY\NETWORK SERVICE', @rolename = 'sysadmin'
2009年8月26日星期三
2009年7月17日星期五
ASP.NET Code: www.qsh.eu ASPNETDB.MDF
ASP.NET Code: www.qsh.eu ASPNETDB.MDF
http://forum.qsh.eu/Forums.aspx?forumid=25&threadid=79
http://forum.qsh.eu/Forums.aspx?searchtext=aspnet
http://www.cnblogs.com/hardrock/archive/2007/11/13/958546.html
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;Database=www.qsh.eu_8a547bfd-ce62-405a-bbfe-1628ac48aa15;AttachDBFilename=|DataDirectory|ASPNETDB.MDF" />
</connectionStrings>
http://forum.qsh.eu/Forums.aspx?forumid=25&threadid=79
http://forum.qsh.eu/Forums.aspx?searchtext=aspnet
http://www.cnblogs.com/hardrock/archive/2007/11/13/958546.html
ASP.NET Code: www.qsh.eu ConnectionString
ASP.NET Code: www.qsh.eu ConnectionString
replace name="DBAccess" with (for example) name="LocalSqlServer" in all ASPX
the stupid method i did once...
Login Link for www.qsh.eu
https://www.qsh.eu/admin/Login.aspx
免費asp.net空間(www.qsh.eu)使用詳解
http://www.0379zd.com/news/show/17001.htm
Qantasoft qsh.eu webconfig connectionString problem
http://forums.asp.net/p/1253493/2356606.aspx#2356606
For examle you have database "Test.mdf" created at SQL Server Management Studio Express.OR
1st step: your database must be detached from your SQL server correctly: open management studio -> right click on "Test" database -> Tasks -> Detach.
2nd step: create folder www/App_Data and copy Test.mdf without log file.
3 step: generate connection string at https://www.qsh.eu/admin/EditFreehosting.aspx and save in web.config.
4 step: replace name="LocalSqlServer" with (for example) name="DBAccess".
5 step: in code you can read connection string from web.config:
string connectionString = ConfigurationManager.ConnectionStrings["DBAccess"].ConnectionString;
IDbConnection connection = new SqlConnection(connectionString);
replace name="DBAccess" with (for example) name="LocalSqlServer" in all ASPX
the stupid method i did once...
Login Link for www.qsh.eu
https://www.qsh.eu/admin/Login.aspx
免費asp.net空間(www.qsh.eu)使用詳解
http://www.0379zd.com/news/show/17001.htm
Qantasoft qsh.eu webconfig connectionString problem
http://forums.asp.net/p/1253493/2356606.aspx#2356606
2009年7月14日星期二
ASP.NET Code: SqlConnection with ConnectionString
ASP.NET Code: SqlConnection with ConnectionString
http://www.aspnet101.com/aspnet101/tutorials.aspx?id=64
Dim SQLData As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\db.mdf;Integrated Security=True;User Instance=True")
Dim SQLData As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("from
dbConnectionString").ConnectionString)
http://www.aspnet101.com/aspnet101/tutorials.aspx?id=64
訂閱:
留言 (Atom)
