排除“已删除”的内容不支持 DELETED() 时的行
我正在尝试在 ColdFusion 中使用一些简单的 DBF 文件。我已使用 dBase 驱动程序在 Windows 中设置了系统 DSN,并已在 ColdFusion Administrator 中成功设置了数据源。我可以毫无问题地对数据源执行常见的 SQL 查询。
我在 DSN 配置中将“显示已删除的行”保留为打开。 (显而易见的答案是更改该设置,但现在让我们假设我不能。)
那么,如何排除在查询中标记为已删除的行呢?从其他地方的信息(例如在 FoxPro 中),您可以使用 DELETED()
函数来查找这些行。但是,如果我在 CF 查询中使用该函数,我会得到
[Macromedia][SequeLink JDBC 驱动程序][ODBC 套接字][Microsoft][ODBC dBase 驱动程序] 表达式中未定义的函数“已删除”。
我已经尝试过这两种技术:
SELECT ID, fName, lName, deleted() AS isDeleted
FROM myTable
SELECT ID, fName, lName
FROM myTable
WHERE NOT deleted('myTable')
是否有另一种方法可以与 ColdFusion 一起使用?还是司机设定了我唯一的希望?
I'm trying to work with some simple DBF files within ColdFusion. I've set up a System DSN in Windows using the dBase driver and have successfully set up the datasource in ColdFusion Administrator. I can do the usual SQL queries against the datasource with no issues.
I've left the "show deleted rows" on in the DSN configuration. (The obvious answer is to change that setting, but for now let's pretend that I can't.)
How, then, do I exclude rows marked as deleted in my queries? From information elsewhere, in FoxPro for instance, you'd use the DELETED()
function to find those rows. However, if I use that function in my CF query I get
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC dBase Driver] Undefined function 'deleted' in expression.
I've tried these two techniques:
SELECT ID, fName, lName, deleted() AS isDeleted
FROM myTable
SELECT ID, fName, lName
FROM myTable
WHERE NOT deleted('myTable')
Is there another way to do it that'll work with ColdFusion? Or is the driver setting my only hope?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,没有一个 dBase ODBC 驱动程序支持
deleted()
或SET DELETED ON |关闭。虽然更改驱动程序配置中的设置是最好的选择,但您也可以尝试使用 FoxPro ODBC 驱动程序,它应该支持deleted() 函数。
您还可以打包 dBase 表,以删除已删除的记录。
As far as I know, none of the dBase ODBC drivers supports
deleted()
orSET DELETED ON | OFF
. While changing the setting in the driver configuration would be the best bet, you could also try to use a FoxPro ODBC driver, which should support the deleted() function.You can also PACK your dBase table, to get rid of your deleted records.