Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server DTS
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 28th, 2005, 11:17 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
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!

  #2 (permalink)  
Old July 29th, 2005, 12:30 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
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.

 


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:24 AM.


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