By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,284 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

Alter table

P: n/a
Can I set fields lenghts of an existing database with "ALTER TABLE" command
without lost data ?
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
HjKlOp wrote:
Can I set fields lenghts of an existing database with "ALTER TABLE" command
without lost data ?


You can't alter field widths with Jet's ALTER TABLE. You'll need to add a new
field, copy the data and then DROP the old field.

Takes 3 SQL statements or a VB routine or you can do it manually.

--
'-------------------------------
' John Mishefske
'-------------------------------

Nov 12 '05 #2

P: n/a
Allen Browne wrote:
Execute the SQL statement under ADO, and you can alter the size of the field
without losing the data.
This works in Access 2000 or 2002 only (JET 4).


I guess I was wrong; this works fine:

ALTER TABLE
Banks
ALTER COLUMN
BankName Text(17);
--
'-------------------------------
' John Mishefske
'-------------------------------

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.