views:

2645

answers:

4

I'm using the Microsoft Sync Framework to synchronize a SQL Server database with a SQL Compact SDF file on the Windows Mobile 5 emulator. We have a 2 gig SD card in the actual device we're deploying on so we'd like to store our database file there. However, when I map a shared folder as the storage card in the Windows Mobile 5 emulator, the SQL Compact engine is not able to create or modify a database file on the mapped storage card because of a bug. So to get past this during development on the emulator, I was just going to store the database on the internal device storage, however, it's limited to 32 MB and I can't find a way to increase it. Does anyone know how to increase the storage space on the emulator. I'm talking storage space not RAM :).

Otherwise, does anyone know how to get past the bug of not being able to have a SQL Compact database file on the storage card in the emulator?

Thanks!

A: 

If you have an actual device I would recommend testing on the device by connecting it via active sync. I do not know how to change the memory of the emulator but I know that HP has emulators that you can download for testing and I would bet that one of them would match what you are trying to target.

runxc1 Bret Ferrier
+3  A: 

actually you can do this.

First of all open Device Emulator and run the emulator of your choice. In my case i open Windows Mobile 5.0

Then, as it runs, from device emulator, right click the emulator you just run and select Save-As, save it somewhere and then open this file with a text editor.

In there, you will find an option that says memsize, set it the following:

<MemSize Reconfigurable="true">256</MemSize>

Unfortunatly the maximum is 256 as it says if you try to set it higher.

Now, from Device Emulator, select the emulator entry that you just saved previously(Not the original, but the custom located under My Device Emulators in Device Emulator) and will be run with the cfg file that you just modified.

Hope this helps.

Konstantinos
MemSize lets you set the "Program memory" not the storage (think about RAM vs disk space).
Michał Drozdowicz
A: 

In the Microsoft Device Emulator V3 (note that this installs in and over-writes the previous "\Microsoft Device Emulator\1.0" folder), using Windows Mobile 5, the help you get when typing "deviceemulator" with no parameters is pasted below. The first thing it states is that message about memsize. I tried it with values > 256 MB and just throws up the help dialog box. I was messing with this when trying to get it to recognize my /sharedfolder as a storage card. Maybe this will be possible in newer device emulators. If I can get it to work I can test placing an SDF file on the card.

Device Emulator

Memory size must be a value between 64 and 256.

Command Line Option Help

binfile - Filename of the binfile to be loaded by the emulator.
@responsefile - Filename to XML response file.
/a - Keeps emulator window always on top.
/battery - Emulates running from a battery instead of AC
/batterycharge percentage - Emulated battery charge percentage
/c - Creates and displays a console window to show output from Serial Port 1.
/cpucore - ARMv4 or ARMv5. Default is ARMv4.
/cpuoptions - A combination of (T)humb,D(ebug),I(nternetworking),M (Long Multiply),E (DSP). Of these, T,D,I will always be set.
/defaultsave - Use the VMID as the saved state name and place the saved state file in the per user directory.
/flash filename - Enables flash-memory emulation and specifies flash-memory storage filename.
/h - Sets host-only routing for network packets.
/hostkey keyname - Specifies host key, where keyname can be 'None', 'Left-Alt', or 'Right-Alt'.
/language LangID - Specifies the UI language, where LangID is a decimal.
/memsize size - Sets emulated RAM size, where size is in megabytes.
/nosecurityprompt - Do not prompt when enabling potentially unsafe peripherals when restoring from saved state.
/n [macaddress] - Enables CS8900 network adapter where optional macaddress specifies which host adapter the card will bind to.
/p [macaddress] - Enables NE2000 PCMCIA network adapter, where optional macaddress specifies which host adapter the card will bind to.
/r address - Specifies ROM file base address(in hexadecimal).
/rotate angle - Rotates the display by degrees, where angle can be 0, 90, 180, or 270.
/s filename - Specifies the save-state filename.
/sharedfolder directoryname - Mounts directoryname as a storage card.
/skin filename - Loads the specified skin file.
/tooltips state - Enables or disables tooltips, where state is 'ON' or 'OFF'.
/u0 serialport /u1 serialport /u2 serialport - Maps guest serial ports 0-2 to Windows serial ports.
/vfp - Vector Floating Point coprocessor: true or false. Default is false.
/video xx - Specifies screen size and bit-depth.
/vmid {GUID} - Specifies the VMID GUID.
/vmname name - Specifies the window title.
/z - Zooms the display to 2x normal size.
/speakerphone - {[SpeakerPhone][Headset][Carkit]} - Bitmapped number between 0-7 specifying Speakerphone, Headset, Carkit mode.

OK   
Bratch
+1  A: 

Under http://forum.xda-developers.com/showthread.php?t=549675 you will find a driver for the emulator that sets up a RAM Disk, that for the emulator is seen as an external storage card but doesn't suffer from the issues with mapping a folder. I've checked with SQL Compact sdf file stored in the RAMDisk and it works like a charm. I've used it as a 64MB drive but supposedly it can handle up to 256 MB.

Michał Drozdowicz
This corrected the issue with SQL Server Compact. Thanks!
Dylan Vester