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

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.
morrisboAsked:
Who is Participating?
 
peter57rConnect With a Mentor Commented:
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
 
Rey Obrero (Capricorn1)Commented:
you can use
currentdb.execute "alter table tableName alter column ColumnName Text(255)"  

that will set the column length to 255
0
 
morrisboAuthor Commented:
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
 
morrisboAuthor Commented:
peter57r

Thanks,

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

morrisbo
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.