|
 |
asp_databases thread: SQL syntax for access question
Message #1 by rico bernard <forlists2001@y...> on Tue, 13 Nov 2001 12:03:13 -0800 (PST)
|
|
Hello everyone,
I am having a bit of a brainlock here. Can someone
please tell me what the SQL syntax is for creating a
table in Access2000 with an autonumber field? The
only thing I have figured out is that simply
specifying the datatype as autonumber will not work.
Thanks for your help.
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
Message #2 by Kyle Burns <kburns@c...> on Tue, 13 Nov 2001 15:03:18 -0500
|
|
IIRC, the datatype is "autoincrement".
=================================
Kyle M. Burns, MCSD, MCT
ECommerce Technology Manager
Centra Credit Union
kburns@c...
-----Original Message-----
From: rico bernard [mailto:forlists2001@y...]
Sent: Tuesday, November 13, 2001 3:03 PM
To: ASP Databases
Subject: [asp_databases] SQL syntax for access question
Hello everyone,
I am having a bit of a brainlock here. Can someone
please tell me what the SQL syntax is for creating a
table in Access2000 with an autonumber field? The
only thing I have figured out is that simply
specifying the datatype as autonumber will not work.
Thanks for your help.
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
$subst('Email.Unsub')
Message #3 by rico bernard <forlists2001@y...> on Tue, 13 Nov 2001 12:13:37 -0800 (PST)
|
|
Hey Kyle,
Thanks for that answer, it really helped me.
--- Kyle Burns <kburns@c...> wrote:
> IIRC, the datatype is "autoincrement".
>
> =================================
> Kyle M. Burns, MCSD, MCT
> ECommerce Technology Manager
> Centra Credit Union
> kburns@c...
>
>
>
> -----Original Message-----
> From: rico bernard [mailto:forlists2001@y...]
> Sent: Tuesday, November 13, 2001 3:03 PM
> To: ASP Databases
> Subject: [asp_databases] SQL syntax for access
> question
>
>
> Hello everyone,
>
> I am having a bit of a brainlock here. Can someone
> please tell me what the SQL syntax is for creating a
> table in Access2000 with an autonumber field? The
> only thing I have figured out is that simply
> specifying the datatype as autonumber will not work.
>
> Thanks for your help.
>
> __________________________________________________
> Do You Yahoo!?
> Find the one for you at Yahoo! Personals
> http://personals.yahoo.com
>
>
> kburns@c...
> $subst('Email.Unsub')
>
>
> forlists2001@y...
> $subst('Email.Unsub')
>
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
Message #4 by Imar Spaanjaars <Imar@S...> on Tue, 13 Nov 2001 21:36:30 +0100
|
|
Hi there,
Try something like this:
sText = "CREATE TABLE tblTest (ID autoincrement)"
oConn.Execute(sText)
This will create a table with one column called ID which is an autonumber
field. oConn refers to a valid ADO connection to an Access database.
If you want more control over the way you can create Access objects
(including the database itself and its tables etc) look into ADOX, an
extension of ADO.
If you need more help / code samples of ADOX, let me know.
HtH
Imar
At 12:03 PM 11/13/2001 -0800, you wrote:
>Hello everyone,
>
>I am having a bit of a brainlock here. Can someone
>please tell me what the SQL syntax is for creating a
>table in Access2000 with an autonumber field? The
>only thing I have figured out is that simply
>specifying the datatype as autonumber will not work.
>Thanks for your help.
|
|
 |