Board index » delphi » BDE error, 'Capability not supported'

BDE error, 'Capability not supported'

I read somewhere that ROWID wasn't being supported the same in Oracle 8
anymore but I can't remember where I read it. However, I'm not sure why
your update SQL is so complicated. Seems like pumping 50+ parameters
into an update statement is just a little overkill. Isnt' that table
indexed (i.e. isn't order_nbr or order_nbr + customer_nbr enough to
define a unique row? IMHO, it's a good idea to not use ROWID in sql
logic (except maybe in stored procs). Secondly if you do use ROWID in an
update statement, seems like the rest of the parameters are redundant.
Quote
Steve Milinovich wrote:
>  Any ideas, suggestions, or help would be greatly appreciated...
> This is happening with a Delphi 4 application:

> On the post of an update of a TQuery,  I receive the following BDE
> error:   EDBEngineError:  'Capability not supported'.
> I am running an Oracle 8 database and am running BDE 5.01 with Oracle
> 8 drivers (DLL32: SQLORA8.DLL and VENDOR INIT: OCI.DLL).

> Details:
> 1) On an insert of a record, the post performs successfully.
> 2) If we go back and try to update that same record, POST gives this
> 'Capability not Supported' error.  I have included the update
> statement below.
> 3) Running this insert and update using Oracle 7.3 drivers, the insert
> and update is successfully executed.
> 4) The update statement is checking where ROWID = :54

> Well, in SQLMONITOR the ROWID is set in the following line:

> 18:05:19  SQL Data In: ORACLE - Param = 54, Name = ROWID, Type =
> fldZSTRING,
> Precision = 18, Scale = 0, Data = AAAB6+AAYAAACnOAAH

> Look at the Data=AAAB6+AAYAAACnOAAH What is that?    I took the
> update(after I
> did the insert), placed the actual data values passed and ran that
> update command
> from an application(TOAD) that runs SQL commands.  I did this to test
> outside of
> the BDE.  The UPDATE FAILED.  However, when I take the ROWID=   off
> the end of the
> update command, the update is successful.

> From what I can tell, the BDE is trying to deal with the update
> below:  Using Oracle 7.3 BDE drivers this update was
> successfully processed; there were no errors.  When I am using Oracle
> 8 BDE
> drivers, the update below does not show up in SQLMONITOR. I am
> assuming that
> this is the same statement that is trying to be processed.   It
> appears to
> me that this update statement gets to the BDE and the BDE does not
> like it.

> SQL Execute: ORACLE - UPDATE "ORDERS" SET "UPDATE_DATE"=:1 WHERE
> "ORDER_NBR"=:2 AND "CUSTOMER_NBR"=:3 AND "ORIG_ORDER_NBR" IS NULL  AND

> "ACCESS_DATE"=:4 AND "ADMIN_LATE_CHARGE"=:5 AND "ACTIVATION_DATE" IS
> NULL
> AND "BILL_CUSTOMER_NBR"=:6 AND "BILL_ADDRESS_1"=:7 AND
> "BILL_ADDRESS_2" IS
> NULL  AND "BILL_ADDRESS_3" IS NULL  AND "BILL_CITY"=:8 AND
> "BILL_STATE"=:9
> AND "BILL_COUNTRY"=:10 AND "BILL_ZIP"=:11 AND "BILL_ZIP_PLUS_4"=:12
> AND
> "CALL_RCVR"=:13 AND "CARRIER"=:14 AND "CARRIER_ACCOUNT_NBR" IS NULL
> AND
> "COMPLETED_DATE" IS NULL  AND "CUSTOMER_REFERENCE" IS NULL  AND
> "DIGITAL_IND"=:15 AND "DISCOUNT"=:16 AND "DIVISION_RCVD_DATE"=:17 AND
> "ENTRY_DATE"=:18 AND "EXPIRATION_DATE" IS NULL  AND
> "FISCAL_REVIEW_DATE" IS
> NULL  AND "FISCAL_REVIEWER" IS NULL  AND "FOREIGN_SHIP_CHARGE"=:19 AND

> "HANDLING_CHARGE"=:20 AND "INTEREST_CHARGE"=:21 AND
> "INTERNAL_REMARK_ID"=:22
> AND "INVOICE_SHIP_DATE" IS NULL  AND "MAIL_CHARGE"=:23 AND
> "MARKETING_CODE"
> IS NULL  AND "OLD_CARRIER_IND"=:24 AND "OLD_RUSH_IND"=:25 AND
> "ORDER_STATUS"=:26 AND "ORDER_PRICE"=:27 AND "ORDER_TYPE"=:28 AND
> "PACKING_SLIP_IND"=:29 AND "PENALTY_CHARGE"=:30 AND "PRICE_CATEgory"
> IS
> NULL  AND "PROJECT"=:31 AND "RCVD_DATE"=:32 AND "REDO_IND"=:33 AND
> "REMARK_ID"=:34 AND "REQUEST_ORIGIN"=:35 AND "RUSH_IND"=:36 AND
> "RUSH_CHARGE"=:37 AND "SHIP_ADDRESS_1"=:38 AND "SHIP_ADDRESS_2" IS
> NULL  AND
> "SHIP_ADDRESS_3" IS NULL  AND "SHIP_FOREIGN_IND"=:39 AND
> "SHIP_FIRSTNAME"=:40 AND "SHIP_MIDDLE_INITIAL"=:41 AND
> "SHIP_LASTNAME"=:42
> AND "SHIP_ORGANIZATION"=:43 AND "SHIP_CITY"=:44 AND "SHIP_STATE"=:45
> AND
> "SHIP_ZIP"=:46 AND "SHIP_ZIP_PLUS_4"=:47 AND "SHIP_COUNTRY"=:48 AND
> "SHIP_EMAIL"=:49 AND "SHIP_FAX" IS NULL  AND "SHIP_PHONE" IS NULL  AND

> "USER_OVERRIDE_IND"=:50 AND "WAIVER_CHARGE"=:51 AND "WORK_ORDER_DATE"
> IS
> NULL  AND "WORK_ORDER_TIME" IS NULL  AND "UPDATE_DATE"=:52 AND
> "UPDATER"=:53
> AND "ROWID"=:54

 

Re:BDE error, 'Capability not supported'


That query was probably written by a non-optimizing (stupid) query
builder, rather than a programmer, and it's probably residing in the ups
(tupdatesql) object in the DFM file. If so, you can modify it there.
Unless manually overriden in OnUpdateRecord, it gets executed on
query.apply.

I'm not sure I follow your question about 'how to look at' the query,
but basically the database should be tracking what elements comprise the
primary key (if'ts it order_nbr by itself then

 UPDATE "ORDERS" SET "UPDATE_DATE"=:1 WHERE
"ORDER_NBR"=:2

if it's order_nbr = customer_nbr then

UPDATE "ORDERS" SET "UPDATE_DATE"=:1 WHERE
"ORDER_NBR"=:2 AND "CUSTOMER_NBR"=:3

then just remove all the unnecessary parameter settings (i.e.
parambyname or whatever)

Quote
Steve Milinovich wrote:
>  Yes.  I heard that ROWID was changed in Oracle 8 and we had some
> issues in regards to that when we were using BDE Oracle 7.3 drivers.
> I updated to BDE Oracle 8 drivers and those errors went away.  Now I
> am getting the problem as I described below.

> FYI - This is a system that we took over and this is the way it was
> being done.  I agree: there is no reason that the WHERE clause should
> need all of that, but it still doesn't explain what is going on.  I
> don't know why that WHERE clause is happening like that.  It doesn't
> appear to be something that was coded, but I could be wrong.  Do you
> have any ideas on how to look at taking that out except for the
> ORDER_NBR or ROWID, because either of these would make it unique?

> Thanks for the response.

> Rick Robeson wrote:

>> I read somewhere that ROWID wasn't being supported the same in
>> Oracle 8
>> anymore but I can't remember where I read it. However, I'm not sure
>> why
>> your update SQL is so complicated. Seems like pumping 50+ parameters

>> into an update statement is just a little overkill. Isnt' that table

>> indexed (i.e. isn't order_nbr or order_nbr + customer_nbr enough to
>> define a unique row? IMHO, it's a good idea to not use ROWID in sql
>> logic (except maybe in stored procs). Secondly if you do use ROWID
>> in an
>> update statement, seems like the rest of the parameters are
>> redundant.

>> Steve Milinovich wrote:

>> >  Any ideas, suggestions, or help would be greatly appreciated...
>> > This is happening with a Delphi 4 application:

>> > On the post of an update of a TQuery,  I receive the following BDE

>> > error:   EDBEngineError:  'Capability not supported'.
>> > I am running an Oracle 8 database and am running BDE 5.01 with
>> Oracle
>> > 8 drivers (DLL32: SQLORA8.DLL and VENDOR INIT: OCI.DLL).

>> > Details:
>> > 1) On an insert of a record, the post performs successfully.
>> > 2) If we go back and try to update that same record, POST gives
>> this
>> > 'Capability not Supported' error.  I have included the update
>> > statement below.
>> > 3) Running this insert and update using Oracle 7.3 drivers, the
>> insert
>> > and update is successfully executed.
>> > 4) The update statement is checking where ROWID = :54

>> > Well, in SQLMONITOR the ROWID is set in the following line:

>> > 18:05:19  SQL Data In: ORACLE - Param = 54, Name = ROWID, Type =
>> > fldZSTRING,
>> > Precision = 18, Scale = 0, Data = AAAB6+AAYAAACnOAAH

>> > Look at the Data=AAAB6+AAYAAACnOAAH What is that?    I took the
>> > update(after I
>> > did the insert), placed the actual data values passed and ran that

>> > update command
>> > from an application(TOAD) that runs SQL commands.  I did this to
>> test
>> > outside of
>> > the BDE.  The UPDATE FAILED.  However, when I take the ROWID=
>> off
>> > the end of the
>> > update command, the update is successful.

>> > From what I can tell, the BDE is trying to deal with the update
>> > below:  Using Oracle 7.3 BDE drivers this update was
>> > successfully processed; there were no errors.  When I am using
>> Oracle
>> > 8 BDE
>> > drivers, the update below does not show up in SQLMONITOR. I am
>> > assuming that
>> > this is the same statement that is trying to be processed.   It
>> > appears to
>> > me that this update statement gets to the BDE and the BDE does not

>> > like it.

>> > SQL Execute: ORACLE - UPDATE "ORDERS" SET "UPDATE_DATE"=:1 WHERE
>> > "ORDER_NBR"=:2 AND "CUSTOMER_NBR"=:3 AND "ORIG_ORDER_NBR" IS NULL
>> AND

>> > "ACCESS_DATE"=:4 AND "ADMIN_LATE_CHARGE"=:5 AND "ACTIVATION_DATE"
>> IS
>> > NULL
>> > AND "BILL_CUSTOMER_NBR"=:6 AND "BILL_ADDRESS_1"=:7 AND
>> > "BILL_ADDRESS_2" IS
>> > NULL  AND "BILL_ADDRESS_3" IS NULL  AND "BILL_CITY"=:8 AND
>> > "BILL_STATE"=:9
>> > AND "BILL_COUNTRY"=:10 AND "BILL_ZIP"=:11 AND
>> "BILL_ZIP_PLUS_4"=:12
>> > AND
>> > "CALL_RCVR"=:13 AND "CARRIER"=:14 AND "CARRIER_ACCOUNT_NBR" IS
>> NULL
>> > AND
>> > "COMPLETED_DATE" IS NULL  AND "CUSTOMER_REFERENCE" IS NULL  AND
>> > "DIGITAL_IND"=:15 AND "DISCOUNT"=:16 AND "DIVISION_RCVD_DATE"=:17
>> AND
>> > "ENTRY_DATE"=:18 AND "EXPIRATION_DATE" IS NULL  AND
>> > "FISCAL_REVIEW_DATE" IS
>> > NULL  AND "FISCAL_REVIEWER" IS NULL  AND "FOREIGN_SHIP_CHARGE"=:19
>> AND

>> > "HANDLING_CHARGE"=:20 AND "INTEREST_CHARGE"=:21 AND
>> > "INTERNAL_REMARK_ID"=:22
>> > AND "INVOICE_SHIP_DATE" IS NULL  AND "MAIL_CHARGE"=:23 AND
>> > "MARKETING_CODE"
>> > IS NULL  AND "OLD_CARRIER_IND"=:24 AND "OLD_RUSH_IND"=:25 AND
>> > "ORDER_STATUS"=:26 AND "ORDER_PRICE"=:27 AND "ORDER_TYPE"=:28 AND
>> > "PACKING_SLIP_IND"=:29 AND "PENALTY_CHARGE"=:30 AND
>> "PRICE_CATEgory"
>> > IS
>> > NULL  AND "PROJECT"=:31 AND "RCVD_DATE"=:32 AND "REDO_IND"=:33 AND

>> > "REMARK_ID"=:34 AND "REQUEST_ORIGIN"=:35 AND "RUSH_IND"=:36 AND
>> > "RUSH_CHARGE"=:37 AND "SHIP_ADDRESS_1"=:38 AND "SHIP_ADDRESS_2" IS

>> > NULL  AND
>> > "SHIP_ADDRESS_3" IS NULL  AND "SHIP_FOREIGN_IND"=:39 AND
>> > "SHIP_FIRSTNAME"=:40 AND "SHIP_MIDDLE_INITIAL"=:41 AND
>> > "SHIP_LASTNAME"=:42
>> > AND "SHIP_ORGANIZATION"=:43 AND "SHIP_CITY"=:44 AND
>> "SHIP_STATE"=:45
>> > AND
>> > "SHIP_ZIP"=:46 AND "SHIP_ZIP_PLUS_4"=:47 AND "SHIP_COUNTRY"=:48
>> AND
>> > "SHIP_EMAIL"=:49 AND "SHIP_FAX" IS NULL  AND "SHIP_PHONE" IS NULL
>> AND

>> > "USER_OVERRIDE_IND"=:50 AND "WAIVER_CHARGE"=:51 AND
>> "WORK_ORDER_DATE"
>> > IS
>> > NULL  AND "WORK_ORDER_TIME" IS NULL  AND "UPDATE_DATE"=:52 AND
>> > "UPDATER"=:53
>> > AND "ROWID"=:54

Other Threads