473,698 Members | 2,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set of records recordset.Open hangs in vb6

1 New Member
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.
Feb 3 '23 #1
0 5271

Sign in to post your reply or Sign up for a free account.

Similar topics

2
6722
by: Robert Mark Bram | last post by:
Hi All! My ASP page below receives the following error: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E10) Too few parameters. Expected 2. /polyprint/test.asp, line 31 Line 31 is this line from below:
1
1631
by: Andrew Banks | last post by:
I've been handed an ASP project and having worked on .NET for the past year I have completely forgotten what to do. I am querying a SQL server DB and returning XML. The following code seems to work for small amounts of data but with any thing significant (10 records!) the XML is returned incomplete. After testing various things I can only assume that when the Response.Write(objRS(0)) line is reached, that the recordset has not been...
4
12520
by: Nuno | last post by:
Is there any SQL Error? Or I have to use Select case in VB code to control SQL instead. Thank you for any ans. Nuno
4
2063
by: Ray | last post by:
I have a split DB running on a network, with code to relink to tables on launch of the client is they are broken. Usually, this works fine, but for some reason just hangs if another user is using the system. Any idea why and what I can do about it? Ray
36
4469
by: kjvt | last post by:
Based on a prior posting, I've written a function to convert a recordset to a dataview. The first call to the function for a given recordset works perfectly, but the second call always returns a dataview with a count = 0. Can someone explain why and how I might work around this problem? Here is the code for my function: Public Shared Function GetViewFromRS(ByVal pRS As ADODB.Recordset) _ As DataView
2
6334
by: allyn44 | last post by:
Hello, I have built a serch form for users to edit records. I only want them to pull up the record they need, and I want to check for nulls. There should not be dupes becasue the underlying tables are indexed. So the user will pull up either one record or none. Here is my problem: I pass the form name through a tmpvariable and ther other search parameters through unbound fields on an unbound form--this works fine unless the form opens...
1
2613
by: dotnettester | last post by:
Hi, would this code give an EOF or BOF error if there are no rows in the recordset? or the array myArray would be just null? Thnx.
1
1611
by: neelsfer | last post by:
When i use this code to count the number of records on display in a specific subform in the "txtRecordNo" field that is open now, it seems to "update" all the time as the cursor changes every second and i am unable to add new records on mainform, untill i click in one of the fields of this Subform. Then it settles down. Otherwise it works 100% when i add records in the subform. pls help Private Sub Form_Current() Dim rst As...
1
1468
by: jeckoi | last post by:
Below is my code that will load the data from query that I made to the subform -- Form_subViewProcess. However, when executed on line Set frm.Recordset = rsFiltered it hangs/stop the access that I need to open my control manager to execute the whole access program. Im just wondering why this is happening to me? With all the developers in this world why me. I'm using VBA-Access for my front-end and by the way the database that I'm accessing is...
31
2836
by: HibHib | last post by:
I am reformatting an excel sheet to be more access friendly and had to use a recordset, however i have multiple tables that im trying to reformat into 1 new table using vba. When using the function recordset.open the first parameter is Source, and is where i put a table name. To get this to work i tried to establish a loop where it would go through tab1, tab2, tab(n) but i kept getting errors. Is it possible to loop through table names in this...
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9021
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4614
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.