ADO Net Database ASP.Net Tutorial

<%@ Page Language="C#" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<%@ import Namespace="System.Data.OleDb" %>
<%@ import Namespace="System.Data.Odbc" %>

    void Page_Load(object sender, EventArgs e) {
        OdbcConnection myOdbcConnection = new OdbcConnection("driver={SQL Server};server=(local)\\YourDatabase;database=Books;uid=YourID;pwd=letmein;");
    
        myOdbcConnection.Open();
    
        lblOdbcConnectionString.Text = myOdbcConnection.ConnectionString;
        lblOdbcConnectionTimeout.Text = Convert.ToString(myOdbcConnection.ConnectionTimeout);
        lblOdbcDatabase.Text = myOdbcConnection.Database;
        lblOdbcDataSource.Text = myOdbcConnection.DataSource;
        lblOdbcDriver.Text = myOdbcConnection.Driver;
        lblOdbcServerVersion.Text = myOdbcConnection.ServerVersion;
        lblOdbcState.Text = Convert.ToString(myOdbcConnection.State);
    
        myOdbcConnection.Close();
    }





    
        
            
                
                    
                    
                
                
                    
                    
                
                
                    
                    
                
                
                    
                    
                
                
                    
                    
                
                
                    
                    
                
                
                    
                    
                
            
        

                        ConnectionString: 
                    

                        ConnectionString

                        ConnectionTimeout: 
                    

                        ConnectionTimeout

                        Database: 
                    

                        Database

                        DataSource: 
                    

                        DataSource

                        Driver: 
                    

                        Driver

                        ServerVersion: 
                    

                        ServerVersion

                        State: 
                    

                        State