473,386 Members | 1,720 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,386 software developers and data experts.

Problem with SP during F&R

I'm using Access 2000 with a SQL 7 back end. I recently implemented some
code in a form's AfterUpdate event which calls a stored procedure which
copies the contents of the current record to a history table. The code works
fine when the user edits and saves the record. However, if the user performs
a Find and Replace, the code hangs.

At first I thought the code was hanging because of multiple records being
replaced. But when I debugged it, I found that it was hanging on the first
record being replaced by the Find and Replace. And whereas the code to copy
the data to the history table only takes about a second normally to execute,
when called during the Find and Replace, it times out with a 60 second
timeout limit.

The stored procedure copies the data entirely in the back end. So it's not
as though Access is trying to do two things at once. But, apparently, the
Find and Replace has a lock on the record, preventing the stored procedure
from executing even a copy on the record.

So, I need to find a workaround. Here are some possibilities.

1) Find a solution to this situation, allowing the stored procedure to copy
the record to the history table during the Find and Replace (not really
expecting to be able to do that).

2) Disable Find and Replace on the form (can't really do that since the
users need Find; and if they can access the Find dialog box, then they can
access Replace, since the two are combined).

3) Add something to code to not call the stored procedure when the
AfterUpdate event is triggered by Find and Replace.

4) Other.

Any ideas/suggestions appreciated.

Thanks,

Neil
Mar 3 '08 #1
2 1567
On Mon, 03 Mar 2008 12:30:38 GMT, "Neil" <no****@nospam.netwrote:

Copying to a history table is something you always want to have
happen, even if your VBA code doesn't run, so implement this in an
update trigger in Sql Server.

-Tom.

>I'm using Access 2000 with a SQL 7 back end. I recently implemented some
code in a form's AfterUpdate event which calls a stored procedure which
copies the contents of the current record to a history table. The code works
fine when the user edits and saves the record. However, if the user performs
a Find and Replace, the code hangs.

At first I thought the code was hanging because of multiple records being
replaced. But when I debugged it, I found that it was hanging on the first
record being replaced by the Find and Replace. And whereas the code to copy
the data to the history table only takes about a second normally to execute,
when called during the Find and Replace, it times out with a 60 second
timeout limit.

The stored procedure copies the data entirely in the back end. So it's not
as though Access is trying to do two things at once. But, apparently, the
Find and Replace has a lock on the record, preventing the stored procedure
from executing even a copy on the record.

So, I need to find a workaround. Here are some possibilities.

1) Find a solution to this situation, allowing the stored procedure to copy
the record to the history table during the Find and Replace (not really
expecting to be able to do that).

2) Disable Find and Replace on the form (can't really do that since the
users need Find; and if they can access the Find dialog box, then they can
access Replace, since the two are combined).

3) Add something to code to not call the stored procedure when the
AfterUpdate event is triggered by Find and Replace.

4) Other.

Any ideas/suggestions appreciated.

Thanks,

Neil
Mar 3 '08 #2
That solved it. Thanks, Tom. Strange though: you'd think that, since the
copying was done in the back end through a stored procedure, that it
wouldn't matter if it was called from the AfterUpdate event, since Access
wasn't doing any copying anyway. Oh well. Like you said, it's a better
solution this way anyway. Thanks again.

Neil
"Tom van Stiphout" <no*************@cox.netwrote in message
news:a5********************************@4ax.com...
On Mon, 03 Mar 2008 12:30:38 GMT, "Neil" <no****@nospam.netwrote:

Copying to a history table is something you always want to have
happen, even if your VBA code doesn't run, so implement this in an
update trigger in Sql Server.

-Tom.

>>I'm using Access 2000 with a SQL 7 back end. I recently implemented some
code in a form's AfterUpdate event which calls a stored procedure which
copies the contents of the current record to a history table. The code
works
fine when the user edits and saves the record. However, if the user
performs
a Find and Replace, the code hangs.

At first I thought the code was hanging because of multiple records being
replaced. But when I debugged it, I found that it was hanging on the first
record being replaced by the Find and Replace. And whereas the code to
copy
the data to the history table only takes about a second normally to
execute,
when called during the Find and Replace, it times out with a 60 second
timeout limit.

The stored procedure copies the data entirely in the back end. So it's not
as though Access is trying to do two things at once. But, apparently, the
Find and Replace has a lock on the record, preventing the stored procedure
from executing even a copy on the record.

So, I need to find a workaround. Here are some possibilities.

1) Find a solution to this situation, allowing the stored procedure to
copy
the record to the history table during the Find and Replace (not really
expecting to be able to do that).

2) Disable Find and Replace on the form (can't really do that since the
users need Find; and if they can access the Find dialog box, then they can
access Replace, since the two are combined).

3) Add something to code to not call the stored procedure when the
AfterUpdate event is triggered by Find and Replace.

4) Other.

Any ideas/suggestions appreciated.

Thanks,

Neil

Mar 4 '08 #3

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

Similar topics

0
by: Michael | last post by:
Hi, thank you for taking your previous time to read the following problem that I face. I'm trying to create multiple child process and TESTCODE 1 work fine, however if I try to connect to MYSQL...
0
by: Anup Jishnu | last post by:
Hi, I have installed ASP.Net application on a system. When accessing the Application from within the LAN, it works fine. However, when I access the application from the Internet, some pages...
4
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
0
by: Chris McDonough | last post by:
ElementTree's XML serialization routine implied by tree._write(file, node, encoding, namespaces looks like this (elided): def _write(self, file, node, encoding, namespaces): # write XML to file...
13
by: Henry Townsend | last post by:
I hope this is on-topic in c.l.c - it's about the C preprocessor more than the language per se, more generally about the K&R behavior, and most specifically about the Sun cpp which is why I've...
1
by: Kevin R | last post by:
This is one of the weirdest problems I have ever run into. I have had to trim down a bunch of code to give a sample that is more easily readable by those who will view this. Here is the problem:...
2
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.