Help with Inserting data via dotConnect to SalesForce..
Posted: Tue 27 Aug 2013 20:52
I am attempting to perform an INSERT INTO the Task table and I get the following error code: -2147467259 with the message "Execute Command Failed" with no other information. Can you help me. Thank you.
This is the INSERT Statement that I am trying to submit:
string mySelectQuery = "INSERT INTO TASK (WhoId, WhatId, Subject, ActivityDate, Status, OwnerId, Description, ReminderDateTime, IsReminderSet,
Next_Steps, Priority) VALUES ('0018000000hSCaf', '0068000000lTVD1AAO', 'Call - Outbound',
'8/28/2013 3:45:33 PM', 'Not Started', '00580000003K3EpAAK',
'test', '8/27/2013 3:45:34 PM', True,
'my test', 'Normal')"
string myConnString = "My Login String";
SalesforceConnection salesforceConnection = new SalesforceConnection(myConnString);
salesforceConnection.Open();
SalesforceCommand salesforceCommand = new SalesforceCommand(mySelectQuery, salesforceConnection);
salesforceCommand.ExecuteNonQuery();
salesforceConnection.Close();
This is the INSERT Statement that I am trying to submit:
string mySelectQuery = "INSERT INTO TASK (WhoId, WhatId, Subject, ActivityDate, Status, OwnerId, Description, ReminderDateTime, IsReminderSet,
Next_Steps, Priority) VALUES ('0018000000hSCaf', '0068000000lTVD1AAO', 'Call - Outbound',
'8/28/2013 3:45:33 PM', 'Not Started', '00580000003K3EpAAK',
'test', '8/27/2013 3:45:34 PM', True,
'my test', 'Normal')"
string myConnString = "My Login String";
SalesforceConnection salesforceConnection = new SalesforceConnection(myConnString);
salesforceConnection.Open();
SalesforceCommand salesforceCommand = new SalesforceCommand(mySelectQuery, salesforceConnection);
salesforceCommand.ExecuteNonQuery();
salesforceConnection.Close();