Database Connectivity

So basically, what is database connectivity?
In the most simple and easy words, I can say that database connectivity is nothing but an interface, bridge, or a communication medium between your database and your web through which you can manage various applications or functionalities of your web.
Functionalities | Connectivity
The major functionalities of database connectivity are:
  • Helps in Session mechanism
  • Helps in solving puzzles of user registration pages
  • In database binding
  • Accessing files/data/information that is already stored in the database
  • Basic operation of SQL
Coding | Web Configuration
For creating database connectivity (I am giving you guidelines on the basis of the tools in Visual Studio):
  • Open Visual Studio
  • Access your desired website
  • Access the main page of your website; the main page will be like this:
  • Now click on Solution Explorer at the very right corner; a box like this will be opened:
  • Now click on the web.config link
  • A web.config page will be opened
  • Create a connection string on this page
[connection string]
The following shows how to establish a connection string.
Web configuration Page
(Code like this)
  1. <?xml version="1.0"?>
  2. <!--
  3. For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433
  4. -->
  5. <configuration>
  6. <connectionStrings>
  7. <add name="ABC" connectionString="Data Source=ABHI-PC; Initial Catalog=Reg; Integrated Security=true" />
  8. </connectionStrings>
  9. <system.web>
  10. <compilation debug="false" targetFramework="4.0" />
  11. </system.web>
  12. </configuration>