Results 1 to 4 of 4

Thread: Set of records recordset.open hangs in vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2023
    Posts
    1

    Set of records recordset.open hangs in vb6

    I have a problem. There is an app in vb6 working with SQL Server 2008.
    In db there is the table EquRSh with 8000 rows. I get one record with the help recordset. The string SQL has as follow
    StrSQL="SELECT F1, F2, F3 FROM EquRSh WHERE (F4=" & N4 & " And F5=" & N5 & ")"
    where N4, N5 are integer variables.
    The recordset rs.Open works for a longtime and hangs and gives the message:
    Time of waiting exceeded.
    In the case of string SQL
    StrSQL2="SELECT F1, F2, F3 FROM EquRSh WHERE (F4=" & N4 & ")"
    recordset normally and fast gives a result.
    In the case of 1-string SQL in principe we get one record that not many.
    In SS Management Studio given query gives fast a result.
    What to do? Help, please.

  2. #2
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,832

    Re: Set of records recordset.open hangs in vb6

    Maybe indexes would help
    Please remember next time...elections matter!

  3. #3
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,382

    Re: Set of records recordset.open hangs in vb6

    Depends on the DataType of F5.....
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  4. #4
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Set of records recordset.open hangs in vb6

    What cursor and lock combination are you using?
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

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