exec SQL 유형 고객입니다 구조 바르 차르 이름 [50]; int 전화; ; exec sql type cust_ind입니다 구조체 인디 짧은 이름 _ind; 짧은 폰_ind; ; Exec SQL Type C는 Char Reference입니다. exec SQL 유형 ind는 Union int integer; 짧은 smallint; ; exec SQL 유형 intarray는 int [ailt]; exec SQL 유형 str는 varchar [buffersiz]; exec SQL 유형 문자열은 char [11];
여기를 사용하는 예제 프로그램이 있습니다exec SQL 유형:
sqlerror sqlprint가있을 때마다 EXEC SQL; Exec SQL Type TT IS 구조 Varchar V [256]; int i; ; Exec SQL Type TT_IND입니다 struct ind 짧은 v_ind; 짧은 i_ind; ; int 메인 (void) Exec SQL 시작 선언 섹션; tt t; tt_ind t_ind; Exec SQL END DELLARE SECTION; exec sql testdb에 con1로 연결; Exec SQL 선택 PG_CATALOG.SET_CONFIG ( 'search_Path', '', False); Exec SQL 커밋; Exec SQL SELECT CRORTER_DATABASE (), 256 in : T : T_IND LIMIT 1; printf ( "t.v = %s \ n", t.v.arr); printf ( "t.i = %d \ n", t.i); printf ( "t_ind.v_ind = %d \ n", t_ind.v_ind); printf ( "t_ind.i_ind = %d \ n", t_ind.i_ind); EXEC SQL CON1 차단; 반환 0;
이 프로그램의 출력은 다음과 같습니다.
t.v = testdb T.i = 256 t_ind.v_ind = 0 t_ind.i_ind = 0
이전 | 배트맨 토토 : 문서 : 9.3 : 배트맨 토토 9.3.25 문서화 | 다음 |
SET DESCRICTOR | up | var |