问题标签 [fdb]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
203 浏览

javascript - 使用 fdb 调试 Adob​​e AIR JavaScript 应用程序不起作用

我一直在尝试找出一种交互式调试 Adob​​e AIR JavaScript 应用程序的方法。似乎没有支持此功能的 IDE(有吗?)。

但是,有 fdb,据此,您可以使用它来调试 Adob​​e AIR 应用程序。它说:

如果 AIR 应用程序基于 SWF,则调试器仅控制 ActionScript 代码的执行。如果 AIR 应用程序是基于 HTML 的,则调试器仅控制 JavaScript 代码的执行。

这听起来很明确,就像通过 fdb 支持 JavaScript 调试一样。

所以,我按照说明进行操作。我在 Windows 7 上,我今天刚刚下载了 AIR SDK (AIR 3.9.0)。有关 fdb 命令的更多信息,请参见此处

所以我按照使用 fdb 调试 AIR 应用程序的说明进行操作。首先,我在终端窗口中启动了 fdb。它启动良好。我输入“运行”并显示“等待播放器连接”。

然后我在另一个终端窗口(“adl simple-html-app.xml”)中通过 adl 启动我的应用程序,然后它启动了。它使用我的 AIR 应用程序启动一个窗口,但未加载内容。我在 fdb 终端窗口中看到了这个:

*播放器已连接;会话开始。

设置断点,然后键入“继续”以恢复会话。[SWF] HelloWorld.html - 解压后 0 字节*

解压后0字节?这立刻让我觉得有些不对劲。它不是 SWF,而是 HTML 文件。

此外,无论我输入什么命令,我都会得到相同的响应。“你想尝试停止执行吗?(是或否)。” 而且无论我如何回应,应用程序仍然“挂起”,似乎没有执行任何代码?

这是一个示例会话。我的命令以粗体显示,fdb 响应以斜体显示。

信息来源
你想尝试停止执行吗?(y 或 n)y
试图停止。
为了提供帮助,请尝试轻推播放器(例如按下按钮)

{hit enter}
您想尝试停止执行吗?(是或否)
未确认。

继续
您想尝试停止执行吗?(y or n) {回车}
未确认。
{hit enter}
你想尝试停止执行吗?(y or n) {回车}
未确认。
继续
您想尝试停止执行吗?(y or n) {回车}
未确认。
继续
您想尝试停止执行吗?(是或否) n
未确认。
继续
您想尝试停止执行吗?(y 或 n)
y
试图停止。
为了提供帮助,请尝试轻推播放器(例如按下按钮)

我错过了一步吗?如何让命令行调试工作?

-乔什

0 投票
1 回答
1774 浏览

python-2.7 - 未找到具有“fb_interpret”功能的 FDB 驱动程序 Firebird

我正在使用带有 FDB 1.4 驱动程序的 windows 2003 + Python 2.7 + firebird 2.1。

在 windows XP 中工作正常,但在 windows 2003 中,我的脚本出现错误。

我刚刚在网上发现 1 波兰语有同样的错误。

http://forum.4programmers.net/Inne/221792-python_27firebird156_jaki_sterownik_do_takiego_zestawienia_w_windows7_x86

有任何想法吗?

0 投票
2 回答
1387 浏览

python - SQLAlchemy: successful insertion but then raises an exception

I am running SQLAlchemy against FirebirdSQL, and when I execute an insert command in my project, SQLAlchemy is raising an exception on returning from executing against the connection. However, the insert query is being constructed and executed successfully. Querying the database shows that the items are actually being inserted correctly.

Edit: I'm digging down into the fbcore.py module now, and checking the value of value and vartype indicates that the issue is probably how the SEQUENCE item used to generate the primary key ID is returning its data is at issue. The vartype is SQL_LONG, but the actual value is [<an integer>] where <an integer> is the value returned by a sequence generator I created to auto-increment the primary key (e.g. [14]). This suggests to me that the problem should be resolved by fixing that, though I'm not sure how to do it. The generator appears to be working correctly within the database itself, but causing problems when returned to SQLAlchemy.

See below for my existing implementation and the stack trace for details.

My code:

The traceback:

I'm not yet sufficiently familiar with SQLAlchemy's to see why this is an issue; the style of my statement is pretty much identical to that in the tutorial. This appears to be an issue with how the parameters are being passed – possibly something about using a dict rather than keyword arguments? But there's nothing in the docs on how to handle parameters that suggests I have anything amiss here – it seems right from what I'm seeing there.

I've also tried this with self.table.insert().values(values) rather than passing the values term to the execute method, with the same results (as I would expect).

Edit: I note from reading the docstring on execute in fbcore.py that it raises a TypeError when the parameters passed to the method are not given either as a list or a tuple. Is this a change that is not yet reflected in the documentation?

Edit 2: As a comment notes, the stack trace indicates that it's running against the kinterbasdb driver, though I have explicitly configured the engine to run using fdb. This is also confusing to me.

0 投票
0 回答
482 浏览

ios - AIR 版本更新后 Haxe/NME 游戏在 iOS 设备上失败

所以,我继承了一个具有以下设置的游戏项目:

  • 游戏本身的核心 SWF,使用 Haxe (3.0)/NME (4.0.2) 编写,利用 Starling 框架,使用 FlashDevelop 编译为 Flash 目标
  • 处理各种设备通信需求的 AS3 包装器(例如检测设备功能、管理手机锁定状态和暂停游戏/静音音乐等)。这被编译成自己的 SWF (AIR 3.6),这是实际启动的,随后加载“核心”SWF 并将其添加到舞台。
  • 该 AS3 SWF 随后使用 ADT(也是 AIR 3.6)与其资产(包括核心 SWF)一起打包成目标格式 (APK/IPA)。

尽管有一些奇怪的复杂性,但整个事情运行得很好。我们创建了功能性、可用的应用程序,这些应用程序 a) 可在 Android 和 iOS 设备上运行,并且 b) 通过提交标准。

快进几个月;该游戏现已通过测试版,并准备好首次发布。安卓,一切顺利。另一方面,iOS……就在我们尝试将 1.0 上传到 iTunes Connect 的前几天,Apple 改变了他们的要求。突然,我们收到错误消息“提交到 App Store 的应用程序和应用程序更新必须使用 Xcode 5.1.1 或更高版本以及 iOS 7 SDK 或更高版本的公共 (GM) 版本构建。不要提交使用 beta 构建的应用程序软件。” 好吧,这个错误在 9 月份让许多开发人员感到困惑。最终 Adob​​e 发布了 AIR 15,打包的 IPA 再次满足了苹果的提交要求。

不幸的是,更新到 AIR 15 扰乱了小程序。我们现在可以上传 IPA,但具有讽刺意味的是,它无法在 iOS 设备上运行。加载屏幕(由纯 AS3“包装”SWF 生成)出现,但是当标题屏幕(由“核心”SWF 生成)应该出现时,什么都没有。黑屏,没有活动,或者(在以后的一些尝试中),即时,无消息的应用程序消失)。在 iOS 控制台上没有产生错误,在 FDB 中单步执行应用程序时没有发生任何不愉快的事情(直到应用程序消失并且 FDB 失去与远程主机的连接)。

其他重要信息:

我已经尝试更新过程中涉及的每个组件,包括 AIR 15 和 16 beta 的各种更新。所有列出的 haxelib。我们甚至尝试将“核心”项目(以最粗略的方式)移植到 OpenFL。所有这些都导致了适用于 Windows(桌面,而不是手机)的版本,适用于 Android,但不适用于 iOS。

Haxelib 库: 原始:

额外美味的崩溃:

tl;dr:旧版本的 AIR 应用程序可在 iOS 上运行,但无法提交到 iTunes。可以提交新版本,但在 iOS 上不起作用(导致死机黑屏或崩溃)

任何帮助——关于问题可能是什么的建议,我们可能能够找出问题的其他方法,甚至是通过提交阻塞(例如重新签名)获得工作应用程序的方法——将不胜感激。目前,不得不在其他框架等中重新设计整个游戏是一个非常站不住脚的解决方案。对于一家非常有前途的独立游戏开发公司来说,这基本上是生死攸关的局面。

0 投票
1 回答
1097 浏览

python - Python 3 + FDB:UnicodeDecodeError

我想连接到使用 cp1251 的 Firebird 2.1 DB,执行一条语句并得到结果。这就是我所做的:

cur.execute(select)因错误而中断UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 0: unexpected end of data
我想知道两件事:

  1. 我如何摆脱错误
  2. WIN1251在访问编码数据库的上下文中,Python 3 主要与 Unicode 一起工作是否危险?如果是这样,请指导我一些关于我应该做什么/避免/等的事情。

对于@VivekSable 问题:就在错误之前,select变量包含以下字符串:
SELECT ZONE FROM ZONES WHERE ZONE_NAME LIKE 'Краснодарский кр%' AND ZONE < 600000 AND ZONE NAME CONTAINING 'СПС'

0 投票
0 回答
495 浏览

python - Python,FDB - 火鸟超时

我正在用 python 和模块 fdb ( http://pythonhosted.org//fdb/index.html ) 编写一个小脚本,它从 firebird 数据库中读取数据,然后将其写入 postgres 数据库。(使用 psycopg2 模块)

一切正常,除了一件事,如果我有来自 firebird 数据库的查询并且连接中断程序挂起,因为没有超时。

我已经搜索了 fdb 文档,但没有选项。

我如何为我的 sql 查询添加超时?或者实现这一点的最佳方法是什么?

0 投票
1 回答
404 浏览

python - Python 3.5.1 和 fdb 1.5.1 - fdb.fbcore.Cursor 对象位于 0x00175BB0

我尝试用 Python 编写脚本,谁:

  • 连接到火鸟数据库

  • 在连接的数据库中执行选择

  • 通过 SELECT 为数据库 rerutn 中的每个结果记录发送电子邮件。

我使用:Windows Vista x64 SP2,Python 版本 3.5.1,firebird 驱动程序 fdb 1.5.1。

使用以下脚本后,我收到电子邮件:fdb.fbcore.Cursor object at 0x00175BB0

请提出建议。

0 投票
1 回答
280 浏览

ubuntu - 如何在 64 位系统上恢复或连接 32 位系统数据的数据库?

在 64 位 Ubuntu 系统上使用 firebird 连接到 bak 文件时,由于文件无效,我收到错误消息。但可能是因为系统的位问题。因为我在我的 Ubuntu 32 位系统上连接了同一个数据库。那么在这里我该怎么办?有什么方法可以在 32 位机器上转换 64 位文件。

0 投票
0 回答
376 浏览

database - FDB文件扩展名可能是什么数据库?

我有一个fdb文件,我以为是firebird数据库文件,但是用firebird打不开,我又试了sybase,不行。此文件用于 B/S 软件 (java) 客户端缓存,可能是相当旧的数据库,而且这不是压缩文件,我可以看到文件中的可能字符串,文件开头为:

10 00 00 00 00 40 00 40 00 00 00 00 00 00 04 00

有什么建议吗?

这是文件,请查看 https://www.dropbox.com/s/qorhd21f328pfj2/PRINT_TEMPLATE_CACHE.fdb?dl=0

0 投票
1 回答
804 浏览

python - 如何通过 Python 3.5 从 Firebird 2.5 获取 pdf/jpg 文件?

我使用 Python 3.5 来完成这个任务 + 库 fdb。我的脚本:

尝试保存文件后,我收到错误:

UnicodeDecodeError:“charmap”编解码器无法解码位置 578 中的字节 0x98:字符映射到 <undefined>

数据库中的编码字段:Win-1251 类型:Blob。

我该如何解决?