473,396 Members | 2,039 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,396 software developers and data experts.

Breaking down job

145 100+
I am updating local sql server based on web services data. When I do a query how many updates I have to make it comes to be more than 4000 records. Now the problem is time-out issue and so many other issues.

Is there a way to break the job down into pieces. Like 500 records at a time. I have added a counter and I dont how am I going to tell the system do 500 at a time.
Aug 14 '08 #1
7 993
cloud255
427 Expert 256MB
This is really not too much of an issue, post some code and we'll help you.

All you really need is a loop with a bit of logic ...
Aug 15 '08 #2
dorandoran
145 100+
Oh, the code is long. I am going to upload the code in text format and let me know if you could please help. I am truly frustrated by the webservices.

Here is the text file

http://www.a2zlancer.com/test/update_local_slip_table.txt

Thanks
Julie Jones
Aug 18 '08 #3
Curtis Rutland
3,256 Expert 2GB
Just off the top of my head, can you change the timeout value to something greater? If timeouts are your problem, just increase the timeout limit (if you can).
Aug 18 '08 #4
dorandoran
145 100+
I tried timeout = -1 which is unlimited, but i dont know why this is not working. may be I am doing it in the right place. I have timeout to infinite at the login level.
Aug 18 '08 #5
cloud255
427 Expert 256MB
That is a lot of code.

I'm not really good at VB but i will give it a shot.

You have a lot of for each loops, that is what's slowing you down, but the first thing you should look at is the time out value if i'm not mistaken it is set to 1 minute, that might be a bit short expecially if you are going with huge amounts of data across the internet.

Next you have that counter "i" but you only use it to count the number of records, not split the operation. My VB really isn't that good so i will try to give you some pseudo code:

Find all the rows which need to be updated.
Perform the update locally.
Create a set of updated rows 500 or so at a time and send this to the database, repeat with the next 500 or so.

But this still doesnt look good to me, i would look for a way to either generate a query which will handle this work or a stored procedure perhaps.
Maybe a webservice which accepts a collection of objects, all of which need to be updated with only the values which need to be changed i.e. object with 9 fields for example, only 2 need to be changed, then leave the other 7 empty.

Then on the server pass each of the objects to a stored procedure which will handle it, with some simple logic telling it to leave all the empty fields unchanged. Your code seems a bit resource intense for a client machine
I hope this was of some help to you, maybe someone wiser will give us a better solution
Aug 18 '08 #6
dorandoran
145 100+
Thank you Cloud for your input. I will try to mess with the timeout thing. I do have stored procedure but the soap (web services) that I am using is too messy. At this moment I dont have the time to change the code. I hope you understand. I will follow your suggestion as close as possible.

Again, thanks a lot for looking into this. Appreciate it.

Thanks
Julie Jones
Aug 18 '08 #7
cloud255
427 Expert 256MB
Thank you Cloud for your input. I will try to mess with the timeout thing. I do have stored procedure but the soap (web services) that I am using is too messy. At this moment I dont have the time to change the code. I hope you understand. I will follow your suggestion as close as possible.

Again, thanks a lot for looking into this. Appreciate it.

Thanks
Julie Jones

You are more than welcome, again my apologies for the limited VB knowledge.

Happy to help
Aug 18 '08 #8

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

Similar topics

0
by: MarionEll | last post by:
--------------------------------------------------------- ************* Call for Participation ************** ************ Late Breaking News ************* *********** Extreme...
0
by: Amy | last post by:
I am looking for an rss feed that contains really important breaking news like "A large Tsunami just hit Asia" or "Terrorists attack the World Trade Center", but is empty if there really isn't...
2
by: Jacob | last post by:
A problem I've been rather stuck on and, try as I might, have not been able to find the answer to. I've written a nice little class that I want to include in another project. The class works...
27
by: The Bicycling Guitarist | last post by:
Hi. I found the following when trying to learn if there is such a thing as a non-breaking hyphen. Apparently Unicode has a ‑ but that is not well-supported, especially in older browsers. Somebody...
22
by: stevenkobes | last post by:
If a word has a hyphen in it, IE will permit a line break at the hyphen, but Firefox/Mozilla won't. Apparently the Firefox behavior is standards-compliant, but it is not what I want. Is there a...
4
by: John Wood | last post by:
I saw that Microsoft have released a list of breaking changes in .Net here: http://msdn.microsoft.com/netframework/programming/breakingchanges/runtime/default.aspx While this is useful, it seems...
150
by: tony | last post by:
If you have any PHP scripts which will not work in the current releases due to breaks in backwards compatibility then take a look at http://www.tonymarston.net/php-mysql/bc-is-everything.html and...
3
by: Beowulf | last post by:
I have data coming from a telephony system that keeps track of when an employee makes a phone call to conduct a survey and which project number is being billed for the time the employee spends on...
28
by: Useful Info | last post by:
Like on 9/11, the Federal Government apparently WANTED people to die at the hands of Cho at VA Tech, because they told campus police not to pursue Cho after the double homicide occurred. Story...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.