HP3000-L Archives

June 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bob Walker <[log in to unmask]>
Reply To:
Date:
Wed, 24 Jun 1998 15:00:30 PST8PDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
From:                     Melvin R Rees <[log in to unmask]>

> I have figured out the problem with the ODBC not openning properly and
> have found my UPDATE problem was not corrected. In case anyone is
> interested here is what I found out.
>
> If you try to change an item on the Allbase database that is NULL,
> Delphi will tell you that someone else already has changed that record
> and refuse to touch it.  The log file in ODBCSE indicates this:

Sounds suspiciously like a problem I had with PowerBuilder.
You may be able to extrapolate to Delphi.
I was using Image/SQL. Sounds like your using ALLBASE.
This description may still be useful.

When inserting from PowerBuilder to ImageSQL, sometimes a  NULL
value would be placed into an Image text field(that is, a binary
zero would be written into the first character of the text field
rather than the whole field just being blank).

Subsequent updates to these records would fail with error like:
'Record changed between read and update'.

What was happening was Image/SQL(or Allbase or ODBC) was
translating the NULL in Image to a blank when the record was read.
This blank value was being used in the update phrase which failed
because the value was actually NULL, thinking it had
changed from blank to NULL since the record had been read.
Confusing? Yes.

I seem to recall the problem may have been caused by an incomplete
original INSERT statement.  ie INSERT into DATABASE.TABLE
(column1,column3) VALUES ('Col 1 Value','Col 3 Value');
But what about Column 2? is it a NULL or a blank in this case?

Hope this helps.
Bob.




--=--=--
Bob Walker, Computer Centre  --  [log in to unmask]
Capilano College, North Vancouver, BC, CANADA.
------

ATOM RSS1 RSS2