Showing posts with label english. Show all posts
Showing posts with label english. Show all posts

Monday, March 26, 2012

How can I change the "read-only" database for add, edit and delete users?

Sorry about my English, it is not my natural language and thanks for your help. I have installed the Personal Site Starter Kit, everything work perfect except register users. When a new user try to register as a new user he receives an error, caused because the database is "read-only". In IIS the database has read and writing permissions and the directories where the aplication is. How can I change the database permissions?

Server Error in '/personalweb' Application.

Failed to update database "C:\INETPUB\WWWROOT\PERSONALWEB\APP_DATA\ASPNETDB.MDF" because the database is read-only.

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.SqlException: Failed to update database "C:\INETPUB\WWWROOT\PERSONALWEB\APP_DATA\ASPNETDB.MDF" because the database is read-only.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): Failed to update database "C:\INETPUB\WWWROOT\PERSONALWEB\APP_DATA\ASPNETDB.MDF" because the database is read-only.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857466 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735078 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612 System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305 System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453 System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149 System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Hi,

From looking at the error message, sounds like yourASPNETDB.mdf and ASPNETDB_log.ldf files has readonly attribute. You need to unchecked the Read-Only attribute and then add a blank app_offline.htm file to your c:\INETPUB\WWWROOT\PERSONALWEB and delete it right afterward.

Hope that helps,

Lan

Wednesday, March 21, 2012

How can I aggregate multilingual Data

Hi All,
I have three database servers which are german, english and french each
stores data in their localized formats of values like 1000.85 in english
1.000,85 in german and french but i have to get these data and aggreate the
results and display a report.
Can any one help regarding how to aggregate localized data and display a
report say in english.
Regards
enzeekayIf your problem is how to get the data from three different servers to appear
in one result set, then the answer is: Use linked servers. On the English
server, create a linked server for each of the other servers. Look in SQL
Server Books Online for how to do this.
You can then do queries like:
SELECT Product, SalesRevenue*BritishExchangeRate FROM MyEnglishTable
UNION
SELECT Product, SalesRevenue*EuroExchangeRate FROM
MyFrenchServer.MyDatabase.dbo.MyFrenchTable
UNION
SELECT Product, SalesRevenue*EuroExchangeRate FROM
MyGermanserver.MyDatabase.dbo.MyGermanTable
I have assumed that it is better to do the conversion rates at the SQL
Server end, but you could also do it in Reporting Services.
The number format is not important. There is only one internal format inside
SQL Server; the fact that when the numbers display, French use a period for a
thousands separator and a comma for a decimal is immaterial. That is just how
the number displays on a French system. The same table copied to an English
system will display accordingly.
HTH
Charles Kangai, MCT, MCDBA
"Girish Kumar" wrote:
> Hi All,
> I have three database servers which are german, english and french each
> stores data in their localized formats of values like 1000.85 in english
> 1.000,85 in german and french but i have to get these data and aggreate the
> results and display a report.
> Can any one help regarding how to aggregate localized data and display a
> report say in english.
> Regards
> enzeekay
>sql