|
-
Apr 2nd, 2007, 02:15 PM
#1
Thread Starter
Addicted Member
[2005] SQL Count to Integer in VB.Net
Hi;
How can I get the rows count in a table with Count function in SQL and take it's value as integer??
-
Apr 2nd, 2007, 02:37 PM
#2
Re: [2005] SQL Count to Integer in VB.Net
SELECT Count(*) FROM TableName
-
Apr 2nd, 2007, 08:51 PM
#3
Re: [2005] SQL Count to Integer in VB.Net
Create an SqlCommand with that query and call it's ExecuteScalar method. The Integer value will be returned via an Object reference so you'll have to cast the result.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|