小编har*_*hal的帖子

如何配置Azure存储模拟器以使用本地SQLServer

我正在尝试使用本地SQL Server 2012配置Azure存储模拟器2.4.
当我执行此命令时,我得到无法创建数据库.

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator.exe init -server ThisPC -sqlinstance SQLEXPRESS -forcecreate

Windows Azure Storage Emulator 3.3.0.0 command line tool
Error: Cannot create database.
Run Code Online (Sandbox Code Playgroud)

到我的Sql Sever Manager我使用服务器名称ThisPC\SQLEXPRESS登录.
请帮我告诉我错过了哪些信息.

- - - - - - - - - 更新 - - - - - - - - -

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator.exe init -server (local)\SQLExpress -forcecreate

Windows Azure存储模拟器3.3​​.0.0命令行工具错误:无法创建数据库.

如果您查看AppData\Local\WAStorageEmulator\WAStorageEmulator.3.3.config,您会发现:

<SQLInstance>(local)\SQLExpress</SQLInstance>
Run Code Online (Sandbox Code Playgroud)

感谢Gaurav提醒我日志,我检查了我的事件查看器:

无法创建文件'C:\ Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\WAStorageEmulatorDb33.mdf'因为它已经存在

它说SQL DB文件存在,所以删除它并重试命令,工作正常,存储模拟器也启动了.(命令在一段时间后第二次尝试可能是某些SQL缓存问题)

azure azure-sql-database

2
推荐指数
1
解决办法
5918
查看次数

屏幕方向更改的Android NullPointerException

我正在缩小并解释尽可能简单,主要活动启动异步任务.

onCreate()调用方向更改时,Async一旦获得,就会创建.所以在onPreExecute()我锁定我的方向和onPostExecute()我释放锁定方向.通过这种方式,如果Async任务已经启动,则永远不会创建另一个任务实例.

另一个问题已经开始,findViewById()当我随机改变屏幕方向时,主活动本身返回null.在5-6次尝试中重新产生一次.

该怎么做?任何帮助

是否onCreate()得到重新调用的方法或主线程完成后...或者是瞬时的,因为一旦方向得到改变

谢谢

- - - - - - - -更新

 <application
        android:allowBackup="true"
        android:icon="@drawable/ap_logo"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="agilepoint.android.mobilebpm.main.LoginActivity"
            android:configChanges="orientation"
            android:label="@string/app_name"
            android:logo="@drawable/menu_button"
            android:windowSoftInputMode="adjustPan|stateHidden" 
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <data android:scheme="http" />
            </intent-filter>
        </activity>
 </application>
Run Code Online (Sandbox Code Playgroud)

android android-orientation

0
推荐指数
1
解决办法
1563
查看次数

如何在Microsoft SQL Server中设置最大索引值

我试图使索引值在100到200的范围内,而不是按照列类型int的0到上限.

对于创建我使用的表的下限,[ID] [int] IDENTITY(100, 1) NOT NULL但是我无法弄清楚如何达到200的上限.

怎么做到这一点?

问候

sql-server sql-server-2008 sql-server-2012

0
推荐指数
1
解决办法
50
查看次数