473,668 Members | 2,386 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

update takes long time

Hello,
I have a vb.net web app that I am doing reads and adds to a database.
Everything works fine and happens instantly. I recently added an update and
it takes a long time to finish. I was wondering if there was anyone else who
experenced this problem and if there are any ways around it?

Dim MySQL As String
MySQL = "UPDATE db SET Var1 = 'Y' WHERE aimtno = " & tnum & "
and abook = " & tbook
Dim strConn As String = "Provider=IBMDA 400; Data
source=datasour ce; user id = " & tuserid & "; password = " & tpass & ""
Dim MyConn As New OleDbConnection (strConn)
Dim cmd As New OleDbCommand(My SQL, MyConn)
cmd.Connection. Open()
cmd.ExecuteNonQ uery()
MyConn.Close()
Nov 21 '05 #1
4 2063
Brian,

Beside Jay there are in my opinion not *much* who have expirience with
connections to an IBM 400 system in this newsgroup in relation with dotNet.

When I was you would I ask this as well in the newsgroup.

Adonet
news://msnews.microsoft.com/microsof...amework.adonet

Web interface:
http://communities2.microsoft.com/co...amework.adonet

Not that you are not welcome here with your question however to get more
help.

Cor
Nov 21 '05 #2
If it is updated eventually then do check with your system resources.

chanmm

"Brian" <ja*****@amc.co m> wrote in message
news:D7******** *************** ***********@mic rosoft.com...
Hello,
I have a vb.net web app that I am doing reads and adds to a database.
Everything works fine and happens instantly. I recently added an update
and
it takes a long time to finish. I was wondering if there was anyone else
who
experenced this problem and if there are any ways around it?

Dim MySQL As String
MySQL = "UPDATE db SET Var1 = 'Y' WHERE aimtno = " & tnum & "
and abook = " & tbook
Dim strConn As String = "Provider=IBMDA 400; Data
source=datasour ce; user id = " & tuserid & "; password = " & tpass & ""
Dim MyConn As New OleDbConnection (strConn)
Dim cmd As New OleDbCommand(My SQL, MyConn)
cmd.Connection. Open()
cmd.ExecuteNonQ uery()
MyConn.Close()

Nov 21 '05 #3
Will do, but I have a 2.8 P4 with a gig of ram. I would think that I would
have enough resources to update one field.

Brian

"chanmm" wrote:
If it is updated eventually then do check with your system resources.

chanmm

"Brian" <ja*****@amc.co m> wrote in message
news:D7******** *************** ***********@mic rosoft.com...
Hello,
I have a vb.net web app that I am doing reads and adds to a database.
Everything works fine and happens instantly. I recently added an update
and
it takes a long time to finish. I was wondering if there was anyone else
who
experenced this problem and if there are any ways around it?

Dim MySQL As String
MySQL = "UPDATE db SET Var1 = 'Y' WHERE aimtno = " & tnum & "
and abook = " & tbook
Dim strConn As String = "Provider=IBMDA 400; Data
source=datasour ce; user id = " & tuserid & "; password = " & tpass & ""
Dim MyConn As New OleDbConnection (strConn)
Dim cmd As New OleDbCommand(My SQL, MyConn)
cmd.Connection. Open()
cmd.ExecuteNonQ uery()
MyConn.Close()


Nov 21 '05 #4
You are asking it to set a field to Y for each record that satisfies 2
values, which could be none up to every record in the database. Maybe it is
updating more records than you are expecting?
Have you looked at the obvious yet, Indexes?
Are the criteria fields indexed? If not, it will search all the records the
hard way looking for which ones to update. This can be painfully slow as you
database gets large.

Gerald

"Brian" <ja*****@amc.co m> wrote in message
news:D7******** *************** ***********@mic rosoft.com...
Hello,
I have a vb.net web app that I am doing reads and adds to a database.
Everything works fine and happens instantly. I recently added an update and it takes a long time to finish. I was wondering if there was anyone else who experenced this problem and if there are any ways around it?

Dim MySQL As String
MySQL = "UPDATE db SET Var1 = 'Y' WHERE aimtno = " & tnum & "
and abook = " & tbook
Dim strConn As String = "Provider=IBMDA 400; Data
source=datasour ce; user id = " & tuserid & "; password = " & tpass & ""
Dim MyConn As New OleDbConnection (strConn)
Dim cmd As New OleDbCommand(My SQL, MyConn)
cmd.Connection. Open()
cmd.ExecuteNonQ uery()
MyConn.Close()

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
18175
by: Karaoke Prince | last post by:
Hi There, I have an update statement to update a field of a table (~15,000,000 records). It took me around 3 hours to finish 2 weeks ago. After that no one touched the server and no configuration changed. Until yesterday, I re-ran it again and it took me more than 18hrs and still not yet finished!!! What's wrong with it? I can ran it successfully before. I have tried two times but the result was still the same.
17
5008
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by cust_no, ded_type_cd, chk_no)
27
2522
by: VK | last post by:
<http://www.jibbering.com/faq/#FAQ3_2> The parts where update, replacement or add-on is needed are in <update> tag. 3.2 What online resources are available? Javascript FAQ sites, please check these first:- <http://developer.irt.org/script/script.htm>
1
2623
by: Greg Strong | last post by:
Hello All, Any reason why a select query that runs will not run as an update query? What I've done is created a select query that runs successfully. The query has several custom functions to create data. When I attempt to run the query as an update query I receive an error message which reads:
20
2494
by: Development - multi.art.studio | last post by:
Hello everyone, i just upgraded my old postgres-database from version 7.1 to 7.4.2. i dumped out my 7.1 database (with pg_dump from 7.1) as an sql-file with copy-commands and to one file using insert-statements. after initalizing and starting postgres 7.4 on a different port and datadirectory, i tried to import the sql-dump with the copy statements. this import fails, but importing the dump-file with inserts took a long time but was...
30
3384
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and commits it. How does the other user get the updated view without polling for changes? Is there some sort of callback mechanism that can be set up on the dataset or connection? TIA
5
8325
by: parwal.sandeep | last post by:
Hello grp! i'm using INNODB tables which are using frequently . if i fire a SELECT query which fetch major part of table it usually take 10-20 seconds to complete. in mean time if any UPDATE qry comes for a perticular row which is part of SELECT qry i want to know that whether UPDATE will wait for completing SELECT qry or not, or it simply executing without bothering SELECT qry .
2
3101
by: Miro | last post by:
I will ask the question first then fumble thru trying to explain myself so i dont waste too much of your time. Question / Statement - Every mdb table needs a PrimaryKey ( or maybe an index - i havnt tested the index yet ) so you can use an .UPDATE( dataTable ) on the data adapter. Otherwise you will get an exception error. Is this statement true? ---- Now me fumbling thru
1
3131
by: giovannino | last post by:
Dear all, I did a query which update a sequence number (column NR_SEQUENZA) in a table using a nice code (from Trevor !). 1) Given that I'm not a programmer I can't understand why numbering doesn't start always, running more times the update query, from the same starting parameter assigned (1000000000). It seems to me that it takes memory last number calculated and running prox update it starts from last table row updated. I need...
0
8378
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
8791
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
8577
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,...
0
8653
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
7398
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
6206
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
5677
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
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2786
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.