Results 1 to 5 of 5

Thread: How can I control a SQL query with VB?

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    34

    Question How can I control a SQL query with VB?

    I would like to query a SQL db with VB that allows me to filter the data being returned. The DB is fairly large and could fill the number of rows in a excel workbook. So, I would like to change the filter with the code. Any help to get me started would be great

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: How can I control a SQL query with VB?

    Welcome to VBForums dfarland

    What code do you have so far? How are you executing the query?


    Has someone helped you? Then you can Rate their helpful post.

  3. #3

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    34

    Re: How can I control a SQL query with VB?

    Haven't started it. The query will be executed with vb code, I hope. I have the query in the workbook and can refresh it. But I would like to filter the return by range of dates.

  4. #4
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: How can I control a SQL query with VB?

    You could do that in the SQL query, just change the Where clauses...


    Has someone helped you? Then you can Rate their helpful post.

  5. #5

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    34

    Re: How can I control a SQL query with VB?

    Yes, I know how to do that, but can I run that from vb?

Posting Permissions

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



Click Here to Expand Forum to Full Width