ALTER TABLE query

S

shaggles

I'm trying to change a data type for 1 column in a temp
table before sending it of to another user. However I am
having trouble witht the query. I tried these 2 but
neither worked:
ALTER TABLE MyTable
MODIFY AnyField Int;

ALTER TABLE MyTable
ALTER COLUMN AnyField Int;

What am I doing wrong?
 
M

Michel Walsh

HI,


Try it in the immediate debug window, not using DAO, not using the query
designer, not using CurrentDb:



CurrentProject.Connection.Execute "ALTER TABLE temp ALTER COLUMN
columnName NewDataType ; "

You may specify the size of the data type, if that makes sense for the new
data type. Like most Jet 4.0 extensions, you have to use ADO to be able to
access them.



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top