0

我在 VS 2012 中创建了一个使用 oracle 10g 数据库的 windows C# 表单应用程序。我创建了它的安装文件,并将其安装在我的 PC 上,它可以正常工作。但是当安装在另一台没有安装 oracle 的 PC 上时,它没有工作,我的意思是没有显示数据库中的数据。我的问题是如何在应用程序的安装文件中包含 oracle 数据库表,以便可以在没有安装 oracle 的 PC 上安装它?

4

1 回答 1

2

Well, 2 possibilities here:

  • either you have your Oracle database installed on your PC ("locally"), and so when running your form application from the same machine it's easy to target it
  • or your DB runs on another machine/server, but you have setup your PC to target it. When you have an Oracle client installed on your machine, the tnsnames.ora which is normally in the network/admin subdir of your Oracle client installation directory should contain an item that points to this DB instance. If so, you just have to install an Oracle client on the machine where you want to deploy your app, and setup the tnsnames.ora the same way.

This is the standard way to distribute an application, anyway: make an application/a DB run in a central place accessible by all in order to target it easily. If you have the DB running locally on your PC, you may think about changing your architecture.

于 2013-10-14T07:34:41.860 回答