Re: ADOX Created Table Insert Problem

Discussion in 'Microsoft ADO .NET' started by Mary Chipman [MSFT], Sep 22, 2009.

  1. You'll get a better range of responses on the Access newsgroups on
    microsoft.public.access -- this one is devoted to .NET.

    --Mary

    On Mon, 21 Sep 2009 15:37:21 -0400, SnapDive
    <> wrote:

    >Using ADOX 6 library reference in my C# 3.5 app. I create a Jet
    >database and then a table with a primary key index like this:
    >
    >Index myindex = new Index();
    >myindex .Name = "mytable";
    >myindex .Unique = true;
    >myindex .PrimaryKey = true;
    >myindex .Columns.Append( "rowid" , DataTypeEnum.adInteger , 4 );
    >
    >It creates fine. WHen I try to insert with oledb like this:
    >
    >Insert Into RawData ( cola,colb ) Values ( ? , ? )
    >
    >and I get an error talking about the "rowid" column. I am not
    >specifying it so it will autoincrement, but Access does not like that.
    >Do I need to change the insert statement or the ADOX creation part?
    >
    >Thanks.
     
    Mary Chipman [MSFT], Sep 22, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest

    Problems with creating a new table using ADOX

    Guest, Dec 15, 2005, in forum: Microsoft ADO .NET
    Replies:
    3
    Views:
    247
    Paul Clement
    Dec 16, 2005
  2. Replies:
    0
    Views:
    309
  3. Edwin Knoppert

    ADOX: how to get true ordinal of Excel Table

    Edwin Knoppert, May 22, 2006, in forum: Microsoft ADO .NET
    Replies:
    2
    Views:
    460
    Paul Clement
    May 22, 2006
  4. Guest

    ADOX: Copy table structure with C#?

    Guest, Jul 5, 2006, in forum: Microsoft ADO .NET
    Replies:
    2
    Views:
    1,715
    Guest
    Jul 6, 2006
  5. Roy Soltoff
    Replies:
    5
    Views:
    489
    Guest
    Aug 3, 2006
Loading...

Share This Page