Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • Last Modified:

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.
0
morrisbo
Asked:
morrisbo
  • 2
1 Solution
 
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
 
peter57rCommented:
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
 
morrisboAuthor Commented:
peter57r

Thanks,

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

morrisbo
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now