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

Latency in DB-update using Jet

I'm currently using Jet for an Visual Basic Access application.

The application is supposed to delete a row in a table, and afterwards
update indexes on the remaining rows in that table, by giving them new
indexes. This works very well for me until I got to the point (on my
computer) that I had over 1500 rows that was to be updated. Then,
because of the latency-problem the row deleted was "not deleted"
before the update-statement triggered, making my application crash.

On my computer the "limit" of rows before this occures was 1500, but
on my clients computer the limit case just after 50-60 rows.

Any suggestions to make this delete-statement final before the update
kicks in? Is it possible to "commit" changes somehow, forcing the
delete to be done?
Is there any other way of connecting to an Access DB that will make
the latency go away (or at least trigger at a higher level..) I need
to be able to delete a row, and immidiately update about 2000 rows to
be on the safe side here.

And no, SQL Server or MySQL or any other database (except filesystem
stuff) is not an option.

Anyone?
Nov 13 '05 #1
7 2104
"Tormod Engebu" <to****@engebu.com> wrote in message
news:9e**************************@posting.google.c om...
I'm currently using Jet for an Visual Basic Access application.

The application is supposed to delete a row in a table, and afterwards
update indexes on the remaining rows in that table, by giving them new
indexes. This works very well for me until I got to the point (on my
computer) that I had over 1500 rows that was to be updated. Then,
because of the latency-problem the row deleted was "not deleted"
before the update-statement triggered, making my application crash.

Can't answer your question directly since I've never had this problem - VB
normally executes sql commands synchronously through DAO or ADO. Perhaps if
you post the exact code you're using.

A couple of other points though; are you talking about the actual table
(system) indexes? If yes then why are you doing this? Re-indexing constantly
is probably not a good idea. If you're talking about a column named 'Index'
instead then it sounds like you have a design normalization issue. Post your
table structure with some sample data and show us exactly what you are
trying to accomplish and somebody will be able to help.


Nov 13 '05 #2
to****@engebu.com (Tormod Engebu) wrote in message news:<9e**************************@posting.google. com>...
I'm currently using Jet for an Visual Basic Access application.

The application is supposed to delete a row in a table, and afterwards
update indexes on the remaining rows in that table, by giving them new
indexes. This works very well for me until I got to the point (on my
computer) that I had over 1500 rows that was to be updated. Then,
because of the latency-problem the row deleted was "not deleted"
before the update-statement triggered, making my application crash.

On my computer the "limit" of rows before this occures was 1500, but
on my clients computer the limit case just after 50-60 rows.

Any suggestions to make this delete-statement final before the update
kicks in? Is it possible to "commit" changes somehow, forcing the
delete to be done?
Is there any other way of connecting to an Access DB that will make
the latency go away (or at least trigger at a higher level..) I need
to be able to delete a row, and immidiately update about 2000 rows to
be on the safe side here.

And no, SQL Server or MySQL or any other database (except filesystem
stuff) is not an option.

Anyone?


If I understand you correctly, you need something like (from this NG
and Northwind.mdb):

Set MyDB = CurrentDb
DoCmd.SetWarnings False
strSQL = "DELETE * FROM tblQuotes WHERE [QuoteID] = " & Me!QuoteID &
";"
MyDB.Execute strSQL, dbFailOnError
DoCmd.SetWarnings True
Do While MyDB.RecordsAffected < 1
DoEvents
Loop
Set MyDB = Nothing

Make sure your table has at least one record to be affected by the
query before using this technique or the loop won't exit. Update
queries can also use this technique.

James A. Fortune

Petition for redress of grievances was a remedy during the early years
of the U.S. to prevent, among other things, "tyranny of the majority."
Nov 13 '05 #3
Thank you!
Will try your sugegstion for now, and maybe rewrite the code for the
next version to not use Access.

t.
Nov 13 '05 #4
ja******@oakland.edu (James Fortune) wrote:
DoCmd.SetWarnings False
strSQL = "DELETE * FROM tblQuotes WHERE [QuoteID] = " & Me!QuoteID &
";"
MyDB.Execute strSQL, dbFailOnError
DoCmd.SetWarnings True


You don't need to do Setwarnings with db.execute. If you do put them in you must
also put the DoCmd.SetWarnings True line in the error handling section.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #5
Tony Toews <tt****@telusplanet.net> wrote in message news:<5q********************************@4ax.com>. ..
ja******@oakland.edu (James Fortune) wrote:
DoCmd.SetWarnings False
strSQL = "DELETE * FROM tblQuotes WHERE [QuoteID] = " & Me!QuoteID &
";"
MyDB.Execute strSQL, dbFailOnError
DoCmd.SetWarnings True


You don't need to do Setwarnings with db.execute. If you do put them in you must
also put the DoCmd.SetWarnings True line in the error handling section.

Tony


Thanks for the information Tony. The MyDB.Execute strSQL replaced
what was formerly a DoCmd.RunSQL that took too long to complete. I
didn't realize that the db.execute wouldn't pop up a warning.

James A. Fortune

Until somewhat recently people were allowed to spell English words any
way they wanted. - From info at the New England Historic Genealogical
Society
Nov 13 '05 #6
Stil R.
"James Fortune" <ja******@oakland.edu> wrote:
Until somewhat recently people were allowed to spell English words any
way they wanted. - From info at the New England Historic Genealogical
Society

Nov 13 '05 #7
"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in message news:<3p********************@comcast.com>...
Stil R.


Gud. (Without any orthographical connotation consequences.)

James A. Fortune
Nov 13 '05 #8

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

Similar topics

0
by: Dave | last post by:
Hi I have tried to use PathPing, Ping etc to determine the rate of transfer of data between my machine and the database server. However I know that the transfer rate is slower due to the time it...
0
by: d | last post by:
Hi, I have setup a GigE LAN with 1 mysql server and another having the mysql client. the OS is slackware 10.1. the mysql is compiled from source and is ver 4.1.9. How do I measure throughput...
2
by: Petr Votocek | last post by:
Hello, I would like to measure latency of webservice... I call the method and the time is difference between start and end value of Enviroment.Tickcount. Is it right progress??? Do you have any...
3
by: walker_alone | last post by:
I'm develop a realtime voice record and playback on pc soundcard, I use OSS API to implement it, but have latency about 1 seconds, this was to long for voice, how can I reduce the latency? I reduce...
2
by: Wayne M J | last post by:
I am capturing syslogd traffic from a firewall/router, if I display the results to Console it runs fine and dandy, but the minute I need it to go to a ListBox, DataGrid or even a text box problems...
8
by: Darko | last post by:
Hi, I have a problem that seems to be related to DOM latency in executing instructions. How I see the situation, if one line of code produces a lot of inner instructions, then the engine is...
3
by: Jeff Jarrell | last post by:
I'd like to create a service-locator\proxy type service that I can use to simulate low bandwith situations and latency issues on the service under test. The request comes from the client, is...
1
nguyenthao
by: nguyenthao | last post by:
Could you please tell me what the factors that determine the network latency are? And what exactly is the measurement of bandwidth. Some say Hertz, others say (giga/mega/kilo...)bit/s. And, in...
4
by: 73k5blazer | last post by:
Hello again all.. We have a giant application from a giant software vendor that has very poor SQL. It's a PLM CAD application, that makes a call to the db for every cad node in the assembly. So...
1
by: aalimbl | last post by:
I want to ask one thing that either wireless medium has high latency or wired medium. Please compare latency (propgation delay) between Fiber and Wireless (WiFi or WimAx) Thanks
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?
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
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...
0
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,...
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.