Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

TableDefs

Hello forum!
My name is Liliana, I'm in the forum for a time and now I have a question.

I have this code. It opens an access database and then it changes the property 4 of the table that is the link table.

Set dbsTemp = OpenDatabase("c:\database.mdb") 'opens the database
dbsTemp.TableDefs(5).Properties(4) = ";DATABASE=c:\database_lig.mdb" 'gives the new path to the table link

My doubt is how to save the changes. If I do a break in the second line of the code, I can see that he change the property to the database I what, but don't save it.
I have tried dbsTemp.update but it doesn't work and the property update don't exist in Database object.

Help me!! :o
Thanks
Liliana
[764 byte] By [estrela666] at [2007-11-11 7:20:15]
# 1 Re: TableDefs
That property may be read-only. Try this instead:

With dbsTemp.TableDefs(5)
.Connect = ";DATABASE=c:\database_lig.mdb"
.RefreshLink
End With
Phil Weber at 2007-11-11 17:27:05 >
# 2 Re: TableDefs
It works!! Thanks!
estrela666 at 2007-11-11 17:28:05 >