I am trying to add a new record to an odbc data base. I am
using MS ActiveX library2.8. The syntax is recordset.AddNe w
(object fieldlist, object values). Object fieldlist and
values can be one field/value or can be an array of fields
and values. My problem is I do not know how to set up the
array for this to work. I try the following: string[] fn
= new string[]={"Name_of_the_ field", "Name_of_the_fi eld"};
string[] fv=new string[] = {"Value_of_the_ field",
Value_of_the_fi eld"};
recordset.Open
(query,connecti on,ADODB.Cursor TypeEmun.adOpen Keyset,ADODB.L
ockTypeEnum.adL ockOptimistic,-1);
recordset.AddNe w(fn, fv); I get the following error: Item
can not be found in colletion corresponding to the
requested name or ordinal.
using MS ActiveX library2.8. The syntax is recordset.AddNe w
(object fieldlist, object values). Object fieldlist and
values can be one field/value or can be an array of fields
and values. My problem is I do not know how to set up the
array for this to work. I try the following: string[] fn
= new string[]={"Name_of_the_ field", "Name_of_the_fi eld"};
string[] fv=new string[] = {"Value_of_the_ field",
Value_of_the_fi eld"};
recordset.Open
(query,connecti on,ADODB.Cursor TypeEmun.adOpen Keyset,ADODB.L
ockTypeEnum.adL ockOptimistic,-1);
recordset.AddNe w(fn, fv); I get the following error: Item
can not be found in colletion corresponding to the
requested name or ordinal.
Comment