Link to home
Start Free TrialLog in
Avatar of binho
binho

asked on

200 points - Delphi/BDE 5 x Oracle

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?
Avatar of kretzschmar
kretzschmar
Flag of Germany image

hi binho,

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

meikl
Avatar of yk030299
yk030299

hi, binho
which version of bde are you using?
Does the error happend both at insert/post and edit/post?
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
Avatar of binho

ASKER

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
Avatar of binho

ASKER

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...
Avatar of binho

ASKER

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...

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
Avatar of binho

ASKER

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?
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
ASKER CERTIFIED SOLUTION
Avatar of johnwa
johnwa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of binho

ASKER

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.
Avatar of binho

ASKER

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
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
Avatar of binho

ASKER

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.
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
https://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
Avatar of binho

ASKER

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?
Avatar of binho

ASKER

I will grade 100 points to each one...
Avatar of binho

ASKER

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...