有没有办法在不部署 ODBC 或 OLEDB 驱动程序的情况下使用 Powerbuilder 连接到 ASA 数据库?

发布于 2024-09-16 13:56:29 字数 258 浏览 4 评论 0原文

我想要的是一个在 Windows 上运行的 Powerbuilder 应用程序,该应用程序从 CD(或其他外部磁盘)运行,可以从文件位于同一磁盘上的 ASA 数据库中读取数据。但我想在不部署 ODBC 或 OLEDB 驱动程序的情况下执行此操作。也就是说,我不想将驱动程序文件复制到客户端的硬盘或添加任何注册表项。这可能吗?

在 Powerbuilder 和 ASA 文档中,他们提到了有关“嵌入式数据库连接”的内容,据说您可以在连接字符串中指定数据库服务器的可执行文件。但这没有帮助。

What I want is a Powerbuilder application that runs on Windows that runs from a CD (or some other external disk) that can read from an ASA database whose file is located on the same disk. But I want to do so without deploying the ODBC or OLEDB drivers. That is, I do not want to have to copy the driver files to the client's hard disk or add any registry entries. Is this possible?

In the Powerbuilder and ASA documentation they mention something about "embedded database connections" and supposedly you can specify the executable for the database server in the connection string. But that was no help.

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

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

发布评论

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

评论(3

知你几分 2024-09-23 13:56:29

当您尝试连接到数据库并且为事务对象的 DBMS 属性指定“ODBC”时,PowerBuilder 将开始加载驱动程序并查找 ODBC 数据源以获取驱动程序信息。

我唯一能想到的就是在运行时创建所有注册表项并将它们指向驱动程序文件和 CD 上的 .db 文件。您可能已经可以使用 CD 上基于文件的数据源使事情变得更容易,但您仍然需要创建注册表项来设置驱动程序详细信息。然后,您可以在断开/关闭应用程序时删除所有这些条目。我认为如果没有注册表项,您无法完全做到这一点。

When you attempt to connect to a database and "ODBC" is specified for the DBMS property of the transaction object, PowerBuilder is going to want to start loading drivers and looking to an ODBC datasource for the driver's info.

The only thing I can think to try, is to create all the registry entries at run time and point them to the driver files and the .db file on the CD. You might be able to make things easier with a file based datasource on the CD already, but you'll still need to create registry entries to setup the driver details. Then you can remove all those entries when you disconnect/close the application. I don't think you can do this completely without registry entries.

养猫人 2024-09-23 13:56:29

您必须部署 ODBC 驱动程序,这就是 PB 与 SQL Anywhere 对话的方式。不过,您不必创建 DNS 条目,您可以使用无 DNS 连接。

http://www.carlprothman.net/Default.aspx?tabid=90#ODBCDriverForSybaseSQLAnywhere

You do have to deploy the ODBC driver, that's how PB talks to SQL Anywhere. You dont have to create a DNS entry though, you can usr a DNSless connection.

http://www.carlprothman.net/Default.aspx?tabid=90#ODBCDriverForSybaseSQLAnywhere

时光瘦了 2024-09-23 13:56:29

由于您没有得到太多反馈,我想我会提供这个。我已经使用 MS Access 完成了此操作,但 MS Access 更容易连接,并且大多数 Windows PC 都能够通过基于文件的 DSN 进行连接。

如果可能的话,您肯定希望避免 ODBC 在 ASA 中查找基于文件的 DSN,但因为它更像是一个完整的数据库引擎,我怀疑没有 ODBC 是否可行,并且通过注册表项设置 ODBC 是可能的,但一点也不有趣,尤其是如果您的客户端运行不同版本的 Windows。

这是我用于类似但 MS Access 的连接字符串。我选择 Access 正是出于这个原因,它用于 RPG 程序,我想要一个数据库,但不想与 ODBC 发生冲突。

示例:

"Connectstring='Driver={Microsoft Access 驱动程序
(*.mdb)};UID=abc;PWD=123; Dbq=C:\Program Files\Mafia Manager\mm.mdb;
独家=1;'"

Since you aren't getting much feedback I thought I'd offer this. I've done this with MS Access, but MS Access is much easier to connect to and most Windows PC's are able to connect via File based DSN.

You definitely want to avoid ODBC if at all possible look for File based DSN in ASA, but because it is more of a full database engine I doubt it is possible without ODBC and setting up ODBC via Registry Entries is possible but no fun at all especially if your clients are running different versions of Windows.

Here is the connect string I used for something similar but MS Access. I choose Access for this exact reason, it was for a RPG program and I wanted a database but didn't want to mess with ODBC.

Sample:

"Connectstring='Driver={Microsoft Access Driver
(*.mdb)};UID=abc;PWD=123; Dbq=C:\Program Files\Mafia Manager\mm.mdb;
Exclusive=1;'"

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