如何在没有MS Access的服务器上重新链接链接表?

时间:2022-01-16 15:37:44

In my asp.net webpage I am loading data from an .accdb MS Access database that has tables that are linked to another .mdb database.

在我的asp.net网页中,我从.accdb MS Access数据库加载数据,该数据库具有链接到另一个.mdb数据库的表。

My website works fine on my own dev machine.

我的网站在我自己的开发机上工作正常。

When I upload it to the webserver, the path to the linked database becomes incorrect. This is because Access only lets you use the Linked-Table Manager to assign full paths, and I had to use full paths to locations on my dev machine.

当我将其上传到Web服务器时,链接数据库的路径变得不正确。这是因为Access只允许您使用链接表管理器分配完整路径,我必须使用完整路径到我的开发机器上的位置。

On my webserver, I have Visual Studio Web Express 2012, but not MS Access. How can I change the paths in the linked tables? Can I do this with Visual Studio, or is my only solution a coded one?

在我的网络服务器上,我有Visual Studio Web Express 2012,但不是MS Access。如何更改链接表中的路径?我可以使用Visual Studio执行此操作,还是我唯一的编码解决方案?

1 个解决方案

#1


1  

Well, this is a workaround.

嗯,这是一种解决方法。

I ended up moving the dev-db to the same network location as the production db. That way I can use it on my dev machine and in production and just change the path before uploading the accdb containing the linked tables. The paths exist in both places already.

我最终将dev-db移动到与生产db相同的网络位置。这样我就可以在我的开发机器和生产中使用它,只需在上传包含链接表的accdb之前更改路径。路径已经存在于两个地方。

Not really the solution I wanted, but it works just fine.

不是我想要的解决方案,但它的工作正常。

There are some coded solutions, too, that I've found.

我也发现了一些编码解决方案。

#1


1  

Well, this is a workaround.

嗯,这是一种解决方法。

I ended up moving the dev-db to the same network location as the production db. That way I can use it on my dev machine and in production and just change the path before uploading the accdb containing the linked tables. The paths exist in both places already.

我最终将dev-db移动到与生产db相同的网络位置。这样我就可以在我的开发机器和生产中使用它,只需在上传包含链接表的accdb之前更改路径。路径已经存在于两个地方。

Not really the solution I wanted, but it works just fine.

不是我想要的解决方案,但它的工作正常。

There are some coded solutions, too, that I've found.

我也发现了一些编码解决方案。