[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1191
  • Last Modified:

Change field data type of Access using VB6 ADO

How can I change the data type of an Access database field from Autonumber to Long in VB6 and using ADO?
0
thenemesiz
Asked:
thenemesiz
  • 2
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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
 
thenemesizAuthor Commented:
bravo 'JDettman' works ok
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now