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!
|