I got an issue with datetime comparison with latest version, maybe I've done something wrong...
Here is the code :
Code: Select all
SalesforceCommand command = new SalesforceCommand();
command.CommandText = "SELECT id,name,email,street,city,state,postalcode,country,division,department,title,managerid,phone,mobilephone FROM User WHERE SystemModstamp > 2012-04-01T00:00:00";
SalesforceConnectionStringBuilder csb = new SalesforceConnectionStringBuilder();
csb.Host = Configuration.Host;
csb.UserId = Configuration.UserName;
csb.Password = Configuration.Password;
csb.SecurityToken = Configuration.AccessToken;
csb.SystemObjects = true;
using (SalesforceConnection conn = new SalesforceConnection(csb.ToString()))
{
conn.Open();
command.Connection = conn;
SalesforceDataReader rdr = command.ExecuteReader(); // Exception thrown here
...
Code: Select all
Devart.Data.Salesforce.SalesforceException was caught
Message=You have an error in your SQL syntax at line 1, column 156: Unexpected symbol 'T00:'.
Source=Devart.Data.Salesforce
ErrorCode=-2147467259
Cause=Unexpected
Code=-1
StackTrace:
at Devart.Data.Internal.Parser.j.a(String[] A_0, ab A_1)
at Antlr.Runtime.j.c(ab A_0)
at a.cv()
at a.a()
at Devart.Data.Internal.Parser.j.c(Boolean A_0)
at Devart.Data.Salesforce.SalesforceCommand.GetStatement()
at Devart.Data.Salesforce.SalesforceCommand.InternalPrepare(Boolean implicitPrepare, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at Devart.Data.Salesforce.SalesforceCommand.ExecuteReader()
Code: Select all
{Devart.Data.Salesforce, Version=1.1.85.0, Culture=neutral, PublicKeyToken=09af7300eec23701}
P.S.: Here is a link I found on SalesForce developer API documentation : http://www.salesforce.com/us/developer/ ... ormats.htm