473,669 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

App hangs up while inserting records into SQL table

12 New Member
I have a VB6 app that executes an SQL stored procedure that returns a recordset that I loop through 1 record at a time. During the looping process, I am attempting to insert contents from the recordset to another SQL table. This seems to work with small recordsets, but hangs the app if the recordset is large. When I use the SQL Analyzer tool and execute the "insert" command it works fine, so the syntax is correct. Also, if the VB6 calls a "select" for the recordset instead of a stored procedure, it also works just fine. Any help would be greatly appreciated!!!
Oct 29 '07 #1
2 1635
shrimant
48 New Member
I have a VB6 app that executes an SQL stored procedure that returns a recordset that I loop through 1 record at a time. During the looping process, I am attempting to insert contents from the recordset to another SQL table. This seems to work with small recordsets, but hangs the app if the recordset is large. When I use the SQL Analyzer tool and execute the "insert" command it works fine, so the syntax is correct. Also, if the VB6 calls a "select" for the recordset instead of a stored procedure, it also works just fine. Any help would be greatly appreciated!!!
Add some Error Handler to the code and make sure to add the Keyword Doevents insede the loop.
Oct 30 '07 #2
dbanalyst
12 New Member
Think I figured it out. Remember when I said:
"During the looping process, I am attempting to insert contents from the recordset to another SQL table."
Well, the change I made was in doing the insert into the other SQL table, I changed the rdo connection to ado connection, and it works just fine now. So I'm guessing there's a limit on the size of a recordset for an rdo connection, or something? Anyway, thanks for helping me think through this.
Oct 30 '07 #3

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

Similar topics

7
4969
by: chriskoch | last post by:
I am running a DTS Package. I have a temp table with 1494 records. I am inserting a 'Y' or 'N'into a temp table #HasClaims. The TempTable name with the Provider Id's(PRPR_ID) is #TempFACETSNODupes The @identityID is an identity field counting back from 1494 to 1 I count back from the Max value of the identityid (1494) in the While loop until I get through all the records. The idea is to check for the
2
1694
by: Bill | last post by:
Sorry re-posted as my email setting were wrong on the last post I wonder if anyone can help. I have a scheduled job running overnight to delete old records for a particular Db table. The table contains more than half million records and the script
1
3711
by: ing42 | last post by:
I have a problem with inserting records into table when an indexed view is based on it. Table has text field (without it there is no problem, but I need it). Here is a sample code: USE test GO CREATE TABLE dbo.aTable ( INT NOT NULL
11
2690
by: pradeepss | last post by:
I am developing an application which grab a comma delimited file and inserts them into a database. but while inserting it gives me an error. the code is below. Do While Not EOF(iDrop) Line Input #iDrop, iLine iArray = Split(iLine, ";") iArray(5) = Round(iArray(5) / 21.21, 0) With rs .AddNew .Fields("ID") = crID .Fields("NO") = iArray(0)
7
6636
by: ebindia0041 | last post by:
This is like the bug from hell. It is kind of hard to explain, so please bear with me. Background Info: SQL Server 7.0, Asp.net 1.1 with c# I'm inserting simple records into a table. But one insert command is placing 2 or 3 records into the table. The 'extra' records, have the same data as the previous insert incident, (except for the timestamp). Here is an example. Follow the values of the 'Search String' field:
13
3042
by: imnewtoaccess | last post by:
Hi, I am getting errors while inserting records in one table from another. These are the structures of two tables : file51tm_new RecordType Text
10
2921
by: Rahul Babbar | last post by:
Hi, I am getting the following error, while executing the simple insert script on a few tables. INSERT INTO <table_name>(<col1>) VALUES (1); DB2 SQL error: SQLCODE: -440, SQLSTATE: 42884, SQLERRMC: =;FUNCTION Message: No authorized routine named "=" of type "FUNCTION" having compatible arguments was found.
4
2204
by: GabeM | last post by:
I am trying to insert records from one table to another using the WHILE construct, I have managed to move all of the data with the exception of one concatenated field. I can't figure out how to concatenate 'GSA' and the @N into GSAOrderNo column in the TempWebOrders table. The @N is incrementing. If anyone can help, please assist. See code below: -TIA -Gabe Use SMS Declare @N as nvarchar(10)
3
4972
by: simple simon | last post by:
How would I insert into multiple related tables using a table valued parameter? Is there any way to do this without using a WHILE loop? I know how to insert from a table valued parameter into one table: INSERT INTO dbo.Table SELECT * FROM @TVP But what do I do when I want to insert all of someone's information into multiple tables, and have those records related to each other by foreign keys? For example, I want to insert their address...
0
8465
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
8383
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
8895
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
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6210
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
5682
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
4386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1788
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.