UWVA#13273
480 svn path=/Database/trunk/; revision=9660
This commit is contained in:
43
COMSQL.H
43
COMSQL.H
@@ -2,8 +2,8 @@
|
||||
#define _COMSQL_H
|
||||
/*
|
||||
* COMSQL.H
|
||||
* $Revision: 88 $
|
||||
* $Modtime: 20-09-07 16:36 $
|
||||
* $Revision: 90 $
|
||||
* $Modtime: 21-12-07 12:57 $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -30,11 +30,11 @@
|
||||
*/
|
||||
|
||||
#define _VERSIONMAJ 4
|
||||
#define _VERSIONMIN 71
|
||||
#define _VERSIONPATCH 2
|
||||
#define _VERSIONCODE 471
|
||||
#define _VERSION '4.71.2'
|
||||
#define _RECREATESCRIPT recre471
|
||||
#define _VERSIONMIN 80
|
||||
#define _VERSIONPATCH 0
|
||||
#define _VERSIONCODE 480
|
||||
#define _VERSION '4.80.*'
|
||||
#define _RECREATESCRIPT recre480
|
||||
|
||||
#define BASIS_PRIVILEGE 0
|
||||
#define NORMAAL_PRIVILEGE 0
|
||||
@@ -128,6 +128,16 @@ left outer join table on where
|
||||
APPLICATION_ERROR(-20000, message); \
|
||||
END
|
||||
|
||||
#define CHECK_KEY_REFERENCE(table, primary_key, ref_key, message) \
|
||||
BEGIN \
|
||||
SELECT primary_key \
|
||||
FROM table \
|
||||
WHERE primary_key = ref_key; \
|
||||
EXCEPTION \
|
||||
WHEN NO_DATA_FOUND \
|
||||
_THEN APPLICATION_ERROR(-20000, message); \
|
||||
END
|
||||
|
||||
#define _SPOOL(x)
|
||||
|
||||
#define BOOLEAN int
|
||||
@@ -634,7 +644,6 @@ upper_omschrijving, exc_msg_GEEN_OMSCHRIJVING, \
|
||||
WHERE alg_terreinsector_key = :new.key_veld) \
|
||||
APPLICATION_ERROR_GOTO(-20000,message); \
|
||||
|
||||
|
||||
#define USER_TABLES INFORMATION_SCHEMA.TABLES \
|
||||
WHERE TABLE_CATALOG = 'FAC' AND TABLE_TYPE = 'BASE TABLE' \
|
||||
AND TABLE_CATALOG = USER
|
||||
@@ -689,6 +698,24 @@ CEILING
|
||||
APPLICATION_ERROR(-20000, message); \
|
||||
END
|
||||
|
||||
#define CHECK_KEY_REFERENCE(table, primary_key, ref_key, message) \
|
||||
DECLARE \
|
||||
dummy NUMBER(10); \
|
||||
mutating_table EXCEPTION; \
|
||||
PRAGMA EXCEPTION_INIT(mutating_table, -4091); \
|
||||
BEGIN \
|
||||
SELECT primary_key \
|
||||
INTO dummy \
|
||||
FROM table \
|
||||
WHERE primary_key = ref_key; \
|
||||
EXCEPTION \
|
||||
WHEN NO_DATA_FOUND \
|
||||
THEN APPLICATION_ERROR(-20000, message); \
|
||||
WHEN mutating_table \
|
||||
_THEN NULL; \
|
||||
END
|
||||
|
||||
|
||||
#define CREATE_TABLE(table_name, level) \
|
||||
CREATE TABLE table_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user