473,289 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

Set of records recordset.Open hangs in vb6

1
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 5110

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

Similar topics

2
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 ...
1
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...
4
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
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...
36
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...
2
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...
1
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
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...
1
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...
31
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...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.