Bonjour à vous tous les gens!! ça va bien?
bon alors je suis face à un problème... j'utilise une base HSQLDB :
je possède 3 tables : project, configproject et server
celles qui nous intéressent sont server et configproject :
vous avez surement remarqué que "serverId" est une clé étrangère...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 CREATE TABLE project ( projectId integer not null primary key, projectName varchar(40) not null, connectMode varchar(40), softVersion varchar(40), xrdBinPath varchar(40), olbBinPath varchar(40), xrdLibPath varchar(40), xrdLogPath varchar(40), olbLogPath varchar(40), scriptPath varchar(40), scriptLogPath varchar(40) ); create table configProject ( configId integer not null primary key, serverId integer not null, xrdCfName varchar(40), olbCfName varchar(40), xrdStartScriptPath varchar(40), olbStartScriptPath varchar(40), xrdStopScriptPath varchar(40), olbStopScriptPath varchar(40), xrdStatus smallint, olbStatus smallint, migStatus smallint, purgStatus smallint, stagStatus smallint, foreign key(serverId) references server (serverId) );
lorsque j'ajoute un enregistrement dans la table configproject :
voici l'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part insert into configproject values(1, 0, '','','','','','',0,0,0,0,0)dsl pour la masse de code mais jvoulais être bien compris
Code : Sélectionner tout - Visualiser dans une fenêtre à part Integrity constraint violation - no parent SYS_FK_52 table: SERVER / Error Code: -177 / State: 23000
si quelqu'un peut m'aider C génial!
Bonne journée à tous!
Partager