sijms / go-ora

Pure go oracle client
MIT License
807 stars 174 forks source link

TTC error: received code 1 during response reading during call stored procedure #281

Closed Kazun3500 closed 1 year ago

Kazun3500 commented 1 year ago

Hello, i have an error described in title.

library version github.com/sijms/go-ora/v2 v2.5.18

part of source code

  _, err = tx.Exec(`call AIS_NET.SI_ADDRESSES_PKG.SI_SUBJ_ADDRESSES_PUT_EX(
NUM_N_ADDR_TYPE_ID=>:1,
NUM_N_ADDRESS_ID=>:2,
NUM_N_SUBJECT_ID=>:3,
NUM_N_SUBJ_ADDRESS_ID=>:4,
NUM_N_SUBJ_ADDR_TYPE_ID=>:5,
B_UPDATEREGISTER=>0,
VCH_VC_CODE=>:6)`, 13006, sql.Out{Dest: &addressID, In: true}, BaseSubjectId, sql.Out{Dest: &subAddressID, In: true}, TypePhone, Phone)

database version 11.2.0.4

part of trace log

2022-12-15T17:32:28.6901: Exec With Context:
2022-12-15T17:32:28.6901: Exec:
call AIS_NET.SI_ADDRESSES_PKG.SI_SUBJ_ADDRESSES_PUT_EX(
NUM_N_ADDR_TYPE_ID=>:1,
NUM_N_ADDRESS_ID=>:2,
NUM_N_SUBJECT_ID=>:3,
NUM_N_SUBJ_ADDRESS_ID=>:4,
NUM_N_SUBJ_ADDR_TYPE_ID=>:5,
B_UPDATEREGISTER=>0,
VCH_VC_CODE=>:6)
2022-12-15T17:32:28.6901:     0:
13006
2022-12-15T17:32:28.6902:     1:
{{} 0xc000284210 true}
2022-12-15T17:32:28.6902:     2:
5.6817453401e+10
2022-12-15T17:32:28.6902:     3:
{{} 0xc000284220 true}
2022-12-15T17:32:28.6902:     4:
12016
2022-12-15T17:32:28.6902:     5:
375292853315
2022-12-15T17:32:28.6903: 
Write packet:
00000000  01 92 00 00 06 00 00 00  00 00 03 5e 00 02 80 29  |...........^...)|
00000010  00 01 01 d9 01 01 0d 00  00 00 00 04 7f ff ff ff  |................|
00000020  01 01 06 00 00 00 00 00  00 00 00 00 01 00 00 00  |................|
00000030  00 00 d9 63 61 6c 6c 20  41 49 53 5f 4e 45 54 2e  |...call AIS_NET.|
00000040  53 49 5f 41 44 44 52 45  53 53 45 53 5f 50 4b 47  |SI_ADDRESSES_PKG|
00000050  2e 53 49 5f 53 55 42 4a  5f 41 44 44 52 45 53 53  |.SI_SUBJ_ADDRESS|
00000060  45 53 5f 50 55 54 5f 45  58 28 0a 4e 55 4d 5f 4e  |ES_PUT_EX(.NUM_N|
00000070  5f 41 44 44 52 5f 54 59  50 45 5f 49 44 3d 3e 3a  |_ADDR_TYPE_ID=>:|
00000080  31 2c 0a 4e 55 4d 5f 4e  5f 41 44 44 52 45 53 53  |1,.NUM_N_ADDRESS|
00000090  5f 49 44 3d 3e 3a 32 2c  0a 4e 55 4d 5f 4e 5f 53  |_ID=>:2,.NUM_N_S|
000000a0  55 42 4a 45 43 54 5f 49  44 3d 3e 3a 33 2c 0a 4e  |UBJECT_ID=>:3,.N|
000000b0  55 4d 5f 4e 5f 53 55 42  4a 5f 41 44 44 52 45 53  |UM_N_SUBJ_ADDRES|
000000c0  53 5f 49 44 3d 3e 3a 34  2c 0a 4e 55 4d 5f 4e 5f  |S_ID=>:4,.NUM_N_|
000000d0  53 55 42 4a 5f 41 44 44  52 5f 54 59 50 45 5f 49  |SUBJ_ADDR_TYPE_I|
000000e0  44 3d 3e 3a 35 2c 0a 42  5f 55 50 44 41 54 45 52  |D=>:5,.B_UPDATER|
000000f0  45 47 49 53 54 45 52 3d  3e 30 2c 0a 56 43 48 5f  |EGISTER=>0,.VCH_|
00000100  56 43 5f 43 4f 44 45 3d  3e 3a 36 29 01 01 01 01  |VC_CODE=>:6)....|
00000110  00 00 00 00 00 00 00 02  80 00 00 00 00 02 03 00  |................|
00000120  00 01 16 00 00 00 00 00  00 00 01 03 00 00 01 01  |................|
00000130  00 00 00 00 02 03 69 01  00 02 03 00 00 01 16 00  |......i.........|
00000140  00 00 00 00 00 00 02 03  00 00 01 16 00 00 00 00  |................|
00000150  00 00 00 02 03 00 00 01  16 00 00 00 00 00 00 00  |................|
00000160  01 03 00 00 01 0c 00 01  10 00 00 02 03 69 01 00  |.............i..|
00000170  07 04 c3 02 1f 07 00 07  c6 06 45 12 2e 23 02 00  |..........E..#..|
00000180  04 c3 02 15 11 0c 33 37  35 32 39 32 38 35 33 33  |......3752928533|
00000190  31 35                                             |15|
2022-12-15T17:32:29.0983: 
Read packet:
00000000  00 4c 00 00 06 00 00 00  00 00 07 01 36 01 0b 07  |.L..........6...|
00000010  c6 07 53 51 56 3c 02 00  08 01 06 04 5c 0f c2 10  |..SQV<......\...|
00000020  01 03 01 03 01 01 00 00  00 00 00 04 01 02 01 13  |................|
00000030  00 00 00 00 01 03 00 aa  00 00 00 00 03 00 00 00  |................|
00000040  00 00 00 00 00 00 01 01  00 00 00 00              |............|
2022-12-15T17:32:29.0985: 
Write packet:
00000000  00 0d 00 00 06 00 00 00  00 00 03 0f 00           |.............|
2022-12-15T17:32:29.0998: 
Read packet:
00000000  00 0f 00 00 06 00 00 00  00 00 09 01 05 01 14     |...............|

Can anybody help me solve this error? Some other procedures called succesfully. With other library http://github.com/mattn/go-oci8 i have no errors to call this procedure.

sijms commented 1 year ago

To use call procedure or functions do like this

SqlText := "BEGIN YOUR_PROC(); END"

See examples for more help

Kazun3500 commented 1 year ago

it does not helps. Error is the same.

sijms commented 1 year ago

I see you are using INOUT parameters update to version 2.5.20

sijms commented 1 year ago

also what is the datatype of your output parameters addressID and subAddressID