Help get this topic noticed by sharing it on Twitter, Facebook, or email.

How do I upload a single attachment to Salesforce via DBamp?

I have a C# app where I am allowing a user to select a file to upload. I am then calling a stored procedure with the following query:

INSERT INTO SALESFORCE...Attachment (Body, Name, ParentId, ContentType)
VALUES(@Body, @Name, @ParentId, @ContentType)

The attachment shows up in Salesforce, but I'm unable to open it. I'm inserting the body as binary and not image. I assume that might be the issue.

Is there a better way to go about this?
1 person has
this question