0
我已閱讀網絡教程,可用於存儲數據的雲。所以我想問一下,是否SQL Server 2005表數據存儲在亞馬遜雲。可以讓任何人給我示例代碼存儲數據從亞馬遜的SQL服務器和檢索它在Android應用程序?在Android應用程序中使用亞馬遜Web服務
我已閱讀網絡教程,可用於存儲數據的雲。所以我想問一下,是否SQL Server 2005表數據存儲在亞馬遜雲。可以讓任何人給我示例代碼存儲數據從亞馬遜的SQL服務器和檢索它在Android應用程序?在Android應用程序中使用亞馬遜Web服務
Amazon爲您提供了一個服務器實例,並帶有您指定的操作系統。你可以在技術上,在其上安裝任何東西並承載它。
這是一些示例代碼。這只是讓你知道的。如果你想簡單的開始,你也可以使用普通的MVC。
@RequestMapping (value = "runquery" , method = RequestMethod.GET)
@ResponseBody
public void runQuery()
{
Statement lStatement = null;
Connection lConnection = null;
ResultSet lResultSet = null;
try
{
lConnection = DBAccess.getConnection();
lStatement = lConnection.createStatement();
lResultSet = lStatement.executeQuery("select * from table");
while (lResultSet.next())
{
mLogger.info("The result set is : "+lResultSet.toString());
}
}
catch(Exception e)
{
e.printStackTrace();
mLogger.error("Exception occurred while trying to runQuery : "+e.getMessage());
}
finally
{
DBAccess.closeResultSet(lResultSet);
DBAccess.closeStatement(lStatement);
DBAccess.closeDBConnection(lConnection);
}
}