我试图将所有tbl2
从insert into Tbl2(UserId, TimesTamp)
values (select u.Id from tbl1 as u, N'2016-01-31 23:59:59')
插入到SharedObject.size
及其应得的日期时间(对所有这些都是相同的)
我试过这个:
SharedObject.flush(128*1000*1000)
但它没有用。
tbl2看起来像这样:
ID | UserId |时间戳
和ID当然是自动增量
答案 0 :(得分:1)
有效语法public class Webview extends Fragment {
WebView myWebView;
Spinner ddc_spinner;
public ArrayAdapter<CharSequence> adapter;
public void onResume(){
super.onResume();
/* "ActionBar Title" festlegen */
((MainActivity) getActivity())
.setActionBarTitle("Start");
}
/* Neuladen der "WebView" Funktion verhindern
* bei "Orientation change" (Portrait/Landscape) */
@Override
public void onConfigurationChanged(Configuration newConfig){
super.onConfigurationChanged(newConfig);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.webview, container, false);
ddc_spinner = (Spinner) view.findViewById(R.id.ddc_spinner);
adapter = ArrayAdapter.createFromResource(getActivity(),
R.array.ddc_name_list, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
ddc_spinner.setAdapter(adapter);
ddc_spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view,
int position, long id) {
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
/* WebView Einstellungen */
myWebView = (WebView) view.findViewById(R.id.webView);
myWebView.setVerticalScrollBarEnabled(true);
myWebView.setHorizontalScrollBarEnabled(true);
myWebView.setWebViewClient(new WebC());
myWebView.getSettings().setDisplayZoomControls(true);
myWebView.getSettings().setUseWideViewPort(true);
myWebView.getSettings().setLoadWithOverviewMode(true);
myWebView.getSettings().setSupportZoom(true);
myWebView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR);
myWebView.getSettings().setBuiltInZoomControls(true);
myWebView.setInitialScale(0);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
/* Auswahl laden */
myWebView.loadUrl("http://www.google.de");
return view;
}
/* WebView Client implementieren */
public class WebC extends WebViewClient {
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
}
}
}
:
INSERT INTO SELECT
说明:
INSERT INTO Tbl2(UserId, TimesTamp)
SELECT u.Id,'2016-01-31 23:59:59'
FROM tbl1 AS u;
引用Timestamp
[]
),以避免lang / dateformat设置出现问题