영원한 초보입니다.
파라독스 테이블중 필드하나가 키로도 안잡혀 있고 또 not null 도 아닌데...
apend시에 자꾸 값이 필요하다고 합니다. 어케 된걸까요?
참고로 테이블 만든것과 저장루틴을 넣습니다. 고수님들의 조언 바랍니다.
테이블 생성 ===============================================================
ccDbName := 'SH' + ccWkDate + '00.DB'; ccPxName := 'SH' + ccWkDate + '00.PX';
IF NOT FileExists(fcSendPath + ccDbName) THEN Begin
WITH W_Bogip.SortTbl Do Begin
IF Active THEN Active := False;
TableName := ccDbName;
WITH FieldDefs Do Begin
CLEAR;
ADD('R_SWCH', ftString, 1, True);
ADD('R_CSEQ', ftString, 1, True);
ADD('R_IPWP', ftString, 2, True);
ADD('R_GUBUN', ftString, 1, True);
ADD('R_GONG', ftString, 1, True);
ADD('R_SOSOK', ftString, 10, True);
ADD('R_BOHOG', ftString, 1, True);
ADD('R_CHNUM', ftString, 10, True);
ADD('R_ATYUL', ftString, 1, True);
ADD('R_CLMNUM', ftString, 10, True);
ADD('R_SHENUM', ftString, 6, False);
ADD('R_SUNAME', ftString, 12, False);
End;
WITH IndexDefs Do Begin
CLEAR;
ADD(ccPxName, 'R_SWCH;R_CSEQ;R_IPWP;R_GUBUN;R_GONG;R_SOSOK;R_BOHOG;R_CHNUM;R_ATYUL;R_CLMNUM',[ixPrimary]);
End;
CreateTable;
ADDINDEX('BillNo', 'R_CLMNUM;R_SHENUM',[]);
ADDINDEX('ChartNo', 'R_CHNUM;R_SWCH;R_CSEQ;R_IPWP',[]);
END;
DeleteFile(fcSendPath + 'SH' + ccWkDate + '00.VAL');
End;
저장 루틴 ==================================================
IF W_BOGIP.SortTbl.Active THEN W_BOGIP.SortTbl.Active := FALSE;
W_BOGIP.SortTbl.IndexFieldNames :=
'R_SWCH;R_CSEQ;R_IPWP;R_GUBUN;R_GONG;R_SOSOK;R_BOHOG;R_CHNUM;R_ATYUL;R_CLMNUM';
W_BOGIP.SortTbl.Active := TRUE;
WITH W_BOGIP.SortTbl DO Begin
IF FindKey([ccSwch, ccCSeq, ccIO, ccGubun, ccGong,
ccSosok, ccBoho, ccPtNo, ccAkYul]) THEN Begin
EDIT;
End ELSE Begin
APPEND;
End;
FIELDBYNAME('R_SWCH').ASSTRING := ccSwch;
FIELDBYNAME('R_CSEQ').ASSTRING := ccCSeq;
FIELDBYNAME('R_IPWP').ASSTRING := ccIO;
FIELDBYNAME('R_GUBUN').ASSTRING := ccGubun;
FIELDBYNAME('R_GONG').ASSTRING := ccGong;
FIELDBYNAME('R_SOSOK').ASSTRING := ccSosok;
FIELDBYNAME('R_BOHOG').ASSTRING := ccBoho;
FIELDBYNAME('R_CHNUM').ASSTRING := ccPtNo;
FIELDBYNAME('R_ATYUL').ASSTRING := ccAkYul;
FIELDBYNAME('R_CLMNUM').ASSTRING := ucClmNo;
FIELDBYNAME('R_SUNAME').ASSTRING := ccPtNm;
POST;
END;