Monthly Archives: September 2011

Migrates MySQL database schema to MSSQL using Visual Studio 2010

1. Install MySQL server. 2. Install MySQL .NET connector 6.4.x. 3. Install VS 2010. 4. Install SQL Express Management Studio. 5. Create edmx from MySQL. 6. Generate the database table through edmx to MSSQL.   Watch the video below.   … Continue reading

Posted in .Net | Tagged | Leave a comment

xp_regread() returen error 5 ‘Access is denied’

This happen when you want to set the security to both Windows and SQL login. The error message does not reflect the actual issue. One possible problem is 32 bit database engine with 64 bit Management Studio.

Posted in .Net | Tagged | Leave a comment

Create failed for Database ‘db’. CREATE DATABASE permission denied in database ‘master’

When you want to create a database in MS SQL and you encounter the error below. Error: TITLE: Microsoft SQL Server Management Studio ————————————————————————— Create failed for Database ‘db’.  (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402- 1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID =Create+Database&LinkId=20476 —————————————————————————- ADDITIONAL INFORMATION: An … Continue reading

Posted in .Net | Tagged , , | 1 Comment

ASP.NET 4.5 Smart Tasks

Data can bind to control in Source view instead of Design view in aspx. Watch the video below. ASP.NET 4.5 Smart Tasks  

Posted in .Net | Tagged | Leave a comment

Building parallelized apps with .NET and Visual Studio

Building parallelized apps with .NET and Visual Studio Key takeaway I found in this presentation.   1. Async will be included in .NET Framework 4.5.   2. Developer a step through the await() statement.   3. There is a new … Continue reading

Posted in .Net | Tagged , | Leave a comment

Upgrade from ASP.NET 4 to ASP.NET 4.5 for Strongly Typed Data-controls

1. Right click the properties of the ASP.NET project. 2. Choose Target Framework to 4.5. 3. Open an existing aspx page. 4. Add ModelTypeinto data-controls. For example, <asp:GridViewID=”InstructorsGridView”runat=”server”AllowPaging=”True”AllowSorting=”True”ModelType=”ContosoUniversity.DAL.Instructor”     AutoGenerateColumns=”False”DataKeyNames=”PersonID”DataSourceID=”InstructorsEntityDataSource”     OnSelectedIndexChanged=”InstructorsGridView_SelectedIndexChanged”     SelectedRowStyle-BackColor=”LightGray”     onrowupdating=”InstructorsGridView_RowUpdating”> 5. Change Eval to … Continue reading

Posted in .Net | Tagged , | Leave a comment

How to communicate from UserControl to container object using Event

This sample is in WPF. 1. Add a button in WPF form. 2. Create a User Control with one button. 3. Create a class with event. classClass1 {   publicdelegatevoidMyEventHandler(object sender, EventArgs e);   publicstaticeventMyEventHandler ChangeText;   publicstring str = … Continue reading

Posted in .Net | Tagged , | 1 Comment