Create Free Blog | Random Blog »   Report Abuse | Login   

 

Welcome !

Hello, This is Trilok Singh. I love Managed programming(.NET). I Love C#.I am working as Software Engineer in Epicomm Technologies Ltd,Pune(India). I also hold MCTS,DAC(C-DAC,Pune) and B.Tech(IT) . Thanks for viewing my blog. I am Still new to this area of blogging. So please feel free to send me Feedback for My blog. Thanks . you can mail me at. trilokamethi@gmail.com

Tips And Tricks, Latest News and lot more ……..

1- Open SQL SERVER Management Studio 2005/2008 Express(Better if you have Advanced Edition)

2- Connect to your SQL SERVER instance

Logically you would think that this would be the way: Right click on the database –> Script Database As –> CREATE To and then pick your choice. See also image below
Script database
What that will do is just create the database and not much else, here is what the script might look like

OK, But wait

What if you do not have SQL SERVER Management Studio 200X Than You can Write Below Code To generate

SQL SERVER Database Script———–

OR

T-SQL

  1. USE [master]
  2. GO
  3. /** Trilok Singh **/
  4. /****** Object:  Database [AdventureWorks]    Script Date: 09/03/2010 ******/
  5. CREATE DATABASE [AdventureWorks] ON PRIMARY
  6. ( NAME = N‘AdventureWorks_Data’, FILENAME = N‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorks_Data.mdf’ , SIZE = 174080KB , MAXSIZE = UNLIMITED, FILEGROWTH = 16384KB )
  7. LOG ON
  8. ( NAME = N‘AdventureWorks_Log’, FILENAME = N‘C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorks_Log.ldf’ , SIZE = 2048KB , MAXSIZE = 2048GB , FILEGROWTH = 16384KB )
  9. GO
  10. ALTER DATABASE [AdventureWorks] SET COMPATIBILITY_LEVEL = 100
  11. GO
  12. IF (1 = FULLTEXTSERVICEPROPERTY(‘IsFullTextInstalled’))
  13. BEGIN
  14. EXEC [AdventureWorks].[dbo].[SP_FULLTEXT_DATABASE] @ACTION = ‘enable’
  15. END
  16. GO

What you have to do is actually this: Right click on your database–>Tasks–>Generate Scripts
Script Wizard
Select the database you want to script and make sure you check the option at the bottom that says Script all objects in the selected database. See image below
Script all objects in the selected database
That is all, click next a couple of times and review your options and you are set

Share SocialTwist Tell-a-Friend 

VS 2010 Web Profiles

When you first run VS 2010 it prompts you to select an IDE profile to use.  The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts.  You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them.  You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

One of the things you’ll notice when you run VS 2010 Beta2 for the first time is the inclusion of two “Web Development” profiles in the list of options:

The first “Web Development” profile option is an evolution of the existing web development profile option from VS 2008 (with some nice improvements that help improve screen real estate usage with VS 2010).  It also allows you to take advantage of all the great WYSIWYG HTML and ASP.NET Page designer improvements we’ve done with the VS 2010 release (I’ll cover these in more detail in later blog posts in this series).

The second “Web Development (Code Optimized)” profile option is a new profile we are introducing with VS 2010 that is optimized for web developers who do not want to use a WYSIWYG designer when doing their web development, and who prefer a “source only” editing experience when working on pages.  This IDE profile option hides the WYWISYG page designer tabs, and configures a default IDE layout that maximizes the amount of code that is displayed on the screen (with a minimum of toolbars and tool windows).  It still provides a full intellisense/debugging and source editor experience for pages.

Comparing the VS 2010 Web Development Profiles

You can get a sense of the difference between the two profiles by comparing screen-shots of the Visual Studio IDE layout immediately after the two different “Web Development” profiles are applied:

Screenshot of the “Web Development” Profile:

The layout below demonstrates the default IDE layout (at a 750×650 monitor resolution) when the standard “Web Development” profile is applied.  This profile is an evolution of the existing “Web Development” profile in VS 2008 and exposes design/split/source tabs within the document window of any HTML or ASP.NET page:

Screenshot of the “Web Development (Code Optimized)” Profile:

The screen-shot below demonstrates the default IDE layout (at a 750×650 monitor resolution) when the new “Web Development (Code Optimized)” profile is applied.  As you can see, the profile optimizes the screen real estate around displaying and editing code on the screen, hides all toolbars by default, and disables and hides the designer tabs within the document windows of HTML and ASP.NET pages:

2 New Profile Small IDE

Below is a screen-shot of the “code optimized” profile at a larger monitor resolution:

2 New Profile Full IDE Single File

Mixing and Matching Features

All of the different features used in both the standard “Web Development” profile and the “Web Development (code optimized)” profile are exposed via Visual Studio’s Tools->Options configuration dialog.  This means that you can start with any of the VS profiles (including the General, VB and C# profiles) and turn on or off individual features to customize the IDE layout and editing experience however you want it to be.

For example: below you can see the Tools->Options dialog checkbox to enable or disable the HTML designer (which will configure whether the Design/Split/Source tabs are shown at the bottom of each page):

0 Tools Options HTML Designer

This gives you the flexibility to customize your development experience however you want and create a personalized tooling experience optimized for you and your preferred way of doing development.

The two web development profiles that ship in the box provide two good preconfigured starting points that we think offer a nice set of defaults for a large set of the web developers out there.  You can easily choose to start with whichever one feels best to you, and optionally configure them further however you want.

Summary

We are offering the new profile simply as an option for those who prefer a source-focused web development experience. The WYSIWYG HTML/ASP.NET designer continues to be enabled by default with all the other VS 2010 profiles (just like it does with VS 2008), and we have also made a lot of improvements to it with the VS 2010 release (I’ll blog more details about these in later posts).  So don’t worry – the WYSIWYG designer definitely isn’t going away, and will continue to be enhanced and improved with each release.

We think the new “Web Development (Code Optimized)” profile, though, is a nice new option for developers who prefer a “source editing focused” web development experience, and who do not use the WYSIWYG designer.  The profile option provides an easy way for them to hide the designer (along with its associated tool windows and toolbars) from the IDE layout and instead use a source-focused web development experience.

Hope this helps,

Share SocialTwist Tell-a-Friend 

A New Look for Visual Studio 2010

At the PDC and TechEd EMEA last year we described our new editor support built on the WPF technology in .NET Framework 4.0.  Today I’m happy to reveal the new UI for Visual Studio, also built on WPF:

DvX_ShellBase

In this image you can see several areas of concentration:

  • Reduced clutter and visual complexity by removing excessive lines and gradients in the UX and modernized the interface by removing outdated 3D bevels
  • Placed focus on content areas by opening negative space between windows and drawing attention to the current focus with a dominant accent color and a distinctive background
  • Added an inviting new palette to make VS 2010 more distinctive

In the following image you can see floating documents which allows you to utilize multiple monitors while designing your project and writing code:

DvX_ShellFloatWide

This image shows new support in the editor for outlining:

  • Triangle glyphs in the margin are used to collapse or expand your code blocks
  • Collapsed sections of code are marked with an empty triangle (pointing straight) as well as a set of ellipses
  • Colors on the margin indicate edits that have been made

image

The New Project dialog has also gotten an update to include online template viewing, a search box, and easier navigation.  Multi-targeting remains in this version but now with .NET Framework 4.0 included as an option:

image

Visual Studio has a very broad and rich ecosystem of extensions written by our partners and folks like you.  In VS2010 we wanted to make it easier for you to find those extensions and install them.  We’ve enabled the new Extension Manager for this purpose:

image

With the Extension Manager you will be able to browse for templates and tools online and install them easily into the Visual Studio environment.  The next public release of VS will have this new functionality and we’ll be hooking up the online capabilities through the Visual Studio Gallery as part of the final release.

These designs were developed and tested for user feedback by our User Experience team and implemented by the VS Platform team (excellent job!).

We hope you like the new look and feel of Visual Studio 2010.  You’ll be able to play with these bits when we release Beta 1 which we are working hard on right now (no formal announce date just yet, stay tuned).

Enjoy!

Share SocialTwist Tell-a-Friend 
Visual Studio 2010 and .NET FX 4 Beta 1 ships!
Today, we are releasing Beta 1 of Visual Studio 2010 and .NET FX 4.  If you are a MSDN subscriber, you can download the Beta today from here.  For the rest of the world, the Beta will be publicly available on Wednesday.

 

Over the last many months I had blogged about a lot of new and interesting features that are in VS 2010 and .NET 4.  You can see those features and many more in Beta 1.  We have more work to do in terms of finishing up the feature work for some of the scenarios and getting to the right levels of quality and performance, but we have made enough progress that we wanted to start getting your feedback.

 

As with any software development process, getting customer feedback in a timely manner helps us make better products.  We are looking forward to hearing your feedback on this beta.  

 

To find out how to download the beta and where to share your feedback, please visit the Visual Studio 2010 Product Page.

Visual Studio 2010 Beta 1 download options

Visual Studio 2010 and .NET Framework 4 mark the next generation of developer tools from Microsoft. Download the beta today!

 

Professional

Visual Studio 2010 Professional Beta 1 – Web Installer

Visual Studio 2010 Professional Beta 1 – ISO

Team System

Visual Studio Team System 2010 Team Suite Beta 1 – Web Installer

Visual Studio Team System 2010 Team Suite Beta 1 - ISO

Visual Studio Team System 2010 Test Load Agent Beta 1

Visual Studio Team System 2010 Team Foundation Server Beta 1

Microsoft Visual Studio Lab Management 2010 Beta 1

Visual Studio Team System 2010 Lab Agent Beta 1

.NET Framework

Microsoft .NET Framework 4.0 Beta 1

Microsoft .NET Framework 4.0 Client Profile Beta 1

Other bits

Microsoft Visual Studio 2010 Remote Debugger (Beta 1)

Visual Studio 2010 Shell (Integrated) Beta 1 Redistributable Package

Visual Studio 2010 Shell (Isolated) Beta 1 Redistributable Package

Visit the Visual Studio 2010 and .NET Framework 4 Beta 1 site to download the Beta, submit product feedback, find links to forums or for additional information about the Beta.  

 

Downloading and Installing Visual Studio 2010 Beta 1 on Channel9.

Filed under: Visual Studio 2010

Share SocialTwist Tell-a-Friend 

Multi-Targeting

What is Multi-Targeting?

With the past few releases of Visual Studio, each Visual Studio release only supported a specific version of the .NET Framework.  For example, VS 2002 only worked with .NET 1.0, VS 2003 only worked with .NET 1.1, and VS 2005 only worked with .NET 2.0.

One of the big changes we are making starting with the VS 2008 release is to support what we call “Multi-Targeting” - which means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to start taking advantage of the new features Visual Studio provides without having to always upgrade their existing projects and deployed applications to use a new version of the .NET Framework library.

Now when you open an existing project or create a new one with VS 2008, you can pick which version of the .NET Framework to work with - and the IDE will update its compilers and feature-set to match this.  Among other things, this means that features, controls, projects, item-templates, and assembly references that don’t work with that version of the framework will be hidden, and when you build your application you’ll be able to take the compiled output and copy it onto a machine that only has an older version of the .NET Framework installed, and you’ll know that the application will work.

Creating a New Project in VS 2008 that targets .NET 2.0

To see an example of multi-targeting in action on a recent build of VS 2008 Beta 2, we can select File->New Project to create a new application.

Notice below how in the top-right of the new project dialog there is now a dropdown that allows us to indicate which versions of the .NET Framework we want to target when we create the new project.  If I keep it selected on .NET Framework 3.5, I’ll see a bunch of new project templates listed that weren’t in previous versions of VS (including support for WPF client applications and WCF web service projects):

If I change the dropdown to target .NET 2.0 instead, it will automatically filter the project list to only show those project templates supported on machines with the .NET 2.0 framework installed:

If I create a new ASP.NET Web Application with the .NET 2.0 dropdown setting selected, it will create a new ASP.NET project whose compilation settings, assembly references, and web.config settings are configured to work with existing ASP.NET 2.0 servers:

When you go to the control Toolbox, you’ll see that only those controls that work on ASP.NET 2.0 are listed:

And if you choose Add->Reference and bring up the assembly reference picker dialog, you’ll see that those .NET class assemblies that aren’t supported on .NET 2.0 are grayed out and can’t be added to the project (notice how the “ok” button is not active below when I have a .NET 3.0 or .NET 3.5 assembly selected):

So why use VS 2008 if you aren’t using the new .NET 3.5 features?

You might be wondering: ”so what value do I get when using VS 2008 to work on a ASP.NET 2.0 project versus just using my VS 2005 today?”  Well, the good news is that you get a ton of tool-specific value with VS 2008 that you’ll be able to take advantage of immediately with your existing projects without having to upgrade your framework/ASP.NET version.  A few big tool features in the web development space I think you’ll really like include:

  1. JavaScript intellisense
  2. Much richer JavaScript debugging
  3. Nested ASP.NET master page support at design-time
  4. Rich CSS editing and layout support within the WYSIWYG designer
  5. Split-view designer support for having both source and design views open on a page at the same time
  6. A much faster ASP.NET page designer - with dramatic perf improvements in view-switches between source/design mode
  7. Automated .SQL script generation and hosting deployment support for databases on remote servers

You’ll be able to use all of the above features with any version of the .NET Framework - without having to upgrade your project to necessarily target newer framework versions.  I’ll be blogging about these features (as well as the great new framework features) over the next few weeks.

So how can I upgrade an existing project to .NET 3.5 later?

If at a later point you want to upgrade your project/site to target the NET 3.0 or NET 3.5 version of the framework libraries, you can right-click on the project in the solution explorer and pull up its properties page:

You can change the “Target Framework” dropdown to select the version of the framework you want the project to target.  Doing this will cause VS to automatically update compiler settings and references for the project to use the correct framework version.  For example, it will by default add some of the new LINQ assemblies to your project, as well as add the new System.Web.Extensions assembly that ships in .NET 3.5 which delivers new ASP.NET controls/runtime features and provides built-in ASP.NET AJAX support (this means that you no longer need to download the separate ASP.NET AJAX 1.0 install - it is now just built-in with the .NET 3.5 setup):

Once you change your project’s target version you’ll also see new .NET 3.5 project item templates show up in your add->new items dialog, you’ll be able to reference assemblies built against .NET 3.5, as well as see .NET 3.5 specific controls show up in your toolbox.

For example, below you can now see the new <asp:listview> control (which is an awesome new control that provides the ability to do data reporting, editing, insert, delete and paging scenarios - with 100% control over the markup generated and no inline styles or other html elements), as well as the new <asp:linqdatasource> control (which enables you to easily bind and work against LINQ to SQL data models), and <asp:datapager> control show up under the “Data” section of our toolbox:

Note that in addition to changing your framework version “up” in your project properties dialog, you can also optionally take a project that is currently building against .NET 3.0 or 3.5 and change it “down” (for example: move it from .NET 3.5 to 2.0).  This will automatically remove the newer assembly references from your project, update your web.config file, and allow you to compile against the older framework (note: if you have code in the project that was written against the new APIs, obviously you’ll need to change it).

What about .NET 1.0 and 1.1?

Unfortunately the VS 2008 multi-targeting support only works with .NET 2.0, .NET 3.0 and .NET 3.5 - and not against older versions of the framework.  The reason for this is that there were significant CLR engine changes between .NET 1.x and 2.x that make debugging very difficult to support.  In the end the costing of the work to support that was so large and impacted so many parts of Visual Studio that we weren’t able to add 1.1 support in this release.

VS 2008 does run side-by-side, though, with VS 2005, VS 2003, and VS 2002.  So it is definitely possible to continue targeting .NET 1.1 projects using VS 2003 on the same machine as VS 2008.

What is compatibility like moving from VS 2005 to VS 2008 and .NET Framework 2.0 to 3.5?

We are trying to make sure that .NET Framework 3.5 is a super compatible upgrade from .NET 2.0, and not require you to change any code in order to target the new framework version.  We’ve deliberately made only non-breaking modifications to existing .NET assemblies in the .NET 3.5 release, and where possible added new features in separate assemblies to minimize the chance of breaking changes.

We are also not making project model or build changes with VS 2008.  I, like you, hope to never to go through that again!  Both the “web site” and “web application project” models will be fully supported going forward.

Hope this helps,

Share SocialTwist Tell-a-Friend