Solved

200 points - Delphi/BDE 5 x Oracle

Posted on 2000-03-08
19
669 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 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