VS2010 数据库项目和(故意的)未解决的引用

发布于 2024-12-26 01:54:17 字数 280 浏览 2 评论 0原文

我有一个报告数据库,其大部分表/视图/函数都基于我的电子商务数据库(它们都是在初始化复制时在报告数据库中创建的)。有一些表/视图/函数只属于报告数据库,因此我在 VS2010 中为该数据库有一个单独的数据库项目。
我的问题是这样的:当我签入引用不在报告数据库项目中的表(它们仅在电子商务数据库项目中)的视图时,我无法在没有未解决的引用错误的情况下进行构建。
有没有办法解决这个问题,而不将视图中的表添加到报告数据库项目中的表文件夹中?我不想这样做,因为这样我的团队必须记住在电子商务数据库项目中更新报告数据库项目中的表时更新它们。

I have a reporting database for which most of its tables/views/functions are based on my ecommerce database (they all get created in the reporting db when replication is initialized). There are a few tables/views/functions that belong only in the reporting database, so I have a separate database project in VS2010 for that db.
My problem is this: When I check in a view that references tables that are not in the reporting db project (they're only in the ecommerce db project), I can't build without getting unresolved reference errors.
Is there any way around this without adding the tables from the view to the Tables folder in the reporting db project? I'd rather not do that because then my team has to remember to update the tables in the reporting db project when they are updated in the ecommerce db project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

莫言歌 2025-01-02 01:54:17

在项目之间共享文件的基本过程:

  1. 在解决方案资源管理器中右键单击报告数据库项目并选择“添加现有项目”选项。

  2. 在“添加现有项目 - 数据库”对话框中选择您想要共享的文件。

  3. 单击“添加”按钮上的向下箭头,然后单击“添加为链接”。

您应该能够一次性添加多个文件作为链接。例如,如果您的电子商务数据库中有一个 Tables 文件夹,并且您的报告数据库中有一个 Tables 文件夹:

  1. 右键单击报告数据库中的 Tables 文件夹。

  2. 从电子商务数据库的“表”文件夹中选择所有文件或文件的子集。

  3. 单击“添加”按钮上的向下箭头,然后单击“添加为链接”。

The basic procedure for sharing files between projects:

  1. In Solution Explorer right click on the reporting database project and select the Add Existing Item option.

  2. In the 'Add Existing Item - Database' dialog box select the file you wish to share.

  3. Click the down arrow on the 'Add' button and then click 'Add As Link'.

You should be able to add multiple files as links in one go. For example, if you have a Tables folder in your ecommerce database and a Tables folder in your reporting database:

  1. Right click on the Tables folder in the reporting database.

  2. Select all files or a subset of the files from the Tables folder in the ecommerce database.

  3. Click the down arrow on the 'Add' button and then click 'Add As Link'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文