Friday, 10 October 2014

How To Get Multiple Divs Side By Side

hai..friend today i am going to explain how to work with asp.net chart control using c# ..

By using chart control we can display data in dynamic way Which is present in database.

Step 1 :By I Had created database with following tables :





Step 2 :I have enter the field with following data :





Step 3: Now i haven RegisterPage.aspx  & used grid view control to display the database data..







Step 4:Now i have taken Chart Control To display the data in dynamically that is in the form column,pie,stock,Area,Bubble,bar And Many more....

Drag and Drop chart control in aspx Page ..you will get the following code





Chat is displayed in the following Way
       



Choose Data Source For chart Control  From Sql Database Click Next


Next Connect To New Connection -->Connect to the database using database mode connection

you will get the picture Click On Next For save connection String Name as "myworldConnectionString2".


 Next Step:

In this Step I will check weather to choose all the field in the table or  any one...In my project I select All the Feilds using * in the Picture Click Next On it The query will be Displayed  


Next Step:
Test The Query ,You will Find the Output  from the database table records..click On Finish










Next Step:















What is ADO.NET?

What is ADO.NET?






ADO.Net is framework for interacting with any database/XML document.ADO.Net supports two models for interacting with the database.
Full Form of ADO.Net is (ActiveX Data Objects):

Disconnected Model
Connected Model

Disconnected Model:

Disconnected model is used to interact with the database then the connectivity between the application and database is not required while performing any navigations or manipulations on the data.
Note: Disconnected model establish the connection with database and process the connection implicitly based on the requirement.

Connected Model:
Connected model is used to interact with the database then the connectivity between the application and database is required while performing any navigations or manipulations on the data.

Connection object:
Connection object is used to establish physical connection between the Application and the Database.





Dotnet C# ASP.NET
DataAdapter object:
It is a collection of Command object which acts like an interface or bridge between the Database and the Dataset for transferring the data.

There are two Methods for DataAdapter:
FILL:
FILL is used to read the data from the database based on the SELECT statement of the SelectCommand of DataAdapter and used to fill the DataSet with the retrieved information.

Update:
It is used to read the data from the DataSet and used to update the Database with the information.


DataSet:

DataSet is an in-memory representation of the data at the client system in the format of XML. It reads the data in both forward and backward direction Since, a DataSet maintains the information of more than one table, a DataSet is also considered as a collection of Data Tables. Any manipulations performed on the data table of DataSet will not be reflected on the Database.
DataSet is of two types:
1. Typed DataSet
2. Untyped DataSet

Typed DataSet:
Whenever, a DataSet is defined based on XML Schema Definition (XSD) then it is said to be Typed DataSet.

Untyped DataSet:
Whenever, a DataSet is defined without XML Schema Definition then it is said to be Untyped DataSet.

DataView:
DataView is a logical representation of the data present within the data members of DataSet.

DataReader:
DataReader reads the data from database only in forward direction. The data can only be read but not update.

Command:
Command is used to provide the source for the connection object. By using this command object we can wright SQL Queries

There are three command Objects:
1.ExecuteScalar
2.ExecuteReader
3.ExecuteNonQuery

ExecuteScalar:
Execute Scalar can read only single value from the database like Count,Sum etc


ExecuteReader:

ExecuteReader can reads row set of data from the database using SELECT statement.
ExecuteNonQuery:
ExecuteNonQuery Execute Insert, Delete, Update SQL Commands and returns the rows affected by the Query.



What is Trigger in SQL Server



Trigger:

Trigger is a database object which automatically executes whenever some operation like insert, update or delete is performed on table.
                                        or

A trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. DML triggers execute when a user tries to modify data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, or DELETE statements on a table or view
 
Syntax:
Create Trigger <Trigger-Name> on <Table-Name>
For insert, update, delete
As
Begin

    -- Your operations here.
    print 'Done some change.'

End
Example:
Create Trigger EmpTrigger on Employee
For insert, update, delete
As
Begin

    -- Your operations here.
    print 'Done some change.'

End
Check the output of Employee table.
select * from Employee
Output:
Execute above statement, then Trigger will be created on Employee table.
Now i'm inserting one new record into Employee table.
insert into Employee(EmployeeName, Email, DepartmentID, Active)
values('Vinod Reddy', 'vinnu@studentboxoffice.in', 1, 1)
After execution above statement, EmpTrigger will be fired and the operations which are mentioned in that Trigger will be performed. It will give following message.
Done some change.
(1 row(s) affected)
Output: