views:

34

answers:

1

If I know that a particular Text column exists in a table, how can I programmatically resize that field (say from 10 to 20) with C#? I don't want to use the method where I would create a temporary column, copy the data over, drop the old column, and rename the new one. I'd like to preserve the orde.

+2  A: 

Can you use c# to execute a DDL statement in the Access database? If so this one works from within Access:

CurrentDb.Execute "ALTER TABLE YourTable ALTER COLUMN YourTextField TEXT(20);"
HansUp