dbTalk Databases Forums  

DTSTransformCopy: Schema validation failed

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


Discuss DTSTransformCopy: Schema validation failed in the microsoft.public.sqlserver.dts forum.



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

Default DTSTransformCopy: Schema validation failed - 06-17-2005 , 11:46 AM






Hi,

I am doing a DTS transformation from SQL Server table to Access table
in my ASP page. When the DTS Package runs from ASP Page, I get the
following error:

Microsoft Data Transformation Services (DTS) Data Pump error '80042025'

DTSTransformCopy: Schema validation failed; see Extended Error
information.

The code I am doing to do transformation is below:


ExceptionFileName = Server.MapPath("\temp\Exceptions.mdb")

'--- Declare the DTS objects
Dim objPackage, objTask, objStep, objDataPump, objTransform,
objConnectDest, objConnectSrc

'--- Create the DTS Package
Set objPackage = Server.CreateObject("DTS.Package2")

--- Create our connection to the database
Set objConnectSrc = objPackage.Connections.New("SQLOLEDB.1")
With objConnectSrc
.ID = 1
.DataSource = "servername"
.Password = "password"
.UserID = "userid"
End With
objPackage.Connections.Add objConnectSrc

'--- Create our connection to source database/file
Set objConnectDest =
objPackage.Connections.New("Microsoft.Jet.OLEDB.4. 0")
With objConnectDest
.ID = 2
.DataSource = ExceptionFileName
End With
objPackage.Connections.Add objConnectDest


'--- Add our datapump step and task to the package
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSDataPumpTask")
Set objDataPump = objTask.CustomTask
objDataPump.Name = "DataPumpTask"
With objStep
.Name = "DataPumpStep"
.TaskName = objDataPump.Name
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep

'--- Set our datapumptask parameters up
With objDataPump
.SourceConnectionID = 1
.DestinationConnectionID = 2
.SourceObjectName = "[webdb][dbo].[Exceptions]"
.DestinationObjectName = "Exceptions"
End With
objPackage.Tasks.Add objTask

'Create and add the transformation.
Set objTransform =
objDataPump.Transformations.New("DTS.DataPumpTrans formCopy")
objTransform.Name = "Transform"
objTransform.TransformFlags = DTSTransformFlag_AllowLosslessConversion
objDataPump.Transformations.Add objTransform
objPackage.FailOnError = True

strRes = ""

objPackage.Execute
bDTSresult = "True"


Now, when I go through designer, and creates a DTS Package with simple
one on one transformation and run it, the package runs fine. It is just
not running through my code.

Any help would be really appreciated. What is the problem here and how
can I fix it? How do I see the extended error details?

Thanks,
Boris


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

Default Re: DTSTransformCopy: Schema validation failed - 06-18-2005 , 06:11 AM






Why do you need to builid the package each time? Can you not build a pckage
in designer and call that? You can change properties in your package no
problems.

Where are your SourceColumns and DestinationColums?

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote

Quote:
Hi,

I am doing a DTS transformation from SQL Server table to Access table
in my ASP page. When the DTS Package runs from ASP Page, I get the
following error:

Microsoft Data Transformation Services (DTS) Data Pump error '80042025'

DTSTransformCopy: Schema validation failed; see Extended Error
information.

The code I am doing to do transformation is below:


ExceptionFileName = Server.MapPath("\temp\Exceptions.mdb")

'--- Declare the DTS objects
Dim objPackage, objTask, objStep, objDataPump, objTransform,
objConnectDest, objConnectSrc

'--- Create the DTS Package
Set objPackage = Server.CreateObject("DTS.Package2")

--- Create our connection to the database
Set objConnectSrc = objPackage.Connections.New("SQLOLEDB.1")
With objConnectSrc
.ID = 1
.DataSource = "servername"
.Password = "password"
.UserID = "userid"
End With
objPackage.Connections.Add objConnectSrc

'--- Create our connection to source database/file
Set objConnectDest =
objPackage.Connections.New("Microsoft.Jet.OLEDB.4. 0")
With objConnectDest
.ID = 2
.DataSource = ExceptionFileName
End With
objPackage.Connections.Add objConnectDest


'--- Add our datapump step and task to the package
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSDataPumpTask")
Set objDataPump = objTask.CustomTask
objDataPump.Name = "DataPumpTask"
With objStep
.Name = "DataPumpStep"
.TaskName = objDataPump.Name
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep

'--- Set our datapumptask parameters up
With objDataPump
.SourceConnectionID = 1
.DestinationConnectionID = 2
.SourceObjectName = "[webdb][dbo].[Exceptions]"
.DestinationObjectName = "Exceptions"
End With
objPackage.Tasks.Add objTask

'Create and add the transformation.
Set objTransform =
objDataPump.Transformations.New("DTS.DataPumpTrans formCopy")
objTransform.Name = "Transform"
objTransform.TransformFlags = DTSTransformFlag_AllowLosslessConversion
objDataPump.Transformations.Add objTransform
objPackage.FailOnError = True

strRes = ""

objPackage.Execute
bDTSresult = "True"


Now, when I go through designer, and creates a DTS Package with simple
one on one transformation and run it, the package runs fine. It is just
not running through my code.

Any help would be really appreciated. What is the problem here and how
can I fix it? How do I see the extended error details?

Thanks,
Boris




Reply With Quote
  #3  
Old   
Boris
 
Posts: n/a

Default Re: DTSTransformCopy: Schema validation failed - 06-19-2005 , 02:41 PM



Allan,

I need to build a new package every time because I do not know what the
source table structure looks like. The source table may have different
number of columns each time. Based on what source table is, I create a
destination table dynamically. That is why I can not have a package in
the designer because I do not know what columns should be mapped.

Any suggestions?

Thanks,
Boris

Allan Mitchell wrote:
Quote:
Why do you need to builid the package each time? Can you not build a pckage
in designer and call that? You can change properties in your package no
problems.

Where are your SourceColumns and DestinationColums?

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote in message
news:1119026790.472276.37870 (AT) o13g2000cwo (DOT) googlegroups.com...
Hi,

I am doing a DTS transformation from SQL Server table to Access table
in my ASP page. When the DTS Package runs from ASP Page, I get the
following error:

Microsoft Data Transformation Services (DTS) Data Pump error '80042025'

DTSTransformCopy: Schema validation failed; see Extended Error
information.

The code I am doing to do transformation is below:


ExceptionFileName = Server.MapPath("\temp\Exceptions.mdb")

'--- Declare the DTS objects
Dim objPackage, objTask, objStep, objDataPump, objTransform,
objConnectDest, objConnectSrc

'--- Create the DTS Package
Set objPackage = Server.CreateObject("DTS.Package2")

--- Create our connection to the database
Set objConnectSrc = objPackage.Connections.New("SQLOLEDB.1")
With objConnectSrc
.ID = 1
.DataSource = "servername"
.Password = "password"
.UserID = "userid"
End With
objPackage.Connections.Add objConnectSrc

'--- Create our connection to source database/file
Set objConnectDest =
objPackage.Connections.New("Microsoft.Jet.OLEDB.4. 0")
With objConnectDest
.ID = 2
.DataSource = ExceptionFileName
End With
objPackage.Connections.Add objConnectDest


'--- Add our datapump step and task to the package
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSDataPumpTask")
Set objDataPump = objTask.CustomTask
objDataPump.Name = "DataPumpTask"
With objStep
.Name = "DataPumpStep"
.TaskName = objDataPump.Name
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep

'--- Set our datapumptask parameters up
With objDataPump
.SourceConnectionID = 1
.DestinationConnectionID = 2
.SourceObjectName = "[webdb][dbo].[Exceptions]"
.DestinationObjectName = "Exceptions"
End With
objPackage.Tasks.Add objTask

'Create and add the transformation.
Set objTransform =
objDataPump.Transformations.New("DTS.DataPumpTrans formCopy")
objTransform.Name = "Transform"
objTransform.TransformFlags = DTSTransformFlag_AllowLosslessConversion
objDataPump.Transformations.Add objTransform
objPackage.FailOnError = True

strRes = ""

objPackage.Execute
bDTSresult = "True"


Now, when I go through designer, and creates a DTS Package with simple
one on one transformation and run it, the package runs fine. It is just
not running through my code.

Any help would be really appreciated. What is the problem here and how
can I fix it? How do I see the extended error details?

Thanks,
Boris



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

Default Re: DTSTransformCopy: Schema validation failed - 06-19-2005 , 03:54 PM



OK so you need to do this dynamically. You can of course let the package do
this for you. Granted it is "code heavy".

Send us a mail and I'll send you an example of doing this

Take a Query from a DP task
Build the Excel Table
Reconstruct the DataPump task

I would post here but wrapping and size would destroy the meaning.



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote

Quote:
Allan,

I need to build a new package every time because I do not know what the
source table structure looks like. The source table may have different
number of columns each time. Based on what source table is, I create a
destination table dynamically. That is why I can not have a package in
the designer because I do not know what columns should be mapped.

Any suggestions?

Thanks,
Boris

Allan Mitchell wrote:
Why do you need to builid the package each time? Can you not build a
pckage
in designer and call that? You can change properties in your package no
problems.

Where are your SourceColumns and DestinationColums?

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new
stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote in message
news:1119026790.472276.37870 (AT) o13g2000cwo (DOT) googlegroups.com...
Hi,

I am doing a DTS transformation from SQL Server table to Access table
in my ASP page. When the DTS Package runs from ASP Page, I get the
following error:

Microsoft Data Transformation Services (DTS) Data Pump error '80042025'

DTSTransformCopy: Schema validation failed; see Extended Error
information.

The code I am doing to do transformation is below:


ExceptionFileName = Server.MapPath("\temp\Exceptions.mdb")

'--- Declare the DTS objects
Dim objPackage, objTask, objStep, objDataPump, objTransform,
objConnectDest, objConnectSrc

'--- Create the DTS Package
Set objPackage = Server.CreateObject("DTS.Package2")

--- Create our connection to the database
Set objConnectSrc = objPackage.Connections.New("SQLOLEDB.1")
With objConnectSrc
.ID = 1
.DataSource = "servername"
.Password = "password"
.UserID = "userid"
End With
objPackage.Connections.Add objConnectSrc

'--- Create our connection to source database/file
Set objConnectDest =
objPackage.Connections.New("Microsoft.Jet.OLEDB.4. 0")
With objConnectDest
.ID = 2
.DataSource = ExceptionFileName
End With
objPackage.Connections.Add objConnectDest


'--- Add our datapump step and task to the package
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSDataPumpTask")
Set objDataPump = objTask.CustomTask
objDataPump.Name = "DataPumpTask"
With objStep
.Name = "DataPumpStep"
.TaskName = objDataPump.Name
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep

'--- Set our datapumptask parameters up
With objDataPump
.SourceConnectionID = 1
.DestinationConnectionID = 2
.SourceObjectName = "[webdb][dbo].[Exceptions]"
.DestinationObjectName = "Exceptions"
End With
objPackage.Tasks.Add objTask

'Create and add the transformation.
Set objTransform =
objDataPump.Transformations.New("DTS.DataPumpTrans formCopy")
objTransform.Name = "Transform"
objTransform.TransformFlags = DTSTransformFlag_AllowLosslessConversion
objDataPump.Transformations.Add objTransform
objPackage.FailOnError = True

strRes = ""

objPackage.Execute
bDTSresult = "True"


Now, when I go through designer, and creates a DTS Package with simple
one on one transformation and run it, the package runs fine. It is just
not running through my code.

Any help would be really appreciated. What is the problem here and how
can I fix it? How do I see the extended error details?

Thanks,
Boris





Reply With Quote
  #5  
Old   
Boris
 
Posts: n/a

Default Re: DTSTransformCopy: Schema validation failed - 06-20-2005 , 10:58 AM



Allan,

Thanks again. My email address is supermanreloaded at gmail dot com.

I would appreciate for your help,

Thanks,
Boris

Allan Mitchell wrote:
Quote:
OK so you need to do this dynamically. You can of course let the package do
this for you. Granted it is "code heavy".

Send us a mail and I'll send you an example of doing this

Take a Query from a DP task
Build the Excel Table
Reconstruct the DataPump task

I would post here but wrapping and size would destroy the meaning.



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote in message
news:1119210076.745104.307200 (AT) o13g2000cwo (DOT) googlegroups.com...
Allan,

I need to build a new package every time because I do not know what the
source table structure looks like. The source table may have different
number of columns each time. Based on what source table is, I create a
destination table dynamically. That is why I can not have a package in
the designer because I do not know what columns should be mapped.

Any suggestions?

Thanks,
Boris

Allan Mitchell wrote:
Why do you need to builid the package each time? Can you not build a
pckage
in designer and call that? You can change properties in your package no
problems.

Where are your SourceColumns and DestinationColums?

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new
stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote in message
news:1119026790.472276.37870 (AT) o13g2000cwo (DOT) googlegroups.com...
Hi,

I am doing a DTS transformation from SQL Server table to Access table
in my ASP page. When the DTS Package runs from ASP Page, I get the
following error:

Microsoft Data Transformation Services (DTS) Data Pump error '80042025'

DTSTransformCopy: Schema validation failed; see Extended Error
information.

The code I am doing to do transformation is below:


ExceptionFileName = Server.MapPath("\temp\Exceptions.mdb")

'--- Declare the DTS objects
Dim objPackage, objTask, objStep, objDataPump, objTransform,
objConnectDest, objConnectSrc

'--- Create the DTS Package
Set objPackage = Server.CreateObject("DTS.Package2")

--- Create our connection to the database
Set objConnectSrc = objPackage.Connections.New("SQLOLEDB.1")
With objConnectSrc
.ID = 1
.DataSource = "servername"
.Password = "password"
.UserID = "userid"
End With
objPackage.Connections.Add objConnectSrc

'--- Create our connection to source database/file
Set objConnectDest =
objPackage.Connections.New("Microsoft.Jet.OLEDB.4. 0")
With objConnectDest
.ID = 2
.DataSource = ExceptionFileName
End With
objPackage.Connections.Add objConnectDest


'--- Add our datapump step and task to the package
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSDataPumpTask")
Set objDataPump = objTask.CustomTask
objDataPump.Name = "DataPumpTask"
With objStep
.Name = "DataPumpStep"
.TaskName = objDataPump.Name
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep

'--- Set our datapumptask parameters up
With objDataPump
.SourceConnectionID = 1
.DestinationConnectionID = 2
.SourceObjectName = "[webdb][dbo].[Exceptions]"
.DestinationObjectName = "Exceptions"
End With
objPackage.Tasks.Add objTask

'Create and add the transformation.
Set objTransform =
objDataPump.Transformations.New("DTS.DataPumpTrans formCopy")
objTransform.Name = "Transform"
objTransform.TransformFlags = DTSTransformFlag_AllowLosslessConversion
objDataPump.Transformations.Add objTransform
objPackage.FailOnError = True

strRes = ""

objPackage.Execute
bDTSresult = "True"


Now, when I go through designer, and creates a DTS Package with simple
one on one transformation and run it, the package runs fine. It is just
not running through my code.

Any help would be really appreciated. What is the problem here and how
can I fix it? How do I see the extended error details?

Thanks,
Boris




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

Default Re: DTSTransformCopy: Schema validation failed - 06-20-2005 , 01:39 PM



on its way

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote

Quote:
Allan,

Thanks again. My email address is supermanreloaded at gmail dot com.

I would appreciate for your help,

Thanks,
Boris

Allan Mitchell wrote:
OK so you need to do this dynamically. You can of course let the package
do
this for you. Granted it is "code heavy".

Send us a mail and I'll send you an example of doing this

Take a Query from a DP task
Build the Excel Table
Reconstruct the DataPump task

I would post here but wrapping and size would destroy the meaning.



--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new
stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote in message
news:1119210076.745104.307200 (AT) o13g2000cwo (DOT) googlegroups.com...
Allan,

I need to build a new package every time because I do not know what the
source table structure looks like. The source table may have different
number of columns each time. Based on what source table is, I create a
destination table dynamically. That is why I can not have a package in
the designer because I do not know what columns should be mapped.

Any suggestions?

Thanks,
Boris

Allan Mitchell wrote:
Why do you need to builid the package each time? Can you not build a
pckage
in designer and call that? You can change properties in your package
no
problems.

Where are your SourceColumns and DestinationColums?

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new
stuff.
www.konesans.com - Consultancy from the people who know


"Boris" <supermanreloaded (AT) gmail (DOT) com> wrote in message
news:1119026790.472276.37870 (AT) o13g2000cwo (DOT) googlegroups.com...
Hi,

I am doing a DTS transformation from SQL Server table to Access
table
in my ASP page. When the DTS Package runs from ASP Page, I get the
following error:

Microsoft Data Transformation Services (DTS) Data Pump error
'80042025'

DTSTransformCopy: Schema validation failed; see Extended Error
information.

The code I am doing to do transformation is below:


ExceptionFileName = Server.MapPath("\temp\Exceptions.mdb")

'--- Declare the DTS objects
Dim objPackage, objTask, objStep, objDataPump, objTransform,
objConnectDest, objConnectSrc

'--- Create the DTS Package
Set objPackage = Server.CreateObject("DTS.Package2")

--- Create our connection to the database
Set objConnectSrc = objPackage.Connections.New("SQLOLEDB.1")
With objConnectSrc
.ID = 1
.DataSource = "servername"
.Password = "password"
.UserID = "userid"
End With
objPackage.Connections.Add objConnectSrc

'--- Create our connection to source database/file
Set objConnectDest =
objPackage.Connections.New("Microsoft.Jet.OLEDB.4. 0")
With objConnectDest
.ID = 2
.DataSource = ExceptionFileName
End With
objPackage.Connections.Add objConnectDest


'--- Add our datapump step and task to the package
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSDataPumpTask")
Set objDataPump = objTask.CustomTask
objDataPump.Name = "DataPumpTask"
With objStep
.Name = "DataPumpStep"
.TaskName = objDataPump.Name
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep

'--- Set our datapumptask parameters up
With objDataPump
.SourceConnectionID = 1
.DestinationConnectionID = 2
.SourceObjectName = "[webdb][dbo].[Exceptions]"
.DestinationObjectName = "Exceptions"
End With
objPackage.Tasks.Add objTask

'Create and add the transformation.
Set objTransform =
objDataPump.Transformations.New("DTS.DataPumpTrans formCopy")
objTransform.Name = "Transform"
objTransform.TransformFlags =
DTSTransformFlag_AllowLosslessConversion
objDataPump.Transformations.Add objTransform
objPackage.FailOnError = True

strRes = ""

objPackage.Execute
bDTSresult = "True"


Now, when I go through designer, and creates a DTS Package with
simple
one on one transformation and run it, the package runs fine. It is
just
not running through my code.

Any help would be really appreciated. What is the problem here and
how
can I fix it? How do I see the extended error details?

Thanks,
Boris






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.