Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Crowandazi
Starting Member
9 Posts |
Posted - 2005-07-28 : 12:11:11
|
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 = constringobjCommand.CommandText = "INSERT INTO site.dbo.invoiceheader " & _ "(RecordLetter) " & _ "VALUES " & _ "('A')"objCommand.CommandType = adCmdTextobjCommand.ExecuteSet objCommand = NothingThe 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! |
|
morsnowski
Starting Member
2 Posts |
Posted - 2005-07-28 : 13:08:11
|
What datatype is [RecordLetter][edit]never mind read the last line to late do you actually create the connection object somewhere. I can see the command object all right but the connection...[/edit] |
 |
|
|
|
|