Solved

How to change a text type column length in an access2000 table using ado progamitacilly within vb6

Posted on 2012-03-30
4
400 Views
Last Modified: 2012-06-27
I need to know if there is a way to change a text field (column) in an access2000 mdb using ado from within a vb6 program, and if so I need some help in composing the code to accomplish this.

Thanks for your help here.
0
Comment
Question by:morrisbo
[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
4 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37789861
you can use
currentdb.execute "alter table tableName alter column ColumnName Text(255)"  

that will set the column length to 255
0
 

Author Comment

by:morrisbo
ID: 37789915
Thanks capricorn1,

I am just a novice vb6  programmer.

The data base name is Acord. Its path is C:\appfolder\acord.mdb.

Was wondering what coding will  get me from that path to currentdb.execute.

Really appreciate your help.

morrisbo
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 37790170
You can't use Currentdb with ADO, but Cap1's SQL command is the statement you need to execute.

See this example -

http://www.functionx.com/vb6/Lesson16.htm
0
 

Author Comment

by:morrisbo
ID: 37792391
peter57r

Thanks,

That is the code example I needed with ADO ub VB6 program.  Works just fine.

morrisbo
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

749 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