Showing posts with label dts. Show all posts
Showing posts with label dts. Show all posts

Monday, March 26, 2012

Error Including null value in a Numeric field

Hi All,

I'm migrating some SQL 2000 DTS to SSIS.

I am transfering data from a DB2 table to a SQL 2005 table using the OLE DB Source, Data Converstion then the OLE DB Destionation.

So, I have a numeric (Precision 3, Scale 2) field with NULL value in the DB2 table.

I'm trying to transfer these data to a SQL2005 table and I am receiving this error message below:

"[Destination Table TFACIL [18]] Error: There was an error with input column "COMB_OPPT_PRCT" (2865) on input "OLE DB Destination Input" (31). The column status returned was: "The value violated the integrity constraints for the column.". "

The field must accept null because of the APPLICATION ( i can't change it, im not the owner ).

Could someone help me?

Thanks in advance.

Regards,

Thiago

Check that the SQL table TFACIL.COMB_OPPT_PRCT

1) Has no CHECK constraints on it that would prevent NULL being loaded

2) is not defined as NOT NULL

Monday, March 19, 2012

Error in sending mails !

I am trying to send email thro DTS using Activex Script.

Here is the code :

'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()
const SMTP_SERVER = "MPBAKOREX01.corp.mphasis.com"

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTP_SERVER
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 90
.Update
End With


With iMsg
Set .Configuration = iConf
.To = "ausrg@.yahoo.com"
.From = "shanmuga.r@.mphasis.com"
.Subject = "TEST"
.HTMLBody = "jfldsajfldk;sajf ;lksadjf;lkasdjlfkjasdlkfjlasdkj flkdsajflsadjf ljasdlf a"
.Send
End With


Main = DTSTaskExecResult_Success
End Function

When i am executing this , i am getting the following error :


Error Source : Microsoft Data Transformation Services (DTS) Package

Error Description : Error Code: 0

Error Source= CDO.Message.1

Error Description: The "SendUsing" configuration value is invalid.

Error on Line 27

How to solve it ?

Hi,

You question has nothing to do with SSIS (or DTS) and more about CDO programming in VBScript. This is SSIS group, I doubt you'll find many CDO experts here.

The best advice you'll get in this forum is to move to SSIS - there is a nice SMTP Mail Task that will likely do what you need.

Regards,
Michael.

|||

ohh Thanks michael

|||Try searching, this will have been answered before on the DTS newsgroup -http://groups.google.com/advanced_search?q=+group%3Amicrosoft.public.sqlserver.dts|||

Hi DarrenSQLIS,

Thanks. But i dont have access to the site which u mentioned. Can you plz details the article in that site ?

:)

Sunday, March 11, 2012

Error in Programming DTS using VB.net

Hi ,

i am using VS.NET 2003 for programming and SQL sever 2005 is my database.

while creating DTS packages,

i am using code as follows

Public Sub Task_Sub4(ByVal goPackage As Object)

Dim oTask As DTS.Task

Dim oLookup As DTS.Lookup

Dim oCustomTask4 As DTS.DataPumpTask2

oTask = CType(goPackage, DTS.Package).Tasks.New("DTSExecuteSQLTask")

oCustomTask4 = CType(oTask.CustomTask, DTS.DataPumpTask2)

oCustomTask4.Name = "Copy Data from contact_info to [content_shriya].[dbo].contact_info] Task"

oCustomTask4.Description = "Copy Data from contact_info to [content_shriya].[dbo].[contact_info] Task"

oCustomTask4.SourceConnectionID = 3

oCustomTask4.SourceSQLStatement = "select * from [Content_management].[dbo].[contact_info]"

oCustomTask4.DestinationConnectionID = 4

oCustomTask4.DestinationObjectName = "[content_shriya].[dbo].[contact_info]"

oCustomTask4.ProgressRowCount = 1000

oCustomTask4.MaximumErrorCount = 0

oCustomTask4.FetchBufferSize = 1

oCustomTask4.UseFastLoad = True

oCustomTask4.InsertCommitSize = 0

oCustomTask4.ExceptionFileColumnDelimiter = "|"

oCustomTask4.ExceptionFileRowDelimiter = vbCrLf

oCustomTask4.AllowIdentityInserts = False

oCustomTask4.FirstRow = 0

oCustomTask4.LastRow = 0

oCustomTask4.FastLoadOptions = 2

oCustomTask4.ExceptionFileOptions = 1

oCustomTask4.DataPumpOptions = 0

'Call oCustomTask4_Trans_Sub1(oCustomTask4)

goPackage.Tasks.Add(oTask)

oCustomTask4 = Nothing

oTask = Nothing

End Sub

But i am geeting error in line

oCustomTask4 = CType(oTask.CustomTask, DTS.DataPumpTask2)

giving error 'System.InvalidCastException'

Additional information: Specified cast is not valid.

i changed it with oCustomTask4 = oTask.CustomTask ,

then also similar error appear.

Please solve my problem, i need to create DTS Packages by using VS.NET 2003 and Database is SQL server 2005.

Thank you

You might have better success posting this in the DTS forum.

I'm not an expert in DTS programming, but since you created oTask as an ExecuteSQLTask, I don't think you can cast it to a DataPumpTask. You need to create it as a DataPumpTask.

|||

Thank you Jhon the code works.

|||Mark the response that was helpful as an answer, please. It helps with searching in the forum.

Wednesday, March 7, 2012

Error in executing a DTS Package from Visual Basic

Hi! Good Day!

I am executing a DTS PAckage from Visual Basic. My code is this:

objPackage.LoadFromSQLServer "SERVER", , , _
DTSSQLStgFlag_UseTrustedConnection, , , , "DTSPackage1"
objPackage.Execute

objPackage.LoadFromSQLServer "SERVER", , , _
DTSSQLStgFlag_UseTrustedConnection, , , , "DTSPackage2"
objPackage.Execute

The first DTS package was executed successfully, but when it hit the second package, an error occurs:

Step 'DTSStep_DTSDataPumpTask_1' already exists in the collection.

Please help.
Thanks.hi

try this

dim objPackage as DTS.Package

set objPackage = new DTS.Package
objPackage.LoadFromSQLServer "SERVER", , , _
DTSSQLStgFlag_UseTrustedConnection, , , , "DTSPackage1"
objPackage.Execute

set objPackage = nothing

set objPackage = new DTS.Package

objPackage.LoadFromSQLServer "SERVER", , , _
DTSSQLStgFlag_UseTrustedConnection, , , , "DTSPackage2"
objPackage.Execute

hope this will solve the problem|||Hi baburajv,

My DTS packages are working well now.
Thank you so much for your help.

God bless :)

Sunday, February 26, 2012

Error in DTS

Hi When I try to convert from Prervasive V8 to SQL using an ODBC connection. I receive the error message..

ParseDisplayName failed: The specified module could not be found.

Could anyone advise what this error is? And/Or how it could be resloved. This is happing when I press actualy try to convert. The wizard will go to that point then stop.

Thanks!

DTS or SSIS? This is an SSIS forum. For DTS questions, please visit:

http://groups.google.com/group/microsoft.public.sqlserver.dts?lnk=srg

Sunday, February 19, 2012

Error in ActiveX script in DTS

Hi,
When i m trying to execute the following function i m getting
Error Message is Invalid Procedure Call or arguement DTSSource

'************************************************* *********************
' Visual Basic Transformation Script
'************************************************* ***********************

' Copy each source column to the destination column
Function Main()
DTSDestination("acct_id") = DTSSource("Account_ID")
DTSDestination("acct_nm") = DTSSource("Account_Name")
DTSDestination("acct_type") = 1
DTSDestination("acct_sts") = DTSSource("Enabled")

Main = DTSTransformStat_OK
End Function

thnks in advanceis DTSDestination("acct_type") of type integer,numeric or decimal?

if not, I think you have to add double quotes around the "1". Hope it helps :)

error importing from AS00

I am trying to transfer with dts a table of As400 into a db sql-server.

But i receave un error (2147217865)

With Access i can import the table with the same ODBC.

You have some suggestion ?

thk by Logan bye bye[posted and mailed, please reply in public]

Logan (logan1577@.hotmail.com) writes:
> I am trying to transfer with dts a table of As400 into a db sql-server.
> But i receave un error (2147217865)
> With Access i can import the table with the same ODBC.
> You have some suggestion ?

There wasn't an text with the error message? You are terribly short on
details, but since I don't use DTS nor know anything about connecting to
AS400, I would not be able to say that much more.

However, I did look up the error code in a book I have, and if the error
comes from the OLE DB provider, the error is "The specified table does not
exist". Whether that refers to the table on the AS400 side or on the
SQL Server side, I don't know.

You probably need to add some deubgging to your DTS package. As I
mentioned I don't use DTS myself, so I cannot really help. But you
could check out the group microsoft.public.sqlserver.dts where the
really sharp DTS people hang out.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Friday, February 17, 2012

Error import/export tables!

Hi,
I am getting " could not create an instance of DTS
package " when i try to import/export tables.
though i reinstalled everything it is happening? how can i
solve it?
pls. guide me.
regards,
Joao SousaSee if this helps:
http://www.databasejournal.com/features/mssql/article.php/1461391#1
--
- Anith
( Please reply to newsgroups only )