Sunday, December 25, 2011

Sqlserver Issues ,Security Max Size(2005/2008 sql)

These are some of the Maximum Capacity Specifications for SQL Server 2008/2005 the Maximum size upto

* Database size: 524,272 terabytes
* Databases per instance of SQL Server: 32,767
* Filegroups per database: 32,767
* Files per database: 32,767
* File size (data): 16 terabytes
* File size (log): 2 terabytes
* Rows per table: Limited by available storage
* Tables per database: Limited by number of objects in a database

DataInsertion From One DataBase Column to Another DataBase Column

we need to write the following query to Insert Data from One Database column to another database column while the column name must be same in both of the tables and the datatype of the columns.

"Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)
Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item"


Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item where SupplyChaindb.dbo.SI_Item.itm_Active='1'

Debug Sqlserver Stored Procedure:.

Create the above procedure.

  PROCEDURE Procdebug @in INT, @out INT out BEGINIF ( @in IS NULL ) SET
@in = 0 WHILE ( @in < = 100 ) BEGIN SET @out = @in SET @in = @in + 10 PRINT CONVERT(VARCHAR, @in) + ' - ' + CONVERT(VARCHAR, @out) END END
GO
DECLARE
EXEC
SELECT
@out INT Procdebug 5,@out OUTPUT @out
After creating stored procedure , select the second script to debug it. After selecting press F11, screen will open sored procedure in debug mode.Keep Press the F11 Button to continue all the cycles of debuging by press the F11 button you will the overall stage values.


CREATE
AS

Saturday, November 19, 2011

Asp.net from 2.0 ,3.5,4.0 Versions.

Asp.net from version 1.1 and from the latest version 4.0 changes the technology day by the developers need to be on the twose to be apart of Microsoft Technologist.The Technology used few of the very broad Libraries that reduce the code upto 25%.Few of the technical terms i am going to share with you.

Tracing:.

Tracing a term that displays the details about how your code was executed. It refers to collecting information about the application while it is running. Tracing information can help you to troubleshoot an application. It enables you to record information in various log files about the errors that might occur at run time. You can analyze these log files to find the cause of the errors.


Asp.Net 4.O Issue ConfigurationManager Class Not Access

The same happened to me... I changed my code accordingly, but the project wouldn't compile. It turns out that you need to add a reference to System.Configuration to the project, rather than simply adding it with a using statement. This can be done as:

Add a reference to System.Configuration by clicking Project -> Add Reference... and searching through the .NET components for System.Configuration




Thursday, October 6, 2011

Asp.Net Codes with Best URLs

As as the time going we have seen many latest Trends in Dotnet Platform the Latest Visual Studio 2011 has been lanual Studio 2011 has been lanuched with exsiting features for software engineers.The inclusion of MVC 3.0,Linq make the development more impressive .

Find the Best URLs for your refrence for ASP.NET Codes
check with exsiting features for software engineers.The inclusion of MVC 3.0,Linq make the development more impressive .

http://www.aspdotnet-suresh.com/
http://csharpdotnetfreak.blogspot.com/
http://asp-net-example.blogspot.com/2008/12/aspnet-arraylist-example-using.html
http://www.aspnettutorials.com/tutorials/advanced/Hashtable-csharp.aspx
http://www.xmlforasp.net
http://aspdotnetcodebook.blogspot.com

Saturday, July 16, 2011

Asp,net Inside MVC Architecture

Inside MVC Architecture

The entire ASP.NET MVC architecture is based on Microsoft .NET Framework 3.5 and in addition uses LINQ to SQL Server.
 

What is a Model?

  1. MVC model is basically a C# or VB.NET class
  2. A model is accessible by both controller and view
  3. A model can be used to pass data from Controller to view
  4. A view can use model to display data in page.

What is a View?

  1. View is an ASPX page without having a code behind file
  2. All page specific HTML generation and formatting can be done inside view
  3. One can use Inline code (server tags ) to develop dynamic pages
  4. A request to view (ASPX page) can be made only from a controller’s action method
What is a Controller?
  1. Controller is basically a C# or VB.NET class which inherits system.mvc.controller
  2. Controller is a heart of the entire MVC architecture
  3. Inside Controller’s class action methods can be implemented which are responsible for responding to browser OR calling views.
  4. Controller can access and use model class to pass data to views
  5. Controller uses ViewData to pass any data to view    
    Overview:.
  • The user interacts with the user interface in some way (for example, by pressing a mouse button).
  • The controller handles the input event from the user interface, often via a registered handler or callback, and converts the event into an appropriate user action, understandable for the model.
  • The controller notifies the model of the user action, possibly resulting in a change in the model's state. (For example, the controller updates the user's shopping cart.)[4]
  • A view queries the model in order to generate an appropriate user interface (for example the view lists the shopping cart's contents). The view gets its own data from the model. In some implementations, the controller may issue a general instruction to the view to render itself. In others, the view is automatically notified by the model of changes in state (Observer) that require a screen update.
  • The user interface waits for further user interactions, which restarts the control flow cycle.






    Monday, May 30, 2011

    Asp.net Tech/web Services

    ASP.NET application life cycle and events processing 

    A web application starts when a browser requests a page of the application first time. The request is received by the IIS which then starts ASP.NET worker process (aspnet_wp.exe). The worker process then allocates a process space to the assembly and loads it. An application_start event occurs followed by Session_start. The request is then processed by the ASP.NET engine and sends back response in the form of HTML. The user receives the response in the form of page.

    The page can be submitted to the server for further processing. The page submitting triggers postback event that causes the browser to send the page data, also called as view state to the server. When server receives view state, it creates new instance of the web form. The data is then restored from the view state to the control of the web form in Page_Init event.
    The data in the control is then available in the Page_load event of the web form. The cached event is then handled and finally the event that caused the postback is processed. The web form is then destroyed. When the user stops using the application, Session_end event occurs and session ends. The default session time is 20 minutes. The application ends when no user accessing the application and this triggers Application_End event. Finally all the resources of the application are reclaimed by the Garbage collector.

    Explain the ASP.NET page lifecycle.  

     

    Lifecycle of a page in ASP.NET follows following steps:
    Page_Init(Initialization of the page) >> LoadViewState(loading of View State) >> LoadPostData(Postback data processing) >> Page_Load(Loading of page) >> RaisePostDataChangedEvent(PostBack change notification) >> RaisePostBackEvent (PostBack event handling) >> Page_PreRender (Page Pre Rendering Phase) >> SaveViewState (View state saving) >> Page_Render (Page rendering) >> Page_UnLoad (Page unloading)

     ----------------------------------------------------------------------------------

    DataSet Vs DataReader

    • DataSet Object works under Disconnected mode, While DataReader Object has Connected mode.
    • DataSet Object has Read/Write access, While DataReader Object has Read-only access.
    • DataSet Object Supports multiple tables from different databases, While DataReader Object Supports a single table based on a single SQL query of one database.
    • DataSet Object has Greater overhead to enable additional features, While DataReader Object being Lightweight object with very little overhead.
    • DataSet Object is Bind to multiple controls, While DataReader Object is Bind to a single control.
    • DataSet Object supports Forward and backward scanning of data, While DataReader Object supports Forward-only scanning of data.
    • DataSet Object has Slower access to data, While DataReader Object has Faster access to data.
    • DataSet Object is Supported by Visual Studio .NET tools, While DataReader Object Must be manually coded. 
    Machine Vs Webconfig

    Machine.config:
    1. The configurations mentioned in machine.config file are applicable to all the applications hosted in a machine/computer/server.

    2. The machine.config file is located in x:\\Microsoft.NET\Framework\\config\machine.config

    3. There can be only one machine.config file per machine (per dotnet framework installed).

    web.config:
    1. web.config file contains configurations for a single application.

    2. Web.config files overrides the configurations mentioned in machine.config file.

    3. The web configuration file is located in your application's root folder

    4. There can be multiple web.config files in a single web application in different sub folders.

      Friday, April 8, 2011

      BlackBerry & Android apps Tablet programming



      Installation Guide:
      First off the Required Downloads:
      1. VMWare virtual machine player here
      2. Adobe AIR 2.5 here
      3. BlackBerry Tablet OS SDK here
      4. BlackBerry PlayBook Simulator here
      The announcement by RIM (Research in Motion) of their latest tablet PlayBook and its accompanying application development platform is really exciting news! Yes – mobile is hot!

       BlackBerry & Android apps

      Sharing Few of the documentation for blackberry apps.

      *   http://docs.blackberry.com/en/developers/deliverables/11958/Create_a_menu_836422_11.jsp

      *   http://docs.blackberry.com/en/developers/deliverables/11958/UI_components_508102_11.jsp

      *   http://supportforums.blackberry.com/t5/Java-Development/tkb-p/java_dev%40tkb?labels=blackberry+ui

      Wednesday, March 9, 2011

      SQL SERVER 2005 Sps & Qurries /IIS Configs Issues and solutions

      SqlServer Complex Qurries:.

      Getting 3rd Max Unit Price value form table
      ---------------------------------
      SELECT TOP 1 UnitPrice
      FROM (
      SELECT DISTINCT TOP 3
       UnitPrice
      FROM Products
      ORDER BY UnitPrice DESC) A
      ORDER BY UnitPrice
      ----------------------------------

      Create Table Named Marks.

      CREATE TABLE [dbo].[Marks]([MarksID] [int] IDENTITY(1,1) NOT NULL,[Name] [varchar](50) NULL,[Marks] [numeric](18, 0) NULL,CONSTRAINT [PK_Marks] PRIMARY KEY CLUSTERED ([MarksID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]GO
      Getting 4th and Fifth max Values from a table Marks.

      select top 2 (Marks) from (Select top 5(Marks) from Marks Order by Marks Desc)A order by Marks

      Multiple Tables Insert using Stored Procedure

      Create PROCEDURE dbo.InsertNewImage
       @ImageTitle nvarchar(30),
       @ImageDescription nvarchar(100),
       @ImageFilename nvarchar(50),
       @ImageThumbnail image,
       @AlbumID int
      AS
       Begin

        Set Nocount On

        DECLARE @ImageID int

        INSERT INTO Images(ImageTitle, ImageDescription, ImageFilename, ImageThumbnail)
        VALUES (@ImageTitle, @ImageDescription, @ImageFilename, @ImageThumbnail)

        SELECT @ImageID=@@IDENTITY

        INSERT INTO ImageInAlbum(ImageId, AlbumId)
        VALUES (@ImageID, @AlbumID)

       End

      OnDelete Cascade Clause

      CREATE TABLE test_child
      (SUB1 INT,
      [NO] int,
      FOREIGN KEY ([NO]) REFERENCES Test_parent
      ON DELETE CASCADE)



      SQL SERVER /2005 Configs Issues and solutions


      <b>1-</b> Back Up a Database (SQL Server Management Studio)/Getting Location of any db file.

      Error<>

      Working in sql with attcahing any db file from any location the above attach file is enable to view in program files because it start overwritting on the attach file .U need make a back of that particular file while transporting it another system.

      Solution

      Show the Links
      http://msdn.microsoft.com/en-us/library/ms187510.aspx
      http://msdn.microsoft.com/en-us/library/ms188312.aspx


      Creation Of User Login:. 

      To Make any user we need to go and login through windows authentecation mode go in security click on logins to create any User Login we need give the users special rights

      *SysAdmin
      *DBCreator

      'sa' is bydefault user of SqlServer if we need to change its password we need go to the login area and give new passwor...

      Friday, January 21, 2011

      Published Utrack to Samaa Tv/ iReporter Deployment

      Need More Work to do on server deployment Utrack has been Publish to samaa tv at 20-jan-2010...... with the following link

      http://ireporter.samaa.tv/Utrack/DisplayMap2.aspx (Utrack Web Access)

      Above Link is active with perfect traking to both web/Mobile apps.and the product demo has been given on 27th of Jan 2011 to the concerned person..at SAMAA TV.

      Ireporter deployment from the scratch has been made to Samaa tv at 17-March-2011 and maintain a new server having all configurations of both IIS and SqlServer 2005.

      Keypoints at iReporter Deploymnet:.

      * we need to configure IIS properly then made a connetion to the sqlserver
      * To Upload any images and videos in any particular dircetory we need to defined few permissons otherwise the desried file image/videos cant be upload we to need rightclick on both photos/Vidoes folder and add users

      1-  IUSER
      2- NETWORK SERVICE
           Give the writting rights to both the users, Having all these rights the application can run properly and images and vidoes can uploaded from the mobile (Java Enabled)

      -----------------------------------------------------------------------------------------------------
      Utrack Review (27-sep2011)
       
       The demonstration has bee made on 28-Sep-2011 to CEO.of the company






      Friday, January 7, 2011

      Need 2B on The Twose In IIS CONFIGURATION(5.1)

      Currently working at configuration of iis server a series of issues came but looking forward to fix every problem INSHALLAH......Almost Half Done but i think many 2come.

      Issues related to IIS SERVER are mention in timely manner.


      Issue related to permissions of iis check the link handle the problem

      Issue 1:Server Application Unavailable:.
      ************************************************************
      Got the solution through above link check the permissions
      http://blog.crowe.co.nz/blog/archive/2005/08/30/242.aspx
      ************************************************************

      Issue 2:Fail To access IIS MetaBase:.
      *************************************************************

      //////////////FAIL TO ACCESS IIS Metabase///////////////// (issue:2)

      SOLUITON :2

      GO in command mode

      C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

      execute this command "aspnet_regiis -i"

      it start reinstalling your web 2.0 framework the server will surely run all static asp.net pages..after the above configurations

      Other wise if the page not run then go through this one as well...

      THE ASP.NET PAGE CAN RUN EASLIY BY GIVING PERMISSIONS TO THE FOLLOWING OTHERWISE THE OTHERS USERS IT ALL ABOUT THE RIGHTS THAT HAVE BEEN TO THE PARTICULAR FOLDER
      GIVEN TO THE FOLDER....

      1-EVERYONE
      2-SYSTEM
      3-ADMINISTRATOR


      *************************************************************

      Most Important Thing to Understand About IIS 5.1

      ISSUE:.3

      Login Failed because xxxx/asp.net user xxxx=server name

      To reslove the probelm go on these steps

      Open sqlserver 2005


      1 go in Logins
      2 check the above user login is present or not
      3 if the user login not present then add user login by rightsclick on logins node and add new Login Name or serarch it you can get all the users names while at
      4 searching get the name of the user that creats error on web page....
      5 After adding add users to login rights click on the user a windows will appear.
      6 Check On Server Roles a list of rules will appear then check to "sysadmin" this will allow to access database easily...


      Use must select the rights to sysadmin rights ohterwise another error has been like

      error 2. like deny select statement occur b/c not assing the role to sysadmin

      *********************************************************


      Utrack Deployed At Saztel Server

      Utrack deployed at saztel server with link 210.2.135.26/Utarck/DisplayMap2.aspx
      But the link is enable to access through WAN'.nEED sOMETHING


      A core issue evlove during the configrayions og IIS SERVER

      check the above link about the issues

      http://www.neilstuff.com/iis/common-iis-and-asp.net-issues.htm


      IIS   Crystal Report issue