Solved

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

Posted on 2001-07-18
6
199 Views
Last Modified: 2012-08-13
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 :-)
0
Comment
Question by:VK
  • 3
  • 2
6 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6294688
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?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6294749
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

0
 
LVL 6

Author Comment

by:VK
ID: 6295444
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.

:-)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Author Comment

by:VK
ID: 6295469
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.

:-)
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 50 total points
ID: 6300121
You may not like the prospect of creating a new field and copying the data into that field, etc., but that is exactly what Access does, albeit behind the scenes.  So I would be very surprised (not the first time) if you find a way to dynamically alter the size without copying their contents.

My 2 cents worth.
0
 
LVL 6

Author Comment

by:VK
ID: 6301190
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
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now