Quote
Kev1n (ke...@aol.com) wrote:
: I described the original problem. This is a reply to a reply. - Kevin
: In article <4q665a$1...@www.univie.ac.at>, atroe...@nelly.mat.univie.ac.at
Quote
: (Andreas Troester) writes:
: >Subject: Re: D2: EDBEngineError: 'Record/key deleted'
: >From: atroe...@nelly.mat.univie.ac.at (Andreas Troester)
: >Date: 18 Jun 1996 12:07:06 GMT
: >
Quote
: >Kev1n (ke...@aol.com) wrote:
: >: Help!
: >
: >: I'm using D2 to access an MS SQL 6.5 server via SQL links. I've used
: D1
: >: for plenty of prior projects, but this is my first crack at a database
: app
: >: and I'm getting an error that might be a piece of cake for an
: experienced
: >: Delphi DB programmer (I grovel in your omnipotent presence), but it's
: >: kicking the hell out of me.
: (* SNIP - see the earlier posts *)
: >: Thanks in advance.
: >
: >: - Kevin Pierce
: >
: >I had the same problem using Interbase. The only advice can give is to
: >keep away from mechanisms that modify records other than triggers. I
: spent
: >hours with the above error inserting records into an Interbase table from
: a
: >Delphi app. As soon as I removed all "default" directives in the defining
: >sql-file, the problem was gone. Nevertheless, I would love to hear that
: >somebody else has solved the problem.
: >Regards,
: >
: >Andy
: Andy:
: That is one way to handle it, but as I see it, it is the job of the server
: to enforce the rules that I have set up, like autoincrementing certain
: fields, or date/time stamping others. That's what separates it from being
: just a big hard-drive. I mean, if I want to do everything myself I'd use
: Btrieve or Paradox files. The idea of having a database server is that I
: can tell it to do things on its own. I can assign it certain tasks, and I
: KNOW that they will get done, as opposed to placing the burden of
: enforcing these rules on the application developer.
: This database will have many different applications accessing it,
: performing both reads and writes. Many different programs (running on
: different hardware platforms) will be performing uploads of data into it.
: I need the SQL server, not the apps, to bear the responsibility of
: numbering, date/time, and user-name stamping the records as they are
: inserted.
: By the way, the above behaviors are just the tip of the iceberg. I intend
: to use all the bells and whistles, especially the referential integrity
: features. I mean, Microsoft is selling the hell out of it (they've got
: some of my bucks), and they claim to have all these great features. You
: don't buy a fast car to drive in the slow lane.
: - Kevin
Hi Kevin!
I fully agree with you. I just wanted to report my particular "solution" to
you - of course, the advice not to make use of an important feature of a
server (like DEFAULT directives) can hardly be considered a solution.
THe same applies (in my opinion) to other ideas like ignoring the exception
or closing and opening the dataset.
Also wanted to emphasize that there are problems similar to yours using
Interbase (look at the other articles in this thread) instead of MS
SQL-Server. Therefore one is led to think that this is a general problem of
Delphi (or the BDE) interacting with database servers. I have mailed a
similar report to Steve Koterski half a year ago, but somehow he was unable
to reproduce the error (unfortunately it seems that he doesn't follow this
newsgroup anymore - ?).
What I do not fully understand is the following:
*********************************************************************
What is the difference between modifying data through BEFORE INSERT
triggers (this obviously works) and DEFAULT directives (this doesn't)?
It seems that DEFAULT directives fire after inserts!
(*********************************************************************
The idea of changing UpdateMode to WhereKeyOnly might be worth considering,
but I havent tried it yet, and I also imagine that there are scenarios where
you do not want to do that.
I am definitely not an expert on the subject, but to me this continues to be
an open problem.
Just a few thoughts from your partner in crime,
Andy