Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2008
    Thanked 1 Time in 1 Post

    Count number of items in sql with vb6.0

    Hello...I have an array that I don't know how big the array will be. I was wondering what the best way to count the number of entries in a database will be. I am using vb6.0 as the coding language, and sql.

    When I have my sql statement and set it to a variable it displays my sql statement in a text box. But want I want to try to do is set it to a variable and then have the variable be the item in the array.

    I hope that makes sense. If it does not let me know and I will do my best to explain better.


  2. #2
    New to the CF scene
    Join Date
    Mar 2008
    Thanked 0 Times in 0 Posts
    You can use the SQL COUNT function to count how many records you're going to be querying. Here's a web site that explains the COUNT function.


    Once you query how many records you're actually querying, you know what size to make the array... and well, it's cake from there.

    Hope this helps.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts