Click here to Skip to main content
15,896,466 members
Home / Discussions / C#
   

C#

 
GeneralRe: issues in float division a/b Pin
Reelix23-Apr-08 3:01
Reelix23-Apr-08 3:01 
GeneralRe: issues in float division a/b Pin
George_George23-Apr-08 3:22
George_George23-Apr-08 3:22 
GeneralRow Count Pin
Member 400431622-Apr-08 18:23
Member 400431622-Apr-08 18:23 
GeneralRe: Row Count Pin
cocoonwls22-Apr-08 18:39
cocoonwls22-Apr-08 18:39 
GeneralRe: Row Count Pin
Vikram A Punathambekar22-Apr-08 18:52
Vikram A Punathambekar22-Apr-08 18:52 
GeneralRe: Row Count Pin
cocoonwls22-Apr-08 19:09
cocoonwls22-Apr-08 19:09 
GeneralRe: Row Count Pin
Vikram A Punathambekar22-Apr-08 18:53
Vikram A Punathambekar22-Apr-08 18:53 
GeneralRe: Row Count Pin
Ajay.k_Singh22-Apr-08 19:36
Ajay.k_Singh22-Apr-08 19:36 
Hello Sachin,

If you are using a DataSet to connect it with Access table, you may use following syntax –

myDataSet.Tables[0].Rows.Count

If you do not know how to use DataAdapter, Connection object and DataSet I would recommend you to study Ado.Net first.

Just to give you some idea, basic code to connect to one data base file and getting its row count will look like this –

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

OleDbConnection con=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\YourDatabaseFolder\\Nwind.mdb;Persist Security Info=False");

DataSet ds=new DataSet();

OleDbDataAdapter da;

private void Form1_Load(object sender, EventArgs e)
{

da= new OleDbDataAdapter("select * from customers",con);

da.Fill(ds);

}

private void button1_Click(object sender, EventArgs e)
{

MessageBox.Show( ds.Tables[0].Rows.Count.ToString());

}
------------------------------------

I hope this helps.

-Ajay.

-------------------------
www.componentone.com
-------------------------

GeneralParameter is not valid. Pin
cuongmits22-Apr-08 13:54
cuongmits22-Apr-08 13:54 
GeneralRe: Parameter is not valid. Pin
Christian Graus22-Apr-08 13:58
protectorChristian Graus22-Apr-08 13:58 
GeneralRe: Parameter is not valid. Pin
cuongmits22-Apr-08 14:05
cuongmits22-Apr-08 14:05 
GeneralRe: Parameter is not valid. Pin
Christian Graus22-Apr-08 14:08
protectorChristian Graus22-Apr-08 14:08 
GeneralRe: Parameter is not valid. Pin
Luc Pattyn22-Apr-08 16:37
sitebuilderLuc Pattyn22-Apr-08 16:37 
GeneralRe: Parameter is not valid. Pin
Jordanwb22-Apr-08 13:58
Jordanwb22-Apr-08 13:58 
GeneralRe: Parameter is not valid. Pin
cuongmits22-Apr-08 14:08
cuongmits22-Apr-08 14:08 
GeneralRe: Parameter is not valid. Pin
Christian Graus22-Apr-08 14:10
protectorChristian Graus22-Apr-08 14:10 
GeneralRe: Parameter is not valid. Pin
cuongmits22-Apr-08 14:15
cuongmits22-Apr-08 14:15 
GeneralRe: Parameter is not valid. Pin
cuongmits22-Apr-08 14:18
cuongmits22-Apr-08 14:18 
GeneralRe: Parameter is not valid. Pin
Christian Graus22-Apr-08 14:21
protectorChristian Graus22-Apr-08 14:21 
GeneralRe: Parameter is not valid. Pin
cuongmits22-Apr-08 14:22
cuongmits22-Apr-08 14:22 
GeneralRe: Parameter is not valid. Pin
Jordanwb22-Apr-08 14:36
Jordanwb22-Apr-08 14:36 
GeneralCalculate a formula Pin
mehrdadc4822-Apr-08 9:24
mehrdadc4822-Apr-08 9:24 
GeneralRe: Calculate a formula Pin
Christian Graus22-Apr-08 12:04
protectorChristian Graus22-Apr-08 12:04 
GeneralRe: Calculate a formula Pin
Mitch F.22-Apr-08 12:09
Mitch F.22-Apr-08 12:09 
QuestionComparing two ArrayLists ? Pin
dennycrane22-Apr-08 8:58
dennycrane22-Apr-08 8:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.