Solved

Change field data type of Access using VB6 ADO

Posted on 2010-09-14
3
1,043 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now