Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-03-30
4
Medium Priority
?
416 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 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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