Tuesday 11 October 2011

ORACLE DATA BASE CONNECTION WITH C#

You need to know that how to connect oracle DB with C#...??
you just Copy & Paste the following code..

c# coding :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Oracle.DataAccess.Client;

namespace DB_connection
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


#region DB connection

public void Form1_Load(object sender, EventArgs e)
{

// db connection
     string oradb = "Data Source=localhost;User ID=system;Password=tiger"; //use ur username Nd password

 
// creating connection string object for the connection string class

OracleConnection con = new OracleConnection(oradb);
 
//open the actual connection with db

con.Open();


  //The Command object is used to specify the SQL command text that is executed, either a SQL string or a  //stored procedure

string sql = "select * from employee where empname='karthik' "; //here use ur tables
OracleCommand cmd = new OracleCommand(sql, con);
cmd.CommandType = CommandType.Text;




OracleDataReader dr = cmd.ExecuteReader();
dr.Read();

  label1.Text = dr.GetString(1);
//here label used for simply display the single retriving value from the data base (DB Connection Checking)
 
}



#endregion

}
}

CREATE TAB-PAGES FOR WEB BROWSERS IN C#

Nano Soft - Karthik
Hi Guyz..
              Do You Want to create Tab Pages for Web Browser..?? No Worries...
  •     After completing your initial process you just add Tab control tool on form from tool box
  •     Create "New Tab" Menu item for Creating New tab page (if you use shortcut key for that New Tab     Menu item means it ll  be very fine to you)
  •     When The New Tab is processed then the New Tab must Open With New WebBrowser tool
  •     For Adding BookMarks Nd History We Can use Xml with C#
              If you Need Forther More Details About This.,you Just Mail Me to My E-Mil id Else Post                             Comment Here..,
              i have webbrowser with coding any One Needs Means Just Mail me.

        My EmailP_id : karthikjune22@yahoo.com

CREATE SIMPLE WEB BROWSER IN C#

Hi guyz..
          You wanna create Web Browser..??  The Following Tips ll be Helps to you..
  •      Drag WebBrowser Tool on form from your toolbox 
  •      You just drag text box and command button on your form , simply use the following coding in command button 
               getCurrentBrowser().Navigate(textBox1.Text);
  •      Now run the application.