Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: How to create table with an AUTOINCREMENT field using SQL?


Message #1 by lianbop2p@h... on Tue, 21 May 2002 21:15:05
The same way you set the AutoIncrement property, for example:

         With col
                 .ParentCatalog = catDB
                 .Type = adVarWChar
                 .Name = "MyColumnName"
                 .Properties("Default") = "MyDefaultValue"
         End With


Likewise, you can set the "Description" field (which Access shows in design 
view) like this:

         .Properties("Description") = "MyDescription"

There are some weird implementation bugs / by design problems. You can't 
set properties and attributes at the same time.

HtH

Imar


At 04:43 AM 5/23/2002 +0800, you wrote:
>Hi Imar,
>
>Yes, it is adDate. It is diffrent from build table directly in Access.
>
>A more question comes then: how to define Default value?
>
>For example:
>   .Append "msgDTime", adDate, Default=Now()
>
>I can't find it in MSDN examples.
>
>Sorry for take your so much time.
>
>Lianbo



  Return to Index