does anyone know how to use the to connect to the SQL server to get the no of rows of a file in the server?
I am a beginner of
would u pls tell me the solution in detail.


if you want Tutorails for insert,update and deletethis is perfect link.
and another one if you want to count the rows in the table you can simply fire a query of "SELECT Count(*) from table" and pass it to SqlCommand. and then exeuct this command with Execute Scalar you will get your result.

how to pass it to SQL comand?
could u give me the key code?

first see that link which i give you. it's a complete solution for answer. and pass query to command like this.

dim con as new SqlConnection("your connection string")
dim cmd as new SqlCommand("Select Count(*) from TableName",con)
dim i as integer=Cmd.ExecuteScalar()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.