Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ADBC - data save to oracle server

0 Kudos

Hi ,

My requirement is to insert rows in an oracle server after some processing. I am using ADBC for the same .

Below is the code i am using for insert -

r_connection = cl_sql_connection=>get_connection( iv_con_name ) . -> getting connection , this step is successful


below is code for insert -


DATA(lv_stmt) = `insert into ` && c_tabname && ` values (?,?,?,?,?,?,?,?,?,?,?,?,?)` ##no_text.

     " create a prepared statement object

     DATA(lr_prepstmt_ref) = ir_con_ref->prepare_statementstatement = lv_stmt tab_name_for_trace = c_tabname ).

     " bind input variables

     lr_prepstmt_ref->set_param_struct( REF #( ls_edm ) ).

       ls_edm   = VALUE #( zbu_sap_docid       = is_edm_table-zbu_sap_docid

                       zbu_sap_obj_type        = is_edm_table-zbu_sap_obj_type

                       zbu_sap_obj_id          = is_edm_table-zbu_sap_obj_id

                       zbu_sap_doc_type        = is_edm_table-zbu_sap_doc_type

                       zbu_title               = is_edm_table-title

                       zbu_customer_name       = is_edm_table-zbu_customer_name

                       zbu_premise_address     = is_edm_table-zbu_premise_address

                       zbu_energy_acct_nbr     = is_edm_table-zbu_energy_acct_nbr

                       zbu_dsm_acct_nbr        = is_edm_table-zbu_dsm_acct_nbr

                       zbu_bupartner           = is_edm_table-zbu_bupartner

                       zbu_program_name        = is_edm_table-zbu_program_name

                       zbu_owner_id            = is_edm_table-zbu_owner_id

                       zbu_document_date       = is_edm_table-zbu_document_date ).


   lr_prepstmt_ref->execute_update( ).


In above execute update I get an error saying table doesnot exists . Table is existing in oracle and I have checked column type is same as column type defined in is_edm_table work area. I am not sure what I am missing here. Please help.


Thanks

1 ACCEPTED SOLUTION

0 Kudos

This is working now. table h=from oracle server had different no of columns.

1 REPLY 1

0 Kudos

This is working now. table h=from oracle server had different no of columns.