Solved

200 points - Delphi/BDE 5 x Oracle

Posted on 2000-03-08
19
678 Views
Last Modified: 2010-04-04
I had an application in Delphi2 and Oracle 7.3.4 working just fine until I decided to migrate it to Delphi5. Since that, I get the following message: "Could not perform edit because another user changed the record".
This error happens when I try to do an Edit/Post in a TQuery. Note: the error does NOT happen to ALL records. It seems that some specific records are "locked" in the database. I tried to down the Oracle server and startup it again, but it didn't work (what means the error is in Delphi/BDE). If I try to do the same operation with the Delphi2 appl, everything works fine.
Any idea?
0
Comment
Question by:binho
  • 10
  • 6
  • 2
  • +1
19 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2597871
hi binho,

can you post your bde alias parameters or
tdatabase-paramaters (if used)

meikl
0
 
LVL 1

Expert Comment

by:yk030299
ID: 2599120
hi, binho
which version of bde are you using?
0
 

Expert Comment

by:johnwa
ID: 2599344
Does the error happend both at insert/post and edit/post?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 2599443
hi binho,

that i've found at borland:

FAQ: FAQ4778B - Editing record generates BDE Error 10259 ($2813)
Category: BDE Features
Platform: All Windows
 Product: Delphi4.x,  

Question:

How come when I edit a record with more that 15 digits after the decimal place I get BDE error 10259 ($2813)
"Couldn't perform the edit because another user changed the record."?


Answer:

The BDE has a limit of 15 decimal digits after the decimal place. What is happening to cause this error is that
the BDE refetches the row the before you edit it to make sure it still exists. To do so, it uses the data it
originally fetched. It only fetches up to 15 digits, so the data the BDE has and data on the server don't
match. The server returns that the fetch returned no records which causes the BDE to generate its error.

7/28/99 10:30:24 AM
 

--- only for mssql
 
Question and Answer Database

     FAQ: FAQ4655B - SET NOCOUNT ON causes "Couldn't perform the edit because another user changed the record" error
Category: Database (MSSQL)
Platform: All Windows
 Product: BC++5.x,  
          C++Builder1.0,  
          C++Builder3.x,  
          C++Builder4.x,  
          Delphi2.x,  
          Delphi3.x,  
          Delphi4.x,  
          VdBase7.x,  

Question:

How come after I execute SET NOCOUNT ON on MSSQL server all updates result in the error
"Couldn't perform the edit because another user changed the record"? BDE error 10259.


Answer:

The BDE uses rows effected to determine if an UPDATE is successful. SET NOCOUNT ON tells
MSSQL to return 0 for rows effected for all UPDATE statements and thereby causing all UPDATES
to fail.

7/28/99 9:07:21 AM

may it help you

meikl
0
 

Author Comment

by:binho
ID: 2599943
Hi, yk
BDE version 5.1.1.1. That's supposed to be the lastest version. Actually, I downloaded it last week from Borland.
I was using version 5.1.0.4, so I updated it
0
 

Author Comment

by:binho
ID: 2599951
johnwa:
No, the error happens ONLY when I try to edit some record which already exists in the database (i.e. Edit/Post). It doesn't happen to ALL records, but ALWAYS to some specific records...
0
 

Author Comment

by:binho
ID: 2599986
kretzschmar!
I'll try to change the field from NUMBER to NUMBER(20,5) so I can verify if the error remains, ok?
I hope this fix...

0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2600037
nope,

i guess not that this will solve your problem, because, if you reread the first from borland, then this problem will only happen if you have a number like NUMBER(20,18) -> more that 15 digits after the decimal place.

but sure, do a try

about my first comment:
can you post your bde/Tdatabase-settings, also the settings in the native driver (if used)?

did you also get the latest bde AND the oracle(8)-bugfix -> there was a problem with shared autocommit (the commit occurs only if your app is closed)?

get it from this page:
http://www.borland.com/devsupport/bde/bdeupdate.html

or directly:
http://www.borland.com/devsupport/bde/files/sqlora8.zip

just replace the dll-file in the bde

meikl
0
 

Author Comment

by:binho
ID: 2601634
kretzschmar:
Yes... I have all the patches (Actually I don't even need the oracle8 bugfix, because I use SQLORA32.DLL and ORA73.DLL).
About the Config... can I send you via e-mail the BDE screen?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2601809
yup, you can
send it to
meikl@spektracom.de

nevertheless,
you should replace the fixed dll,
also if this may not solve your problem

meikl
0
 

Accepted Solution

by:
johnwa earned 200 total points
ID: 2603147
binho:
  try to set the TQuery component's UpdateMode to  upWhereKeyOnly to see if it can solve the problem.
0
 

Author Comment

by:binho
ID: 2604088
johnwa:
There's no Key defined on the table... so I believe the option wouldn't work...
I tried setting the property to upWhereChanged, and it didn't work either.

I'm doing some tests to try to find out what's going on and why this error doesn't happen to ALL records.
0
 

Author Comment

by:binho
ID: 2604576
meikl and johnwa:
I've done all the possible changes...
No results. If you have new ideas, please send them.
I have 2 hospitals running this application, so you can imagine HOW bad the problem has become.
Hope you can help...
Inprise support here in Brazil didn't give me any return yet.

Thanks in advance
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2605516
hi binho,

have checked your screens, and they are ok.
therefore i've no further idea.

i do much programming with oracle and
had never such an error-message.

well, i've read that you've no key on your table,
maybe that will be the problem.
(in my apps all tables have a primary unique keys,mostly sequence-numbers,
and indexes on all relevant fields, where are wanted to search for,
increases the performance)

maybe, if possible, you can create a PK on a field,
which is unique at your datas.

also you can try a comercial bde replacement
take a look and get the trial from
http://www.allroundautomations.nl/doa.html

but i guess that will cause in a bit work at your code

meikl
0
 

Author Comment

by:binho
ID: 2605764
Meikl and johnwa:
Here are some (good) news: I added a field in my table and set it to PK. It didn't work. Then I set UpdateMode to upWhereKeyOnly... guess what? IT WORKED!!! Anyway, I still don't understand WHY this error doesn't happen on Delphi2.
If I decide to make these 2 changes, how can I set (grade) the points to BOTH of you? I mean because both anwers are not completely right, but together they are right...
Before that, I'll still try to find out WHY this error happens only in Delphi5...

Thanks in advance.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2606207
yup,
that are good news,
about the points,
you can post a dummy q for us both,
with the points you want to give.
then ask in the community support
http://www.experts-exchange.com/Customer_Service/Experts_Exchange/
with a zero point q about to keep this q
into there database by answering this q
and refunding your points for this q.

glad thats now working
meikl
0
 

Author Comment

by:binho
ID: 2641333
I still didn't get any news from Inprise. As soon as I get, I will post some news, ok?
By the way: meikl and johnwa... how should I grade? 100 points to each one?
0
 

Author Comment

by:binho
ID: 2652692
I will grade 100 points to each one...
0
 

Author Comment

by:binho
ID: 2652728
this fixed the problem, but I'm still looking for the best solution. I've noticed that, if I change the fields type from NUMBER to NUMBER(12,2), the error does NOT happen anymore.
So, there are 2 solutions right now...
Anyway...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question