473,549 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SP problem with editing records

I have an SP which I use to insert into a table data from another. For
example...

INSERT INTO myWorkTable
(Field1, Field2)

SELECT
myField1, myField2

FROM
myNewTable

It's a pretty straight forward sp. Now, the data that gets inserted
seems to have remained in a state that stops me updating it later. The
SP is called by one app which is then closed and not used again until
the following month. The sp shouldn't be used by anything else.

I have another application which goes to the table (in my example
myWorkTable) and is supposed to open and edit specific records which
it does correctly navigate to (a few days after the sp). It fails and
I get an error message stating that the record is being edited by
another user. This record should not be opened by any other process.

If I export the data and re-import it into the table, it works
perfectly fine.

The code used to edit the table is fine and has worked for a couple of
years and I'm happy with it. The only change I have made is to use an
SP to import the data instead of an old method using Access 2000. The
functionality is the same, even though the connection is different.
The Delphi app uses BDE.

Inserting directly through SQL works as I would have expected and I
can edit the record as I need.

I'm guessing that Delphi (which I use for the app) is somehow not
freeing up the data locked by the SP when it finished calling the SP,
even when it is closed. However, it seems a little bizarre as I would
expect it to free up the data affected by the SP once it has finished
(maybe this is the wrong assumption).

So, my question is, can an SP lock records in this way ? If so,
how/why and can I stop this once finished, or is there a way of
checking / resetting records which were locked up and should no longer
be this way. I can't see anything obvious which shows the records are
locked, but am willing to delve further.

Thanks

Ryan
Jul 20 '05 #1
2 1220
Ryan (ry********@hot mail.com) writes:
I have an SP which I use to insert into a table data from another. For
example...

INSERT INTO myWorkTable
(Field1, Field2)

SELECT
myField1, myField2

FROM
myNewTable

It's a pretty straight forward sp. Now, the data that gets inserted
seems to have remained in a state that stops me updating it later. The
SP is called by one app which is then closed and not used again until
the following month. The sp shouldn't be used by anything else.

I have another application which goes to the table (in my example
myWorkTable) and is supposed to open and edit specific records which
it does correctly navigate to (a few days after the sp). It fails and
I get an error message stating that the record is being edited by
another user. This record should not be opened by any other process.


I would use the Profiler to see what is actually being submitted by that
application. It sounds to me that this is an issue with optimistic
locking. It wasn't clear to me, though, whether you got the message
when you were trying to save the row, or already when you were trying
to read it.

--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
I was just trying to edit the row. I hadn't got to saving the data as
yet. I don't think there will be much problem with reading it.

I would use the Profiler to see what is actually being submitted by that
application. It sounds to me that this is an issue with optimistic
locking. It wasn't clear to me, though, whether you got the message
when you were trying to save the row, or already when you were trying
to read it.

Jul 20 '05 #3

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

Similar topics

4
2389
by: Dan Weeb | last post by:
Hi All, I have struggled through this far with help from many of you so thanks. I am stuck again. I am really new to this so don't be harsh :-) There are a few problems. You can run the script here http://www.pbrown.com/research/test1.php to see the formatting issues Formatting Issues
7
4068
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
7
2228
by: Dave Elliott | last post by:
I have a db that is split and shared on the network. I gave the user a custom menu to use. We both use the same tables of course. On my PC I can create new records using their menu on my PC, on there PC they cant, WHY ??? All users have admin rights and folders are shared with editing allowed. Any Suggestions ?
3
1491
by: Oren | last post by:
Hi, I've posted this message over at the ms-sql newsgroup – no luck. Maybe some one here could help. I have an Access application with linked tables via ODBC to MSSQL Server 2000. Having a weird problem, probably something I've done while not being aware of (kinda newbie).
2
1974
by: Mike MacSween | last post by:
I've been able, intermittently, to duplicate a problem a client had. Two users editing the same field of the same record. One saves. The other gets the 'another user has edited this record... do you want to save cancel clipboard' message when they attempt to save If I click Save (or is it overwrite), I get an error. 'Record could not be...
5
3317
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example I'm adding a customer. The Customer fields are mostly foreign keys that refer to primary keys in other tables, left join instead of junction tables...
24
2755
by: Bob Alston | last post by:
Most of my Access database implementations have been fairly small in terms of data volume and number of concurrent users. So far I haven't had performance issues to worry about. <knock on wood> But I am curious about what techniques those of you who have done higher volume access implementations use to ensure high performance of the...
1
1359
by: panwala_bhavesh | last post by:
Thanks for any help - I have a form to enter records. It works fine. It is crowded with over 30 fields. It has as its datasource a table (maybe it should be a query of that table?). What I want to do is to take this form, copy it, and turn it into a form for editing those records. I would like to take my keyfield textbox for the record number...
0
2130
by: LiamLiamLiam | last post by:
G'day all. I having a problem with my formview. I'll ty to explain my situation as best as i can. I have a page with a search field at the top which is just a simple asp:textbox. Below that i have a gridview which displays the results of the search. if no search is entered, then the gridview shows all records. Below the gridview i have a...
0
7480
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...
1
7511
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...
0
7840
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...
1
5396
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...
0
5119
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...
0
3509
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1973
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
1
1087
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
793
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...

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.