[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2001-07-18
6
Medium Priority
?
210 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 200 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month19 days, 2 hours left to enroll

834 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