Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change the DefinedSize property of a column

Status
Not open for further replies.

MangroBongacello

Programmer
Mar 20, 2001
189
SI
Hi,

I would like to change the number of characters the field in Access table can accept. Now it is set to 30, I want to set it to 200. I tried

Dim cat as new adox.catalog
dim tbl as adox.table
dim col as adox.column

set cat.ActiveConnection=MyConn
set tbl=cat.Tables("MyTable")
set col=tbl.Columns("MyField")

If col.DefinedSize=30 then col.DefinedSize=200

This gives an error: Operation is not allowed in this context.

Thank you
Mangro

 
I believe that DefinedSize is read only for a column already created.

There is an example her for changing live database DefinedSize:


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top