How to delete records from DataFlex table? |
Author |
Message |
|
Posted : 2007-08-17 09:06:31 |
When I try to delete the records in the dataflex table through MS Access Linked table, I am getting the below error.
ODBC--delete on a linked table 'ORDER' failed
[Flex/ODBC][FLEXERR] Record not found ( #25)
DELETE FROM [ORDER]; is the query I am using for delete.
Thanks
Jambai
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-08-17 10:20:50 |
The error is indicating a record number was not found becuase no condition (where) was specified. The normal syntax is:
Delete FROM ORDER where Record_Number=4000 |
|
|
|
|
Posted : 2007-08-18 04:21:54 |
I am getting the same error message with the below query too
DELETE ORDER.* FROM [ORDER] WHERE (((ORDER.RECORD_NUMBER)=132095));
or
DELETE FROM [ORDER] WHERE (((ORDER.RECORD_NUMBER)=132095));
The record is there in the database. I can able to see the record using a select query.
Thanks
Jambai
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-08-18 08:32:45 |
Here I'm using the sample ALLHITS database that is supplied with FlexODBC and accessed through the DataFlex Test32 DSN to delete the last record (or row) in the table.
Delete FROM ALLHITS where Record_Number=3075
You might need to check that ORDER.DAT isn't a read only file. Files often become read only when they are copied from a CD-ROM. |
|
|
|
|
Posted : 2007-08-18 10:22:49 |
Thanks Tom. But I am unable to connect the VB Demo. Please let me know how to connect this.
ORDER.DAT is not readonly. And I am copying this file from my network drive and more over no one is accessing at that time of I copied. I can able to delete most of the records. The same error occurs with some records only. eventhoguh the records are available in the table. The same problem is happening with every othe table. Please let me know.
Thanks
Jambai
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-08-18 14:19:08 |
|
|
|