p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 18th, 2003, 06:01 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default converting DTS package from VB 6 to VB .NET

I post it the same question in the SQL Server side, I just did not know where to post it. I am in really need of getting some answer.
I have read many articles to try to fix an error that I am having after converting a DTS packages that was save in VB 6 and later converted into VB .NET

On one article that I read it said that I need it to get SQL Server service Pack 3 for the server and also Service Pack 3 for desktop.
After doing all that I am still having the same problem. I have been struggling with this for quite a while. I am going to post more code to see if it help:



System.InvalidCastException has ocurred at XXXXXX.exe
Specifically in the code at:
oCustomTask1 = oTask.CustomTask
QueryInterface for interface DTS.CustomTask failed

On one article that I read it said that I need it to get SQL Server service Pack 3 for the server and also Service Pack 3 for desktop.
After doing all that I am still having the same problem. I have been struggling with this for quite a while. I am going to post more code to see if it help:

Public Sub Task_Sub1(ByVal goPackage As DTS.Package2)
        Dim DTS As Object

        Dim oTask As DTS.Task
        Dim oLookup As DTS.Lookup
        Dim oCustomTask1 As DTS.DataPumpTask2
        oTask = goPackage.Tasks.New("DTSDataPumpTask")
        oCustomTask1 = oTask.CustomTask (ERROR)


        oCustomTask1.Name = "Copy Data from BOL_CLEVELAND_FINAL to [Marketing].[dbo].[BOL_CLEVELAND_FINAL1] Task"
        oCustomTask1.Description = "Copy Data from FINAL to [Mark].[dbo].[FINAL1] Task"
        oCustomTask1.SourceConnectionID = 1
        oCustomTask1.SourceSQLStatement = "select `Field5`,`Field2`,`ACCOUNT,`INDEX` from `FINAL`"
        oCustomTask1.DestinationConnectionID = 2
        oCustomTask1.DestinationObjectName = "[Mark].[dbo].[FINAL1]"
        oCustomTask1.ProgressRowCount = 1000
        oCustomTask1.MaximumErrorCount = 0
        oCustomTask1.FetchBufferSize = 1
        oCustomTask1.UseFastLoad = True
        oCustomTask1.InsertCommitSize = 0
        oCustomTask1.ExceptionFileColumnDelimiter = "|"
        oCustomTask1.ExceptionFileRowDelimiter = vbCrLf
        oCustomTask1.AllowIdentityInserts = False
        oCustomTask1.FirstRow = 0
        oCustomTask1.LastRow = 0
        oCustomTask1.FastLoadOptions = 2
        oCustomTask1.ExceptionFileOptions = 1
        oCustomTask1.DataPumpOptions = 0

        Call oCustomTask1_Trans_Sub1(oCustomTask1)
        goPackage.Tasks.Add(oTask)
         oCustomTask1 = Nothing
                oTask = Nothing

    End Sub


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting DTS Package into VB.NET 2005 vish_vj ADO.NET 0 March 1st, 2008 01:54 AM
Converting the DTS file execution from vb to vb . ankur.nagdeve .NET Framework 2.0 0 February 27th, 2008 05:12 AM
Calling a DTS Package from VB levinll Pro VB Databases 0 November 7th, 2005 04:09 PM
VB.Net -> Filename -> DTS Package -> tempdB daniel Pro VB.NET 2002/2003 1 October 7th, 2004 02:46 PM
DTS packages from VB 6 to VB .NET petroleo SQL Server DTS 0 August 18th, 2003 05:59 PM



All times are GMT -4. The time now is 02:25 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc