Source Code to compiled DemoCenter

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Cloud Applications
Post Reply
craigd
Posts: 23
Joined: Wed 30 Jan 2013 11:33

Source Code to compiled DemoCenter

Post by craigd » Wed 30 Jan 2013 19:41

I'm having difficulties getting Entity Developer to work with dotConnect for SalesForce.

Is the source code for the DemoCenter available? There's just a single exe in C:\Program Files (x86)\Devart\dotConnect\Salesforce\DemoCenter, and the samples don't seem to cover it.

Shalex
Site Admin
Posts: 9302
Joined: Thu 14 Aug 2008 12:44

Re: Source Code to compiled DemoCenter

Post by Shalex » Fri 01 Feb 2013 14:56

craigd wrote:Is the source code for the DemoCenter available?
We do not provide source code of DemoCenter. Could you please tell us why you need it?
Also specify what functionality should be better described in our samples (\Program Files (x86)\Devart\dotConnect\Salesforce\Samples).

craigd
Posts: 23
Joined: Wed 30 Jan 2013 11:33

Re: Source Code to compiled DemoCenter

Post by craigd » Fri 01 Feb 2013 21:24

I have tried (am still going) trying to work out how to get Entity Developer to work with dotConnect for SalesForce, and nothing seems to work.

The following code fails when the first account is accessed with an error "keyword not supported: security token", which suggests to me that an SQL provider is being used rather than the SalesForce provider (credentials obfuscated)

SalesforceConnectionStringBuilder builder = new SalesforceConnectionStringBuilder();
builder.UserId = "xxxxxxxxxxxxxxxxxxxxx";
builder.Password = "XXXXXXXXXXXXXX";
builder.SecurityToken = "XXXXXXXXXXXXXXXXXXXX";
builder.Host = "login.salesforce.com";

SFDC.Entities entities = new SFDC.Entities(builder.ConnectionString);
var account = entities.Accounts.First();


I am using 4.3.1 of the EntityFramewor and app.config is:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<add name="Entities" providerName="Devart.Data.Salesforce" />
</connectionStrings>
<system.data>
<DbProviderFactories>
<remove invariant="Devart.Data.Salesforce" />
<add name="dotConnect for Salesforce" invariant="Devart.Data.Salesforce" description="Devart dotConnect for Salesforce" type="Devart.Data.Salesforce.SalesforceProviderFactory, Devart.Data.Salesforce, Version=2.2.52.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
<entityFramework>
</entityFramework>
</configuration>

Shalex
Site Admin
Posts: 9302
Joined: Thu 14 Aug 2008 12:44

Re: Source Code to compiled DemoCenter

Post by Shalex » Tue 05 Feb 2013 15:05

Please try using the connection string in the following format:

Code: Select all

string myConnectionString = @"metadata=res://*/DataModel.csdl|res://*/DataModel.ssdl|res://*/DataModel.msl;provider=Devart.Data.Salesforce;provider connection string=""User Id=XXXXXX;Security Token=XXXXXX;Password=XXXXXX;Host=login.salesforce.com;""";
SFDC.Entities entities = new SFDC.Entities(myConnectionString);
var account = entities.Accounts.First();

Post Reply