using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Data.Odbc;
namespace WindowsApplication12
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
OdbcConnection con=new OdbcConnection ("driver={microsoft odbc for oracle};uid=scott;pwd=tiger;");
OdbcCommand cmd=new OdbcCommand ("select * from emp",con );
OdbcDataAdapter da=new OdbcDataAdapter (cmd);
DataSet ds=new DataSet();
da.Fill(ds);
dataGridView1.DataSource = ds.Tables[0];
}
}
}
feel free for any queries and suggestions
ReplyDelete