dbTalk Databases Forums  

Problem with Decimal variable parameters in the DTS package

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


Discuss Problem with Decimal variable parameters in the DTS package in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Burak Gunay
 
Posts: n/a

Default Problem with Decimal variable parameters in the DTS package - 02-20-2006 , 02:32 PM






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


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Problem with Decimal variable parameters in the DTS package - 02-20-2006 , 05:37 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

Quote:
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




Reply With Quote
  #3  
Old   
Burak Gunay
 
Posts: n/a

Default Re: Problem with Decimal variable parameters in the DTS package - 02-21-2006 , 08:55 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


Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Problem with Decimal variable parameters in the DTS package - 02-21-2006 , 06:32 PM



Hello Burak,

Are you therefore lookin for the ZAP command?

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

Quote:
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




Reply With Quote
  #5  
Old   
Burak Gunay
 
Posts: n/a

Default Re: Problem with Decimal variable parameters in the DTS package - 02-22-2006 , 08:44 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


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.