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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. localhost

    ADOX Index Creation Problem

    localhost, Feb 23, 2004, in forum: Microsoft ADO .NET
    Replies:
    2
    Views:
    413
    Kevin Yu [MSFT]
    Feb 24, 2004
  2. Mr. B

    ADOX Problem

    Mr. B, Dec 5, 2005, in forum: Microsoft ADO .NET
    Replies:
    2
    Views:
    315
    Mr. B
    Dec 5, 2005
  3. Guest

    Problems with creating a new table using ADOX

    Guest, Dec 15, 2005, in forum: Microsoft ADO .NET
    Replies:
    3
    Views:
    331
    Paul Clement
    Dec 16, 2005
  4. Wayne Wengert

    Problem Deploying App That Uses ADOX

    Wayne Wengert, Jan 20, 2006, in forum: Microsoft ADO .NET
    Replies:
    5
    Views:
    873
    Paul Clement
    Jan 30, 2006
  5. Replies:
    0
    Views:
    437
  6. Edwin Knoppert

    ADOX: how to get true ordinal of Excel Table

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

    ADOX: Copy table structure with C#?

    Guest, Jul 5, 2006, in forum: Microsoft ADO .NET
    Replies:
    2
    Views:
    2,225
    Guest
    Jul 6, 2006
  8. Roy Soltoff
    Replies:
    5
    Views:
    687
    Guest
    Aug 3, 2006
Loading...