|
| First of all, the DIC_ID-Field is the first field in your table definitio=
| n,
| thus it is the first item in your Fields-Collection in the Recordset of
| ODBC. As DIC_ID is a SERIAL - Field, you should start inserting your data
| from index 1.

I don't understand relation with the problem!


| Next thing is, your table definition has 7 Cols, your array has only got =
| 4.
| (Gerald)

Yes, that's right, because rest of fields are not mandatory, so I don't have
to use them.
I found (in the sqltrace.pct) that ODBC driver adds incorrectly one more
field "DIC_CONFIG"

(INSERT "ADMIN"."DICTIONARY" SET
"DIC_NAME"=?,"DIC_CONTENT"=?,"DIC_VERSION"=?,"DIC_CAPTION"=?,"DIC_CONFIG"=?)

for which I didn't specified value, so there is a wrong number of
parameters. This behaviour is a BIG BUG for me.

I found, that when I add this field to my list:
                Fields := VarArrayCreate([0, 4], varVariant);
                Values := VarArrayCreate([0, 4], varVariant);
                Fields[0] := 'Dic_Name';
                Values[0] := 'DICT_CARD2';
                Fields[1] := 'Dic_Caption';
                Values[1] := 'DICT_CARD2';
                Fields[2] := 'Dic_Version';
                Values[2] := 0;
                Fields[3] := 'Dic_Content';
                Values[3] := 'DESCRIPTION';
                Fields[4] := 'Dic_Config';
                Values[4] := '';
                Rs.AddNew(Fields, Values);

there is no error message and record is added.

Regards
Michal Wójcik

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to