all groups > sql server dts > february 2006 >
You're in the

sql server dts

group:

Problem with Decimal variable parameters in the DTS package


Problem with Decimal variable parameters in the DTS package Burak Gunay
2/20/2006 12:32:29 PM
sql server dts: Hello,

I have a DTS package that copies data from a sql server db to a visual
fox pro file. The visual fox pro version we are using is very old
(2.6a), and we actually use dbase 4
drivers to copy data to it.

In the create table statement in the dts package, we define decimal
variables as being (6,4) long ie.. having at most 4 values after the
period ex: 1.1111

But when the data is copied, the decimal variables in the table are
created as being (20,5).

Why is this? is this some kind of default?

Any help will be appreciated.

Thanks,

Burak
Re: Problem with Decimal variable parameters in the DTS package Allan Mitchell
2/20/2006 3:37:51 PM
Hello Burak,

This should be a feature of the driver not DTS I think. If the destination
is already defined then I can see no reason that DTS would change it. Or
are you saying that You issue the CREATE TABLE through DTS and then look
in Foxpro and the definition is not what you asked for?



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

[quoted text, click to view]

Re: Problem with Decimal variable parameters in the DTS package Burak Gunay
2/21/2006 6:55:14 AM

Hi Allan,

Yes, I am issuing a CREATE TABLE through DTS. I have to because if I
don't drop and recreate the table, then the data in the sql server
table just gets appended to the end of the dbf file, which results in
duplicate data.

I tried replacing the DROP TABLE command in the DTS package with
TRUNCATE TABLE but it does not let me.

And after dts creates the table, the decimal fields are all getting
set to (20,5).

Let me know if you have an ideas.

Thanks,

Burak
Re: Problem with Decimal variable parameters in the DTS package Allan Mitchell
2/21/2006 4:32:39 PM
Hello Burak,

Are you therefore lookin for the ZAP command?

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

[quoted text, click to view]

Re: Problem with Decimal variable parameters in the DTS package Burak Gunay
2/22/2006 6:44:51 AM
Hi Allan,

I tried typing ZAP into the dts package but when I run it, it complains
that it doesn't recognize that keyword.

The weird thing is even executing DELETE in the dts pacakage doesn't
seem to work on the old version of fox pro (2.6a) that I am using.

The only thing that works is dropping and recreating the table, which
messes up the numeric fields
ex: even though a numeric field is defined as a decimal(6,4) in the dts
package, when the table gets recreated, it gets set to (20,5) for some
reason.

If you have any ideas let me know please.

Burak
AddThis Social Bookmark Button