使用php通过odbc连接到quickbooks数据库?

发布于 2024-07-14 02:09:43 字数 1144 浏览 10 评论 0原文

[编辑]
我们正在网络表单上收集用户的信用申请数据。

我还没有将我的网络表单直接绑定到 QB 中。

我不知道这个数据集合的 QB 表结构是什么,也不知道它如何向用户显示它,因为我从未真正直接使用过 QB。 然而,我办公室的其他人却这样做。


我仍然希望获得有关开源/免费选项的任何信息。


我将通过删除第一个所需的选项来简化问题。

我们只讨论将平面文件导入到 Quickbooks 中。

我没有可以使用的 Quickbooks 副本,因此我不知道 Quickbooks 本身存在哪些选项,但我在网上看到一些关于 QB 期望导入 .ini 文件的讨论。 (还不知道它期望的格式,但我稍后会解决)

如果您已成功将平面文件从 mySQL 导入到 Quickbooks 中,或者知道提供见解的链接,请分享您的故事(我是现在没有发现太多)。
[结束编辑]

我意识到这种情况可能不常见,但我需要通过两种方式之一连接到现有的 Quickbooks 数据库。

1) 直接从我们网站上运行的 php 脚本直接将用户提供的数据从网络插入到 Quickbooks。

2)将用户的数据直接放入mySQL数据库,然后将数据从mySQL导出到quickbooks。

如果第一个选项可行,我将不胜感激您对建立与 Quickbooks 数据库的 odbc 连接的想法。

我可以这样做吗:

try {
  $conn = @odbc_connect("DSNName", "", "", "SQL_CUR_USE_ODBC");
  // un and pw parameters are passed as empty strings since the DSN 
  // has knowledge of the password already.
  // 4th parameter is optional

  $exec = @odbc_exec($conn, $insert) or die ("exec error");
  echo "success!";
}
catch (Exception $e) {
  echo $e->getMessage();
} // end try catch

[edit]
We're collecting credit application data from users on a web form.

I have not tied my web form directly into QB.

I have no idea what the QB table structure is for this collection of data - nor of how it displays it to the user because I've never actually worked directly with QB. Others in my office do however.


I would still appreciate any information about open source / free options.


I'll simplify the problem by removing the first desired option.

Let's just talk about importing a flat file into quickbooks.

I don't have a copy of quickbooks that I can play with, so I have no idea what options exist that are native to quickbooks but I see some chatter on the web about QB expecting an .ini file for imports. (don't know the format that it expects yet, but I'll get that worked out later)

Please share your story if you have managed to import a flat file from mySQL into quickbooks or know of links that offer insight (I'm not finding much right now).
[end edit]

I realize that this scenario is probably uncommon, but I need to connect to an existing quickbooks database in one of two ways.

1) either directly from a php script running on our web site -- insert user supplied data directly from web to quickbooks.

or

2) put user's data directly into mySQL database and later export data from mySQL to quickbooks.

If the first option is viable, I would appreciate your thoughts on establishing an odbc connection to the quickbooks database.

can I go about it with something like:

try {
  $conn = @odbc_connect("DSNName", "", "", "SQL_CUR_USE_ODBC");
  // un and pw parameters are passed as empty strings since the DSN 
  // has knowledge of the password already.
  // 4th parameter is optional

  $exec = @odbc_exec($conn, $insert) or die ("exec error");
  echo "success!";
}
catch (Exception $e) {
  echo $e->getMessage();
} // end try catch

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

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

发布评论

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

评论(5

舟遥客 2024-07-21 02:09:43

第三个选项可能适合您。

选项 1 - QODBC:如果您追求简单性,那么上面提到的 Qodbc 是实现此目的的主要产品,而且它确实要花钱。

选项 2 - Quickbooks SDK:如果您可以使用 SDK 并使用其 XML 结构,则可以在开发者网络上找到一些很棒的资源。 SDK 的帐户是免费的,您可以相当轻松地使用它。

这归结为一件事,如果你想要免费的,你可能无法按照你的方式得到它。我上次检查时,QODBC 的价格很合理。

无论采用哪种方法,都需要注意一件事:确保 SDK 和 QODBC 可以使用您希望在 Quickbooks 中写入数据的表。

随着 Quickbooks 的老化,对某些表格的访问已经消失。 例如,无法直接写入工资扣除表,因为它与 Intuit 的工资服务竞争。

选项 3 - 直接 SQL 操作:Intuit 对其 SQL 数据中的数据进行加密,使其无法直接访问。

编辑:选项 4 - Quickbooks Web 连接器 SOAP 包装器位于包含 Quickbooks 的计算机上并与它进行交互。 也是免费的。

祝你好运!

The third option might work for you.

Option 1 - QODBC: If you're looking for simplicity, Qodbc as mentioned above is the main product that does it, and it does cost money.

Option 2 - Quickbooks SDK: If you're okay working through the SDK and using their XML structures, you can find some great resources on the developer network. Accounts are free for the SDK and you can work your way through it fairly easily.

This boils down to one thing, if you want it free, you might not be able to get it your way.. QODBC is reasonably priced the last time I checked.

The one thing that is important to be aware of with either approach -- ensure the tables you wish to write data into in Quickbooks are available by the SDK and QODBC.

As Quickbooks has gotten older, access to some tables have disappeared. For example, it's not possible to write directly to the payroll deductions table directly as it competes with Intuit's Payroll Service.

Option 3 - Direct SQL manipulation: Intuit encrypts their data in their SQL data making it unavailable for direct access.

Edit: Option 4 - Quickbooks Web Connector SOAP wrapper that sits on the computer with Quickbooks and interacts with it for you. Also free.

Good luck!

嗫嚅 2024-07-21 02:09:43

如果您想要 ODBC 访问,QODBC 是您唯一的选择。

较新版本的 QuickBooks Enterprise Edition 使用 SQL 数据库后端,但它不允许直接访问 SQL 表。 他们锁定数据库,因此您实际上无法查询任何数据。

AccessBooks 是另一种选择,它将数据从 QuickBooks 镜像到 MySQL,然后也可以将数据推送回 QuickBooks。 我听说它可能有点不稳定。

您可以使用 QuickBooks SDK 并让它执行您在 QuickBooks GUI 中可以执行的几乎所有操作,但这需要更多的工作。 如果您要将 Web 应用程序与 QuickBooks 集成,您将需要使用 Web 连接器。 我是 QuickBooks/PHP 框架的开发人员,该框架非常稳定且流行,可能会对您有所帮助:

https://idnforums.intuit.com/messageview.aspx?catid=56&threadid=9164

我正在添加对镜像整个 QB 架构的支持到数据库,保持同步,然后允许将更改推送回 QuickBooks。 不过,这项工作还没有接近完成。 目前,它从 QuickBooks 中提取数据并保持同步效果非常好。

您还可以将 IIF 文件导入 QuickBooks,但 Intuit 现在不支持且已弃用这种格式。 他们强烈建议您不要使用它,原因如下:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_integration_methods

If you want ODBC access, QODBC is your only choice.

The newer versions of QuickBooks Enterprise Edition use an SQL database back-end, but it does not allow you to directly access the SQL tables. They lock the database down so you can't actually query any of the data.

AccessBooks is another option, which mirrors data from QuickBooks into MySQL, and then can push data back to QuickBooks as well. I have heard that it can be a bit flaky.

You can use the QuickBooks SDK and make it do pretty much anything you can do in the QuickBooks GUI, but it's a bit more work. If you're integrating a web application with QuickBooks, you'll want to use the Web Connector. I'm the developer of a QuickBooks/PHP framework which is quite stable and popular, and would probably be helpful to you:

https://idnforums.intuit.com/messageview.aspx?catid=56&threadid=9164

I'm in the middle of adding support for mirroring the entire QB schema to a database, keeping it in sync, and then allowing changes to be pushed back to QuickBooks. The work isn't near complete yet though. It currently pulls data from QuickBooks and keeps it in sync remarkably well however.

You can also import IIF files into QuickBooks, but it's now an unsupported and deprecated format by Intuit. They highly recommend you do not use it, here are some reasons why:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_integration_methods

绮烟 2024-07-21 02:09:43

您可能已经看过这个,但如果您还没有看过,您会想看一下,因为它似乎为您的第一个场景提供了要求、设置说明和示例代码。

http://www.qodbc.com/QODBCweb.htm

You may have already seen this but if you haven't you will want to take a look as it seems to provide the requirements, setup instructions, and sample code for your first scenario.

http://www.qodbc.com/QODBCweb.htm

梦年海沫深 2024-07-21 02:09:43

不确定导入到底要完成什么:您要将什么类型的交易推送到快速簿中?

我在使用 QuickBooks SDK 将数据(尤其是交易数据)推送到 QuickBooks 方面取得了巨大成功,以便对帐、发布等事务由 QuickBooks 本身处理。 您可以选择此选项吗?

您可以在此处获取大量有关 SDK 的信息

Not sure exactly what the import is to accomplish: what sort of transactions are you pushing into quickbooks?

I've had great success with using the QuickBooks SDK to push data into quickbooks, especially transactions data so that things like reconciliations, posting, etc are handled by quickbooks itself. Is this an option available to you?

You can get a lot of information on the SDK here

爱殇璃 2024-07-21 02:09:43

QuickBooks Enterprise 2011 改变了这一情况,您可以拥有真正的 ODBC 访问(尽管权限有限且表数量有限),然后使用 SQL 工具通过 ODBC 访问进行映射。

With QuickBooks Enterprise 2011 this changed, and you can have real ODBC access (although with limited rights and to a limited amount of tables) and then use an SQL tool to map via the ODBC access.

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