Link to home
Start Free TrialLog in
Avatar of VK
VKFlag for Germany

asked on

Resize a Field in an Access 2.0 Table (Error 3219)

Hello Experts:

I have a MS-Access 2.0 Database. There is a table "Customers" and a field "Description" of type text.

Now i have to resize the field from 10 to 20 characters (using vb6).

I can't execute:

MyTDef.Fields("Description").Properties("Size").Value=20

because of Error 3219.

Please don't suggest:

1. Add a new field to the fields-collection with the desired properties (and a different field name, say 'NewField')
2. Copy all data from 'Description' to 'NewField'
3. Remove 'Description' from 'Customers'
4. Rename 'NewField' to 'Description'

or something like that, because i don't want to copy any data (there are a lot of records in 'customers').

Thanks in advance :-)
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

I take it that you do not have Access 2.0 available, so that you could simple change the design of the table in the MDB directly?
As far as I am aware, there is NO way to ALTER the size of an existing column via the ALTER TABLE Action query in Access SQL.

JET SQL(DAO) only supports ADD COLUMN, DROP COLUMN--you cannot change the size of an existing column, nor can you change the name of an Existing Column.

Your only choice would be : Use Access 2.0 and make the requested change directly through the Database Design interface in Access 2.0

Avatar of VK

ASKER

Arthur, ty for the reply.

Yes i have Access available, but our customers have not.
I have to write a tool that has to update their databases.
So i have to initiate all jobs from vb.

Is there a way creating remote a macro in the database that can do the job ?

I don't know the DoCmd - syntaxes. Further, there may be a way doing the job via OLE.

Let's wait a day or so. If your comment still remains the best, you get the points.

:-)
Avatar of VK

ASKER

Arthur, ty for the reply.

Yes i have Access available, but our customers have not.
I have to write a tool that has to update their databases.
So i have to initiate all jobs from vb.

Is there a way creating remote a macro in the database that can do the job ?

I don't know the DoCmd - syntaxes. Further, there may be a way doing the job via OLE.

Let's wait a day or so. If your comment still remains the best, you get the points.

:-)
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of VK

ASKER

OK. I have no alternative.
I believe it.
Nobody here could help.

But so far, acperkins has the best description of the reason.

Thanks to Arthur too. :-)

bye