使用其他数据库中的对象 [英] Using Objects from another database

查看:59
本文介绍了使用其他数据库中的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了一下,但是没有想出这个问题的答案,但是在我脑海里的某个地方,我想这可以

可以完成...


假设我们有两个不同的公司职能:销售和

运营

Operations数据库被认为是主要数据库。一个...我们每天都在使用

,而且效果非常好。


我现在已经创建了一个新的数据库,它基本上跟踪了潜在客户和

管理客户及其正在进行的项目,现在被视为

" sales"功能。


因为我们也在与客户进行销售跟进,我想要

表格,报告和项目代码在新的销售数据库中与旧数据库中的数据完全相同




维护是所有这一切的噩梦。


有没有办法不导入,但有表格,报告等等两个数据库中的
完全一样(我想参考一下),所以

,我只需要维护其中一个。换句话说,如果我对主数据库中的表单或报表或代码进行了更改,那么更改

将反映在新数据库中。


这可以做到,对吗?我想说你几乎像一个加载项

的东西,对吗?我怎样才能让它发挥作用?有什么想法吗?


谢谢!


Josetta

I searched around a little bit, but didn''t come up with the answer to
this question, but somewhere in the back of my mind, I think this can
be done...

Let''s say we have two different company functions: Sales and
Operations

The Operations database is considered the "main" one...we are using
this daily and it works very well.

I''ve now created a new database, which basically tracks prospects and
manages clients and their ongoing projects, which is now considered a
"sales" function.

Because we''re having sales followup with clients as well, I''d like the
forms, reports, and code regarding the projects to be exactly the same
in the new sales db as it is in the old db.

Maintenance is a nightmare on all this already.

Is there a way to NOT import, but have the forms, reports, etc. be
exactly the same in both databases (like a reference, I guess), so
that I only need to maintain one of them. In other words, if I make a
change to the form or report or code in the main database, that change
is reflected in the new database.

This can be done, right? I wanna say you do almost like an Add-in
thing, right? How can I get this to work? Any ideas?

Thanks!

Josetta

推荐答案

2007年4月24日17:40:45 -0700,Josetta< Jo ***** @smartdot.netwrote:


的确这个术语是添加-in" ;.这就是你可以放置常见的

功能的地方。这两个应用程序都会设置对此模块的引用,然后

然后才能使用它。


就个人而言,我宁愿创建一个应用程序,并使用安全性

禁止用户可能不需要的某些功能。


-Tom。
On 24 Apr 2007 17:40:45 -0700, Josetta <Jo*****@smartdot.netwrote:

Indeed the term is "add-in". That''s where you can put the common
functionality. Both apps would set a reference to this module, and are
then able to use it.

Personally I would rather create a single app, and use security to
fence off certain functionality the user may not need.

-Tom.

>我搜索了一下,但是没有想出这个问题的答案,但在我脑海中的某个地方,我想这可以完成......

让我们说我们有两个不同的公司职能:销售和运营

运营数据库被认为是主要的。一个......我们每天都在使用
这很好用。

我现在已经创建了一个新的数据库,它基本上跟踪潜在客户并管理客户及其他人正在进行的项目,现在被视为销售项目。功能。

因为我们也在与客户进行销售跟进,所以我希望这些项目的表格,报告和代码完全相同在新的销售数据库中,因为它在旧数据库中。

维护是所有这一切的噩梦。

有没有办法不导入,但有表格,报告等在两个数据库中都完全一样(我猜是参考),所以我只需要维护其中一个。换句话说,如果我对主数据库中的表单或报表或代码进行了更改,则该更改将反映在新数据库中。

这可以完成, 对?我想说你几乎像一个外接程序,对吧?我怎样才能让它发挥作用?有什么想法吗?

谢谢!

Josetta
>I searched around a little bit, but didn''t come up with the answer to
this question, but somewhere in the back of my mind, I think this can
be done...

Let''s say we have two different company functions: Sales and
Operations

The Operations database is considered the "main" one...we are using
this daily and it works very well.

I''ve now created a new database, which basically tracks prospects and
manages clients and their ongoing projects, which is now considered a
"sales" function.

Because we''re having sales followup with clients as well, I''d like the
forms, reports, and code regarding the projects to be exactly the same
in the new sales db as it is in the old db.

Maintenance is a nightmare on all this already.

Is there a way to NOT import, but have the forms, reports, etc. be
exactly the same in both databases (like a reference, I guess), so
that I only need to maintain one of them. In other words, if I make a
change to the form or report or code in the main database, that change
is reflected in the new database.

This can be done, right? I wanna say you do almost like an Add-in
thing, right? How can I get this to work? Any ideas?

Thanks!

Josetta


4月24日下午5:40, Josetta< Jose ... @smartdot.netwrote:
On Apr 24, 5:40 pm, Josetta <Jose...@smartdot.netwrote:

我搜索了一下,但没有想出答案

这个问题,但在我脑海中的某个地方,我想这可以完成...... b / b
让我们说吧我们有两个不同的公司职能:销售和

运营


运营数据库被认为是主要运营数据库。一个...我们每天都在使用

,而且效果非常好。


我现在已经创建了一个新的数据库,它基本上跟踪了潜在客户和

管理客户及其正在进行的项目,现在被视为

" sales"功能。


因为我们也在与客户进行销售跟进,我想要

表格,报告和项目代码在新的销售数据库中与旧数据库中的数据完全相同




维护是所有这一切的噩梦。


有没有办法不导入,但有表格,报告等等两个数据库中的
完全一样(我想参考一下),所以

,我只需要维护其中一个。换句话说,如果我对主数据库中的表单或报表或代码进行了更改,那么更改

将反映在新数据库中。


这可以做到,对吗?我想说你几乎像一个加载项

的东西,对吗?我怎样才能让它发挥作用?有什么想法吗?


谢谢!


Josetta
I searched around a little bit, but didn''t come up with the answer to
this question, but somewhere in the back of my mind, I think this can
be done...

Let''s say we have two different company functions: Sales and
Operations

The Operations database is considered the "main" one...we are using
this daily and it works very well.

I''ve now created a new database, which basically tracks prospects and
manages clients and their ongoing projects, which is now considered a
"sales" function.

Because we''re having sales followup with clients as well, I''d like the
forms, reports, and code regarding the projects to be exactly the same
in the new sales db as it is in the old db.

Maintenance is a nightmare on all this already.

Is there a way to NOT import, but have the forms, reports, etc. be
exactly the same in both databases (like a reference, I guess), so
that I only need to maintain one of them. In other words, if I make a
change to the form or report or code in the main database, that change
is reflected in the new database.

This can be done, right? I wanna say you do almost like an Add-in
thing, right? How can I get this to work? Any ideas?

Thanks!

Josetta



我这样做事情一直都是。我没有使用加载项来支持这个特定的功能。基本上,为所有

后端保留相同的前端,并让用户切换后端数据库(如何选择

新的由你​​决定。我使用通常的文件对话框

通常),然后循环通过tabledef来定义每个

链接表的新路径。这是一个代码片段(假设一个Access后端

数据库):


每个tdf在db.TableDefs中

''如果连接是空白的,它不是链接表

如果Len(tdf.Connect)0那么

tdf.Connect =" ;; DATABASE =" &安培; varFileName


''如果新路径不正常,RefreshLink可能会失败。所以

陷阱错误内联。

On Error Resume Next

tdf.RefreshLink


我不喜欢如果我从头开始编写代码或从其他地方改编

(比如Getz,Litwin等人),那就不记得了。你可能需要b / b
才能适应你的需求,但这应该会告诉你

的基本想法。

- Larry Engles
从Access 1.0第1天开始访问开发人员

I do this particular thing all the time. I don''t use add-ins for this
particular functionality. Basically, keep the same front-end for all
back-ends and let the user switch backend databases (how you select
the new one is up to you. I use the common file dialog myself
usually), then cycle thru the tabledefs to define the new path to each
linked table. Here is a code snippet (this assumes an Access back-end
database):

For Each tdf In db.TableDefs
'' If connect is blank, its not an Linked table
If Len(tdf.Connect) 0 Then
tdf.Connect = ";DATABASE=" & varFileName

'' The RefreshLink might fail if the new path isn''t OK. So
trap errors inline.
On Error Resume Next
tdf.RefreshLink

I don''t remember off-hand if I wrote that code from scratch or adapted
it from somewhere else (like Getz, Litwin, et. al.). You will
probably need to adapt to your needs, but this should show you the
basic idea.
-- Larry Engles
Access developer since day 1 of Access 1.0


感谢您的建议。老板真的很想让他们分开,我只是想把自己的一些工作留在路上,因为他不断提出这些疯狂的想法。我打算看看这个加载项业务。
。看起来这可能是将来b
的方式。现在,我只需要完成它。


Josetta


4月24日晚上11点35分,Tom van Stiphout< no.spam.tom7 ... @ cox.netwrote:
Thanks for the suggestion. The boss would really like to keep them
separate and I am just trying to save myself some work down the road,
since he comes up with these crazy ideas continually. I am going to
look into this add-in business. It looks like this may be the way to
go in the future. For now, I just need to get it done.

Josetta

On Apr 24, 11:35 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:

2007年4月24日17:40:45 -0700,Josetta< Jose ... @smartdot .netwrote:


的确,这个词是加载项。这就是你可以放置常见的

功能的地方。这两个应用程序都会设置对此模块的引用,然后

然后才能使用它。


就个人而言,我宁愿创建一个应用程序,并使用安全性

禁止用户可能不需要的某些功能。


-Tom。
On 24 Apr 2007 17:40:45 -0700, Josetta <Jose...@smartdot.netwrote:

Indeed the term is "add-in". That''s where you can put the common
functionality. Both apps would set a reference to this module, and are
then able to use it.

Personally I would rather create a single app, and use security to
fence off certain functionality the user may not need.

-Tom.

我搜索了一下,但是没有想出这个问题的答案,但是在我脑海里的某个地方,我想这可以

完成...
I searched around a little bit, but didn''t come up with the answer to
this question, but somewhere in the back of my mind, I think this can
be done...


假设我们有两个不同的公司职能:销售和

运营
Let''s say we have two different company functions: Sales and
Operations


Operations数据库被认为是主要数据。一个...我们每天都在使用

并且效果非常好。
The Operations database is considered the "main" one...we are using
this daily and it works very well.


我现在已经创建了一个新数据库,它基本上跟踪潜在客户并且

管理客户及其正在进行的项目,现在被视为

" sales"功能。
I''ve now created a new database, which basically tracks prospects and
manages clients and their ongoing projects, which is now considered a
"sales" function.


因为我们也在与客户进行销售跟进,我想要

表格,报告和新的销售数据库中的项目代码完全相同

,因为它在旧数据库中。
Because we''re having sales followup with clients as well, I''d like the
forms, reports, and code regarding the projects to be exactly the same
in the new sales db as it is in the old db.


维护是所有这一切的噩梦。
Maintenance is a nightmare on all this already.


有没有办法不导入,但有表格,报告等等。

完全相同两个数据库(比如参考,我猜),所以

,我只需要维护其中一个。换句话说,如果我对主数据库中的表单或报表或代码进行了更改,那么更改

将反映在新数据库中。
Is there a way to NOT import, but have the forms, reports, etc. be
exactly the same in both databases (like a reference, I guess), so
that I only need to maintain one of them. In other words, if I make a
change to the form or report or code in the main database, that change
is reflected in the new database.


这可以做到,对吧?我想说你几乎像一个加载项

的东西,对吗?我怎样才能让它发挥作用?有任何想法吗?
This can be done, right? I wanna say you do almost like an Add-in
thing, right? How can I get this to work? Any ideas?


谢谢!
Thanks!


Josetta-隐藏引用文字 -
Josetta- Hide quoted text -



- 显示引用文字 -


- Show quoted text -



这篇关于使用其他数据库中的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆