‎2007 Jan 28 7:07 AM
Hello
I send data from SAP (rel. 4.6C) to a SQL data base.
It works properly with Native SQL. But my problem is:
I send a dataset, some fields are empty. In SAP I use CLEAR to initialize this fields (type CHAR)
In the SQL data base this fields arrives with one space.
Its possible to send a CHAR-Field without any space - realy empty?
Many thanks for your help!
‎2007 Jan 28 7:57 AM
hi
no you cannot since the default value of char type field is space.
Cheers,
Hakim
‎2007 Jan 28 12:19 PM
Hi Daniel,
1. Instead of EXEC SQL, use the ADBC library. It offers proper error handling (it gives you the ORA-XXX error code). See sample program ADBC_DEMO.
2. Generate your NATIVE SQL dynamically and use <b>null</b> where applicable.
For example (not proper code- just the general idea):
Insert into TABNAME values(Field1,Field2,null,null,null,null)...
Best Regards,
Ofer
‎2009 Mar 03 6:16 AM