Solved

200 points - Delphi/BDE 5 x Oracle

Posted on 2000-03-08
19
655 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
Comment Utility
hi binho,

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

meikl
0
 
LVL 1

Expert Comment

by:yk030299
Comment Utility
hi, binho
which version of bde are you using?
0
 

Expert Comment

by:johnwa
Comment Utility
Does the error happend both at insert/post and edit/post?
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
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
Comment Utility
binho:
  try to set the TQuery component's UpdateMode to  upWhereKeyOnly to see if it can solve the problem.
0
 

Author Comment

by:binho
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I will grade 100 points to each one...
0
 

Author Comment

by:binho
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now