recordset.addnew

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    recordset.addnew

    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.
  • Frank Oquendo

    #2
    Re: recordset.addne w

    anonymous@discu ssions.microsof t.com wrote:[color=blue]
    > I am trying to add a new record to an odbc data base. I am
    > using MS ActiveX library2.8.[/color]

    Why that and not ADO.NET?

    --
    There are 10 kinds of people. Those who understand binary and those who
    don't.


    (Pull the pin to reply)


    Comment

    Working...