[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Change field data type of Access using VB6 ADO

Posted on 2010-09-14
3
Medium Priority
?
1,172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 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 58
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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

649 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