WEBSITE INSIDE IIS SERVE
HOW TO DEVELOP WEBSITE INSIDE IIS SERVE, HERE IS THE BASIC VIDEO WITH SIMPLE DESCRIPTION AND USEFUL FOR NEW DEVELOPERS ..
< DR > [index ] à object < DR > [Colname] à object |
Pics |
using System.Data.OleDb; |
Variable Declaration : OleDbConnection con; OleDbcommand cmd; OleDbDataReader dr; |
Under Form load : con = new OleDbConnection(“Provider=Msdaora; User ID = Scott; Password=tiger”); cmd = new OleDbcommand(“Select Deptno, Dname, Loc From Dept”, con); con.Open(); dr = cmd.ExecuteReader(); lable1.Text = dr.GetName(0); lable2.Text = dr.GetName(1); lable3.Text = dr.GetName(2); ShowData(); |
Define a method ShowData : Private void ShowData() { If(dr.Read()) { textBox1.Text = dr.GetValue(0).ToStrring(); textBox1.Text = dr[1].ToString(); textBox1.Text = dr[“Loc”].ToString(); } else { MessageBox.Show(“Last Record” } } |
Under next button : ShowData(); |
Under Close Button : If(con.state != ConnectionState.Closed) con.Class(); this.Close(); |
Connection() Connection( String ConnectionString) |
- Oracle | - Msdaora |
- Sql Server | - SqlOledb |
- MS-Access or MS-Excel | - Microsoft.Jet.Oledb.4.0 |
- Indexing Server | - Msidxs |
Oracle | Scott / tiger |
Sql server | Sa / < pwd > |
“Provider = msdaord; UserId = Scott; Password=tiger (; Data Source = < server >)” |
“Provider =SqlOledb; UserId = sa; Password=<pwd>;Database = <db name > (; Data Source = < server >)” |
Connection con = new connection(); con.ConnectionString = “< con str> ”; (OR) Connection con = new Connection( “< con str> ”); |
using System.Data.OleDb; |
Under Button1_Click: OleDbConnection Oracan = new OleDbConnection("Provider = Msdaora;User Id = Scott;Passwod = tiger;"); Oracan.Open(); MessageBox.Show(Oracan.State.ToString()); Oracan.Close(); MessageBox.Show(Oracan.State.ToString()); |
OleDbConnection sqlcon = new OleDbConnection(); sqlcon.ConnectionString = "Provider=SqlOledb;User Id =sa; Password = prabodh; Database=Master"; sqlcon.Open(); MessageBox.Show(sqlcon.State.ToString()); sqlcon.Close(); MessageBox.Show(sqlcon.State.ToString()); |
Command cmd = new Command() cmd.Connection = <con >; cmd.CommandText = “ < Sql stmts >”; (Or) Command cmd = new Command(“ <Sql stmts> “, con); |
ExecuteScalar | à DataReader à Object à int |
Int Que. What is difference B/W ADO’s and ADO.Net? |
- OledbConnection | |
- SqlConnection | - SqlCommand |
- OracleConnection | - OracleCommand |
- OdbcConnection | - OdbcCommand |