dbTalk Databases Forums  

DTS deletes against dBase files

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS deletes against dBase files in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim Pokorny
 
Posts: n/a

Default DTS deletes against dBase files - 09-08-2003 , 05:33 AM






I am doing record maintenance on dBase IV files using DTS
packages. (We are updating workstation software package
files with mainframe transactions.)

The insert package works fine, and I have an extract
package that reads the records in the dBase files.

My problem is with the delete package. I use a data
driven query task to delete records. The package runs
successfully, even my extract package shows the deleted
records are gone. But the software package still shows
the deleted record (I checked with a hex editor and they
are indeed still in the dBase file).

It seems like DTS is fooling itself and thinks it has
scratched the records but hasn't.

I tried to add a BEGIN TRAN / COMMIT TRAN in the Delete
Query, but got an invalid systax message, so I don't
think it's supported. (I would like to know for sure if
it isn't though).

Does anyone have any ideas what's going on? Any similar
experiences with Access or Fox Pro?

Reply With Quote
  #2  
Old   
Sue Hoegemeier
 
Posts: n/a

Default Re: DTS deletes against dBase files - 09-08-2003 , 07:37 PM






It's not DTS fooling itself but the nature of how dbase
files work. When you do a delete in dbase, it doesn't
actually remove the row - it just sets an internal flag that
the row is marked as deleted. In dbase, If you want to
recover a deleted row, it's available and the flag just gets
changed. If you want to actually delete and remove the row,
you need to follow with the Pack command which actually
removes the row from the table.
I've seen where some people use ADO to issue the Pack
command...something like the following:
rst.Open "set exclusive on; select * from table; pack"
I don't have any dbase files handy to test it.

-Sue

On Mon, 8 Sep 2003 03:33:54 -0700, "Jim Pokorny"
<jfpokorny (AT) aep (DOT) com> wrote:

Quote:
I am doing record maintenance on dBase IV files using DTS
packages. (We are updating workstation software package
files with mainframe transactions.)

The insert package works fine, and I have an extract
package that reads the records in the dBase files.

My problem is with the delete package. I use a data
driven query task to delete records. The package runs
successfully, even my extract package shows the deleted
records are gone. But the software package still shows
the deleted record (I checked with a hex editor and they
are indeed still in the dBase file).

It seems like DTS is fooling itself and thinks it has
scratched the records but hasn't.

I tried to add a BEGIN TRAN / COMMIT TRAN in the Delete
Query, but got an invalid systax message, so I don't
think it's supported. (I would like to know for sure if
it isn't though).

Does anyone have any ideas what's going on? Any similar
experiences with Access or Fox Pro?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.