<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Afaf A., if your app is for in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-DataBase/m-p/1090414#M65100</link>
    <description>&lt;P&gt;&lt;A href="https://software.intel.com/en-us/user/1558589" style="font-size: 11px; background-color: rgb(238, 238, 238);"&gt;Afaf A.&lt;/A&gt;, if your app is for mobile, you may use a Webservice as interface !&lt;/P&gt;

&lt;P&gt;You can use ajax to connect to a webservice!&lt;/P&gt;

&lt;P&gt;Follow some Code as example:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;function callWebService(pUserAccount, pPassword, callback){
	$.ajax('http://YourWebServiceAddress/Service.asmx/MyWebservice', {
		contentType: 'text/xml; charset=utf-8',    
		dataType: 'xml',
		crossDomain: true,    
		data: {
			pUserAccount : pUserAccount, 
			pPassword : pPassword                    
		},
		success: function(data) {		
			var vMyArrayList = [];                    

			$(data).find("dsMyWSDataset").each(function () {
				//Let's build our array object and put all data from WS on it!
				vMyArrayList.push({MyItemOne: $(this).find("MyItemOne").text(), 
									MyItemTwoo: $(this).find("MyItemTwoo").text()});
			});
			
			//You may call another function in here to pass your result of your Webservice:
			fn_MyOtherFunction(vMyArrayList, function(res){
				if(res){
					//Some other code
					callback(true);
				}
			});
		},
		error: function (data) {
			alert('Error: ' + $(data).text);		
			callback(false);
		}
	});
}

//Function to Extract your Array Obj.
function fn_MyOtherFunction(pMyArrayList, callback){
	var j = pMyArrayList.length;                 
	for (var i = 0; i &amp;lt; j; i++) {
		 var vItem = pServiceLocationsList&lt;I&gt;;
		 console.log(vItem.MyItemOne);
		 console.log(vItem.MyItemTwoo);
		 //Do something else...
	}
	callback(true);
}

//Call your WS Function:
callWebService('MyUserAccount', '123456',function(res){
	//Do Something After this function Callback...
});&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;And a WS Template with Vb.Net where I call a Stored Procedure on SQL:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;&amp;lt;WebMethod()&amp;gt; _
Public Function MyWebservice(ByVal pUserAccount As String, ByVal pPassword As String) As DataSet
	Dim vClassResult As New classSecurity
	vClassResult.ClassSQLConn()

	Dim SqlConn As New SqlConnection(vClassResult.ClassSQLConn())
	Dim MyDataAdapter As SqlDataAdapter
	Dim MyDataset As DataSet = Nothing

	MyDataAdapter = New SqlDataAdapter("EXEC dbo.sprAuthenticateUser '" &amp;amp; pUserAccount &amp;amp; "','" &amp;amp; pPassword &amp;amp; "'", SqlConn)

	MyDataset = New DataSet()
	MyDataAdapter.Fill(MyDataset, "dsMyWSDataset")

	SqlConn.Close()

	Return MyDataset
End Function&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Feb 2017 19:45:00 GMT</pubDate>
    <dc:creator>Rodrigo_M_1</dc:creator>
    <dc:date>2017-02-09T19:45:00Z</dc:date>
    <item>
      <title>Intel XDK DataBase</title>
      <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-DataBase/m-p/1090412#M65098</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I’m a beginner in INTEL XDK, the first problem that I face is what is the easiest way to connect a database to my INTEL XDK ?&lt;/P&gt;

&lt;P&gt;I’m using SQL server 2012 management studio, can I connect it with XDK ? or there is other way to create a database and connect it with Intel XDK.&lt;/P&gt;

&lt;P&gt;Please post an English video if a vailable.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 07:18:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Intel-XDK-DataBase/m-p/1090412#M65098</guid>
      <dc:creator>Afaf_A_</dc:creator>
      <dc:date>2017-02-08T07:18:18Z</dc:date>
    </item>
    <item>
      <title>Afaf -- the XDK creates</title>
      <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-DataBase/m-p/1090413#M65099</link>
      <description>&lt;P&gt;Afaf -- the XDK creates standard Cordova (aka PhoneGap) apps, so your best bet is to search the Internet for something like "database solutions for cordova phonegap apps" and try some of those solutions. Solutions that work for Cordova and PhoneGap also work for the XDK.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 16:57:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Intel-XDK-DataBase/m-p/1090413#M65099</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2017-02-08T16:57:13Z</dc:date>
    </item>
    <item>
      <title>Afaf A., if your app is for</title>
      <link>https://community.intel.com/t5/Software-Archive/Intel-XDK-DataBase/m-p/1090414#M65100</link>
      <description>&lt;P&gt;&lt;A href="https://software.intel.com/en-us/user/1558589" style="font-size: 11px; background-color: rgb(238, 238, 238);"&gt;Afaf A.&lt;/A&gt;, if your app is for mobile, you may use a Webservice as interface !&lt;/P&gt;

&lt;P&gt;You can use ajax to connect to a webservice!&lt;/P&gt;

&lt;P&gt;Follow some Code as example:&lt;/P&gt;

&lt;PRE class="brush:jscript;"&gt;function callWebService(pUserAccount, pPassword, callback){
	$.ajax('http://YourWebServiceAddress/Service.asmx/MyWebservice', {
		contentType: 'text/xml; charset=utf-8',    
		dataType: 'xml',
		crossDomain: true,    
		data: {
			pUserAccount : pUserAccount, 
			pPassword : pPassword                    
		},
		success: function(data) {		
			var vMyArrayList = [];                    

			$(data).find("dsMyWSDataset").each(function () {
				//Let's build our array object and put all data from WS on it!
				vMyArrayList.push({MyItemOne: $(this).find("MyItemOne").text(), 
									MyItemTwoo: $(this).find("MyItemTwoo").text()});
			});
			
			//You may call another function in here to pass your result of your Webservice:
			fn_MyOtherFunction(vMyArrayList, function(res){
				if(res){
					//Some other code
					callback(true);
				}
			});
		},
		error: function (data) {
			alert('Error: ' + $(data).text);		
			callback(false);
		}
	});
}

//Function to Extract your Array Obj.
function fn_MyOtherFunction(pMyArrayList, callback){
	var j = pMyArrayList.length;                 
	for (var i = 0; i &amp;lt; j; i++) {
		 var vItem = pServiceLocationsList&lt;I&gt;;
		 console.log(vItem.MyItemOne);
		 console.log(vItem.MyItemTwoo);
		 //Do something else...
	}
	callback(true);
}

//Call your WS Function:
callWebService('MyUserAccount', '123456',function(res){
	//Do Something After this function Callback...
});&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;And a WS Template with Vb.Net where I call a Stored Procedure on SQL:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;&amp;lt;WebMethod()&amp;gt; _
Public Function MyWebservice(ByVal pUserAccount As String, ByVal pPassword As String) As DataSet
	Dim vClassResult As New classSecurity
	vClassResult.ClassSQLConn()

	Dim SqlConn As New SqlConnection(vClassResult.ClassSQLConn())
	Dim MyDataAdapter As SqlDataAdapter
	Dim MyDataset As DataSet = Nothing

	MyDataAdapter = New SqlDataAdapter("EXEC dbo.sprAuthenticateUser '" &amp;amp; pUserAccount &amp;amp; "','" &amp;amp; pPassword &amp;amp; "'", SqlConn)

	MyDataset = New DataSet()
	MyDataAdapter.Fill(MyDataset, "dsMyWSDataset")

	SqlConn.Close()

	Return MyDataset
End Function&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Feb 2017 19:45:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Intel-XDK-DataBase/m-p/1090414#M65100</guid>
      <dc:creator>Rodrigo_M_1</dc:creator>
      <dc:date>2017-02-09T19:45:00Z</dc:date>
    </item>
  </channel>
</rss>

