You need to sign in to do that
Don't have an account?

Trouble with Flex/Air toolkit
Hello, I am following the tutorials for connecting an AIR app to salesforce. I have copied the youtube tutorial word for word and I am not able to log in successfully. I get the message "offline but we will succeed at logging in anyways", and my loginResult is basically empty Is that tutorial missing anything I need to do? I created my account, got a dev environment then followed the instructions.
Here is the code I am now working with. This is showing the username and password from the tutorial, but I see the same results when I put my credentials in.
Code
------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute"applicationComplete="onApplicationComplete()"
xmlns:salesforce="http://www.salesforce.com/">
<mx:Script>
<![CDATA[
import com.salesforce.objects.LoginRequest;import com.salesforce.AsyncResponder;
import com.salesforce.results.LoginResult; import com.salesforce.results.QueryResult;
private function onApplicationComplete():void
{
var lr : LoginRequest = new LoginRequest();lr.username = "sforce@merce.com";lr.password =
"123456";lr.callback = new AsyncResponder(loginSuccess);force.login(lr);
}
private function loginSuccess(lr:LoginResult):void
{
force.query("select Id, FirstName, LastName from Contact", new AsyncResponder(loadGrid));}
private function loadGrid(qr:QueryResult):void
{
myGrid.dataProvider = qr.records;
}
]]>
</mx:Script>
<salesforce:AIRConnection id="force"/>
<mx:DataGrid id="myGrid" height="100%" width="100%"/></mx:WindowedApplication>
---------------------------------------------------------------------------------------
Message in console:
---------------------------------------------------------------------------------------
[SWF] SalesforceDemo.swf - 1,549,802 bytes after decompression
offline but we will succeed at logging in anyways
query - offline
SQLError: 'Error #3115: SQL Error.', details:'no such table: 'Contact'', operation:'execute', detailID:'2013'
select Id, FirstName, LastName FROM `Contact`;
SQLError: 'Error #3115: SQL Error.', details:'no such table: 'Contact'', operation:'execute', detailID:'2013'
select Id, FirstName, LastName FROM `Contact`;
---------------------------------------------------------------------------------------
Any ideas would be greatly appreciated.
have you appended your security token to your password?
My experience is that the error message is a bit misleading saying there is "no data in the table" when "unsuccesful login" would be a more appropriate message