🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #1946

Creating AutoNumber fields using OLE ADO

#1946
From: Russell Allen
Date: Mon, 29 Dec 2003 11:35
16 lines
1371 bytes
Hi all,

Is there any way to create an Autonumber Field using ADOX via OLE?  My code at the moment looks like the following:

  colNew = CreateOleObject("ADOX.Column");
  colNew.OlePropertySet("Name", "DateTime");
  colNew.OlePropertySet("Type", adDate);
  Cols.OleProcedure("append",colNew);
  colNew = Unassigned;

So basically, where the Type property is being sent, as far as I know I also need to modify something in the Column.Properties collection as well, but can't work it out!  Any ideas?

Thanks,

Russ
Technical Details
Message-ID: <3ff01f8d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,3ce03a4b184bec0b,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-12-29 04:37:49 PST
From: "Russell Allen" <russell.allen@bt.com>
Sender: "Russell Allen" <russell.allen@bt.com>
Reply-To: "Russell Allen" <russell.allen@bt.com>
Subject: Creating AutoNumber fields using OLE ADO
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 193.113.48.17     
X-Forwarded-For: 10.229.16.56
NNTP-Posting-Host: 207.105.83.66
Message-ID: <3ff01f8d$1@newsgroups.borland.com>
Date: 29 Dec 2003 04:35:25 -0700
X-Trace: newsgroups.borland.com 1072701325 207.105.83.66 (29 Dec 2003 04:35:25 -0700)
Lines: 16
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail