T.R | Title | User | Personal Name | Date | Lines |
---|
4992.1 | | NOVA::SMITHI | Don't understate or underestimate Rdb! | Mon Feb 03 1997 11:43 | 10 |
| ~Is there any way to get number of rows effected by an update/delete type
~statement? Neither of the SQLCA/SQLDA data structures carry this information.
The SQLCA will have this information once the statement executes. Please read
the SQLCA appendix in the SQL Reference Manual (SQLERRD).
Naturally the SQLDA would not have this information as it describes the data
passed to and from a statement.
Ian
|
4992.2 | | svrav1.au.oracle.com::MBRADLEY | I was dropped on my head as a baby. What's your excuse? | Mon Feb 03 1997 17:51 | 5 |
| Or you can use GET DIAGNOSTIC in an MSP.
G'day,
Mark.
|
4992.3 | Still having problems with C and SQL | ORAREP::ALLVAX::ONEILL | | Tue Feb 11 1997 11:43 | 49 |
|
PROBLEM:
Have a "C" program to execute any valid SQL statement dynamicly.
Am trying to capture the message that indicates the number of rows effected
by "UPDATE" AND "DELETE" type SQL statements. This is the message that
normally appears for interactive SQL users after the statment executes:
"6 rows updated", "24 rows deleted" etc...
This information is not part of the "SQLCA" data structure that is returned
by the dynamic routines. The documentation seems to indicate that the
"RDB$MESSAGE_VECTOR" might have this information but I have not been able
to successfully include this external data structure in my program. I
get an "undefined symbol" message from the linker:
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM, RDB$MESSAGE_VECTOR
%LINK-I-UDFSYM, VMH$FIXEDQ_UR (Weak Reference)
%LINK-I-UDFSYM, VMH$FIXEDQ_UW (Weak Reference)
%LINK-I-UDFSYM, VMHDEB$TRACE_FREE_VM (Weak Reference)
%LINK-I-UDFSYM, VMHDEB$TRACE_FREE_VMLIST (Weak Reference)
%LINK-I-UDFSYM, VMHDEB$TRACE_GET_VM (Weak Reference)
%LINK-I-UDFSYM, VMHDEB$TRACE_RET_VMH (Weak Reference)
%LINK-W-USEUNDEF, undefined symbol RDB$MESSAGE_VECTOR referenced
in psect $LINK$ offset %X000002A0
in module SQL$DYNAMIC_DRIVER_I file USER100:[ORAM.DYNAM]EXEC_SQL.OBJ;38
I have declared the structure in my program as follows:
extern struct Rdb$MESSAGE_VECTOR_str RDB$MESSAGE_VECTOR;
Is there header or something that I need to include in my program in order to
use this data structure?
What are the members of this data structure or do I have to use the built in
system calls to access it?(ie SYS$PUTMSG)
Have been unable to find any adequate documentation on this.
Will RDB$MESSAGE_VECTOR give me the information I'm looking for?
Here is my environment and versions:
Current PROCESS DEC Rdb environment is version V6.0-0 (MULTIVERSION)
Current SYSTEM DEC Rdb environment is version V6.0-0 (MULTIVERSION)
Current PROCESS SQL environment is version V6.0-0 (MULTIVERSION)
Current PROCESS Rdb/Dispatch environment is version V6.0-1 (MULTIVERSION)
Current SYSTEM SQL environment is version V6.0-0 (MULTIVERSION)
Current SYSTEM Rdb/Dispatch environment is version V6.0-1 (MULTIVERSION)
Again thanks for your help...
|
4992.4 | | DUCATI::LASTOVICA | Is it possible to be totally partial? | Tue Feb 11 1997 11:51 | 13 |
| from reply .1:
The SQLCA will have this information once the statement executes. Please read
the SQLCA appendix in the SQL Reference Manual (SQLERRD).
As you your specific question, check out
the program examples in RDM$DEMO (such as C_SAMPLE.RC).
>Current PROCESS DEC Rdb environment is version V6.0-0 (MULTIVERSION)
and finally, it is time to upgrade to a more current version
of Rdb. V6.0 was released 3 years ago and there have been hundreds
of bug fixes since then.
|
4992.5 | | WEORG::GREMBOWICZ | | Wed Feb 12 1997 08:57 | 12 |
|
>the program examples in RDM$DEMO (such as C_SAMPLE.RC).
Unfortunately, that is an RDO example, not an SQL example. The dynamic
SQL examples are called sql_dynamic*.c. However, those examples don't
show using SQLERRD to get the row count although you can, with the
third element of the SQLERRD array, SQLCA.SQLERRD[2] in C.
Helen
|