Results 1 to 6 of 6

Thread: Sql query question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    Georgia
    Posts
    337

    Sql query question

    I have a Sql query with a number of AND LIKE used in the query. It works just fine with maybe 3 AND LIKE in the query but when I add more it doesn't show all the matching rows in the DataGrid. It finds only one or two. I think somehow I need a delay not sure how to do that or where to put it in code. When the user clicks a command button it runs adodc = The query then I do an adodc refresh.
    I'm hoping somone had this problem and hopefully a solution.

    Thanks for any and all help

  2. #2
    Jethro
    Guest
    Maybe you could do a multi layer query or something ... which version of SQL you running, we are finding some memory leakage with 6, that is fixed in 7..... which sounds kinda like your problem... not all correct records being returned...... though we are only doing a couple of selections in the statement.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    Georgia
    Posts
    337
    I'm running Sql 2000. I guess the real problem is to many parts to the search query. If I run just 2 or 3 in the query it runs just fine. So I will have to convince the boss we need to limit each query to 2 or 3 search items for each. It really is strange because the query executes very quickly although this is just a small test database at the moment. I would think it would just run very slowly but still give all the correct results. Anyway it works fine if I limit requests in the query. Also it has alot of wildcards, that may be part of the problem.

    Oh well such is life

    Thanks for replying

  4. #4
    Jethro
    Guest
    Would suggest doing the querie using the two or three criteria, then using code to complete the rest. Am presuming you are connecting to an SQL 7 db via visual basic. What connection are you using ADO or DAO, (don't think anyone bothered with RDO but could be wrong there). Please don't tell me you are using data controls, or it's off to the spanking room with Mistress Katie for you.

  5. #5
    vbCowboy
    Guest
    If I start using data controls can I go to the spanking room...???

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    Georgia
    Posts
    337
    Guess its off to the spanking room for me
    Yes I'm using Sql 2000 and ADO.

    It's not easy being over 60 years old

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