A site that uses asp and mdb, a certain mdb uses a link table, and links to another mdb table in the current directory, so that data sharing can be achieved.
The problem is coming. When publishing the website to the website, the online space path is different from my native machine, so the link table fails, and the web page cannot be opened.
I think the solution is:
One is to create a directory structure that is exactly the same as the online space on the machine. But this is very troublesome, especially if you often have to change the website.
One way is to make the link table use a relative path, which is to link to the mdb file in the current directory? (By the way, access is very mentally retarded, and the link table records the absolute path).
Another way is, how to modify the link of the link table through programming (asp or local vba)? (By the way, access is still mentally retarded. I can only use manual updates to update the link table. You must find the mdb under that path! But the local path is different from the online one)
Can anyone tell me how to implement the last two methods above?
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The following is the adox code I am using, just to prove that the access I mentioned has this function (to put it bluntly: is this a matter of accessp? This is the problem that the ado model should solve. And you mentioned the wrong part, and it is more appropriate to mention the Asp part). Those who do access programming should understand it. If you can't understand it, I can only say regrets.
PublicFunctionNewLinkedExternalTableMdb()
DimstrTargetDB()AsString
DimstrProviderString()AsString
DimstrSourceTbl()AsString
DimstrLinkTblName()AsString
DimcatDBAsADOX.Catalog
DimtblLinkAsADOX.Table
DimtmpLinkAsADOX.Table
DimiAsInteger
DimjAsInteger
SetcatDB=NewADOX.Catalog
catDB.ActiveConnection=CurrentProject.Connection
i=catDB.Tables.Count
ReDimstrTargetDB(i)