Skip to content

Single tuple causing cursor.executemany ORA-03147: missing mandatory TTC field #30

Closed
@cjbj

Description

@cjbj

Discussed in #29

Originally posted by Loncor June 27, 2022
I am getting this error when executing the following. Uncommenting the lines below makes it work. So I have concluded if a single tuple in a list is used executemany has a problem. I've got a workaround so not a show stopper. It is not peculiar to this insert as I have tried other tables and differing SQL:-

sql_ins_doc_spell = """
            begin
               insert into doc.spell_correct (unknown_word, default_word ) values (:1 , :2);
            exception
                when dup_val_on_index then
                   null;
            end;                              
       """

spell_correct = []

spell_correct.append(('jick', 'jack')) 
#spell_correct.append(('ramana', 'ramona')) 

with connection.cursor() as cursor:
    cursor.executemany(sql_ins_doc_spell, spell_correct)
    connection.commit()
```</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions