Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 28th, 2005, 11:17 AM
Registered User
 
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inserting data into table from DTS Package

HELP!!!

What is wrong with the following statement? I simply want to insert a row from a DTS Package into one of my tables:

Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = constring
objCommand.CommandText = "INSERT INTO site.dbo.invoiceheader " & _
                    "(RecordLetter) " & _
             "VALUES " & _
                    "('A')"
objCommand.CommandType = adCmdText
objCommand.Execute
Set objCommand = Nothing

The error I get is

" Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."

..which I've read indicates that there is something wrong with how I've specified the command (which makes sense, because the actual SQL statement works fine when entered directly from SQL), but I can't find examples of doing this! Please help!

 
Old July 29th, 2005, 12:30 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

seems you are using .NET code here. You need to use SQL commands in a DTS package.






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
DTS Package Export Data to XML Problem kwilliams SQL Server DTS 1 January 3rd, 2006 02:22 PM
Passing table name as parameter in a DTS Package nimma SQL Server DTS 2 January 7th, 2005 02:24 AM
Dynamic Table Creation in DTS Package clm100 SQL Server DTS 3 September 3rd, 2004 04:08 PM
DTS Package , Dynamic Table. sasidhar79 SQL Server DTS 1 June 11th, 2004 10:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.