Solved

Change field data type of Access using VB6 ADO

Posted on 2010-09-14
3
1,092 Views
Last Modified: 2013-12-25
How can I change the data type of an Access database field from Autonumber to Long in VB6 and using ADO?
0
Comment
Question by:thenemesiz
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 33671339
Do that by executing a DDL SQL statement, which would look like this:
"ALTER TABLE MyTable ALTER COLUMN <MyAutoNumberToChange>  LONG;"
You may find the following helpful with other SQL/DDL statements that you can use:
Intermediate Microsoft Jet SQL for Access 2000
http://msdn.microsoft.com/en-us/library/aa140015(office.10).aspx#acintsql_adovdao
JimD.

 
 
0
 

Author Comment

by:thenemesiz
ID: 33671456
bravo 'JDettman' works ok
0
 
LVL 57
ID: 33671574
Thanks.  Check out that link I posted.  Also at the bottom of that is a link to the third part of the article, advanced JET SQL which is well worth looking through.  
Between the three articles, they show you anything and everything that can be done with JET SQL.
JimD.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question