如何使用DBASE IV表DELETE命令 [英] How to use DBASE IV table DELETE command

查看:83
本文介绍了如何使用DBASE IV表DELETE命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

dBase需要在DELETE命令后发送PACK命令。



有没有办法使用ADO Recordset并删除dBase中的记录table?



(我正在使用C#语言和ODBC连接字符串。)

PLS查看我的代码



dBase requires a "PACK" command be sent after the "DELETE" command.

Is there a way to use ADO Recordset and to delete records from a dBase table ?

(I am useing C# Language and ODBC Connection String.)
PLS SEE MY CODE

Thanks.

推荐答案

我认为命令文本不正确。您需要使用DSN连接到Dbase文件,并使用带有ODBC连接对象的

DSN在表上执行delete和pack命令。此外,您需要使用delete命令指定表名,例如:



表名中删除* where fac_code ='123whatever'
I believe the command text is incorrect. you need to connect to the Dbase file using a DSN and use that
DSN with the ODBC connection object to execute delete and pack commands on the table. Also, You need to specify the Table Name with the delete command like :

Delete * from Tablename where fac_code = '123whatever'


不要在几个论坛上发布相同的问题: ODBC到dBase,删除的行 [ ^ ]

请尝试了解他们想要告诉你的内容。引用的文章非常清楚,包含一些有用的链接。再读一遍: http://geekswithblogs.net/THines01/archive/2010/03/23/ packdbf.aspx [ ^ ]

最重要的是: DBF驱动程序实际上不会从数据源中删除记录 - 它只会将它们标记为删除,因此需要使用 pack 命令。
Do not post the same question on several forums: ODBC to dBase with deleted row[^]
Please, try to understand what they want to tell you. The referenced article is quite clear and contains few helpful links. Read it again: http://geekswithblogs.net/THines01/archive/2010/03/23/packdbf.aspx[^]
The most important is: the DBF driver does not ACTUALLY delete records from the data source -- it only marks them for deletion, so there is a need to use pack command.


这篇关于如何使用DBASE IV表DELETE命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆