CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Location
    Germany (Wiesbaden)
    Posts
    49

    SQL Insert command

    Hi,

    I am using an Access database with an ODBC driver and VC++ 6. One field is declared as AutoValue, i.e. the number increases automatically for every new record.

    If I insert a recordset with "insert into table values ('x', 'y', ...)" - what do I have to use for the AutoValue field? ('x', '', 'y') or ('x',, 'y') or what else?

    Thanks,


    Fox


    "I don't like much, really, do I? [laugh] But what I do like, I love passionately!" (Pet shop boys)

  2. #2
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: SQL Insert command

    Try in thsi way:

    insert into table (col1, col2, ...) values ('x', 'y', ...)//and name only col u want to set a value (col1, col2, etc.)the rest will automaticaly take default value

    Let me know if this help u
    Regards,
    ovidiu



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured