visual studio 2008设备应用程序与数据库连接 [英] visual studio 2008 device application wiht database connection

查看:70
本文介绍了visual studio 2008设备应用程序与数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟踪了一个来自microsoft msdn网站的示例,用于在vs 2008上构建一个连接到SQL Server 2005的设备应用程序。


http://msdn.microsoft.com/en-us/library/cc488004(v = vs .90).aspx


我已经关注并下载了所有先决条件,但是当我尝试运行(F5 / debug)应用程序时,我总是得到"磁盘sapce还不够"错误。


如果我将项目平台设置为"Windows Mobile 5.0 Pocket PC SDK",则错误将是:


部署和/或注册失败,错误:0x8973190e。写入文件'\ Windows \ NETCFv35.wm.ARMV4I.cab'时出错。错误0x80070070:磁盘空间不足。


如果我将项目平台设置为"Windows Mobile 5.0 Smartphone SDK",则错误将是:


部署和/或注册失败,错误:0x8973190e。写入文件'system.deployment.dll'时出错。错误0x80070070:磁盘空间不足。


--------------------------- -------------------------------------------------- ------


我在网上搜索了一段时间,建议的问题是:某些汇编引用 指向'桌面'版本,而他们认为指向'紧凑框架'版本。 


但是,我检查了我的服务器(WCF)和客户端项目中的所有引用,它们都指向'紧凑框架' 。引用 我注意到在我添加了localDataCache同步之后,我的'bin / Debug'
文件夹中添加了一些dll:


System.Data.OracleClient.dll

System.Data.SqlServerCe.dll

System.EnterpriseServices.dll

System.EnterpriseServices.Wrapper.dll

System.Transactions.dll

System.Web.dll


我不知道他们是如何到达那里的,并且不知道他们指向的位置。


2。我发现的另一个奇怪的事情是:


我打开了'bin / Debug'下的[myProject] .exe文件,   refences指向的位置不同于在我的项目/参考资料/:


************** 例外文字  ************ **

System.ArgumentNullException: 值不能为null。

参考名称:ServerSyncProvider

   在Microsoft .Synchronization.SyncAgent.Synchronize()

    at SmartDeviceDB.Form1.sync()  at D:\Project\MobilePayment\SmartDeviceDB\SmartDeviceDB\Form1 .cs: 第37行&
   在SmartDeviceDB.Form1.Form1_Load(对象发件人,EventArgs e) 在D:\ Project \ MobilePayment \ SmartDeviceDB \ SmartDeviceDB \ Form1.cs: 第28行。
    at System.Windows.Forms.Form.OnLoad(EventArgs e)

    ; 在System.Windows.Forms.Form.OnCreateControl( ))$ $ $ $ b    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

    at System.Windows.Forms。 Control.CreateControl()

    at System.Windows.Forms.Control.WmShowWindow(Message& m)

    at System.Windows.Forms.Control.WndProc(Message& m)

   在System.Windows。 Forms.ScrollableControl.WndProc(消息& m)

    at System.Windows.Forms.ContainerControl.WndProc(Message& m)

   ;  at System.Windows.Forms.Form.WmShowWindow(Message& m)

    at System.Windows.Forms.Form.WndProc(Message& m)

    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

    at System.Windows.Forms.Control .ControlNativeWindow.WndProc(消息& m)

   在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)




************** 例外文字**************

mscorlib

   组件版本:2.0.0.0

    Win32版本:2.0.50727.3625(GDR.050727-3600)

   程式码基底:
file:/// C: /WindowsS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll


---------------------- ------------------
$
mscorlib.resources

   组件版本:2.0.0.0

    Win32版本:2.0.50727.3625(GDR.050727-3600)

   程式码基底:
file:/// C: /WindowsS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll


---------------------- ------------------
$
SmartDeviceDB

   组件版本:1.0.0.0

    Win32版本:1.0.0.0

   程式码基底:
file:/// D: /Project/MobilePayment/SmartDeviceDB/SmartDeviceDB/bin/Debug/SmartDeviceDB.exe


---------------------- ------------------
$
System.Windows.Forms

   组件版本:2.0.0.0

    Win32版本:2.0.50727.3623(GDR.050727-3600)

   程式码基底:
file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll


---- ------------------------------------
$
制度

   组件版本:2.0.0.0

    Win32版本:2.0.50727.3624(GDR.050727-3600)

   程式码基底:
file:/// C :/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll


-------------------- --------------------
$
System.Drawing

   组件版本:2.0.0.0

    Win32版本:2.0.50727.3053(netfxsp.050727-3000)

   程式码基底:
file: ///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll


------------ ----------------------------
$
System.Configuration

   ; 组件版本:2.0.0.0

    Win32版本:2.0.50727.3053(netfxsp.050727-3000)

   程式码基底:
file: ///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll


------------ ----------------------------
$
System.Xml

   ; 组件版本:2.0.0.0

    Win32版本:2.0.50727.3082(QFE.050727-3000)

   程式码基底:
file: ///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll


------------ ----------------------------
$
System.Data

   ; 组件版本:2.0.0.0

    Win32版本:2.0.50727.3053(netfxsp.050727-3000)

   程式码基底:
file: ///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll


------------ ----------------------------
$
System.Data.DataSetExtensions

  ;  组件版本:3.5.0.0

    Win32版本:3.5.30729.1建立者:SP

   程式码基底:
file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Data.DataSetExtensions/3.5.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll


---- ------------------------------------
$
System.Core
   组件版本:3.5.0.0

    Win32版本:3.5.30729.1建立者:SP

   程式码基底:
file: ///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll


------------ ----------------------------
$
System.Windows.Forms.resources

   组件版本:2.0.0.0

    Win32版本:2.0.50727.3053(netfxsp.050727-3000)

   程式码基底:
file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHT_b77a5c561934e089/System.Windows.Forms.resources.dll


----------------------------------------

Microsoft.Synchronization.Data

   组件版本:1.0.0.0

    Win32版本:1.0.1208.0

   程式码基底:
file:/// C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Synchronization.Data/1.0.0.0__89845dcd8080cc91/Microsoft.Synchronization.Data.dll


---- ------------------------------------
$
System.Web.Services

   组件版本:2.0.0.0

    Win32版本:2.0.50727.3053(netfxsp.050727-3000)

   程式码基底:
file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll


---- ------------------------------------
$
Microsoft.Synchronization.Data。 SqlServerCe

   组件版本:3.5.0.0

    Win32版本:3.5.8080.0

   程序码基底:
file:/// C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Synchronization.Data.SqlServerCe/3.5.0.0__89845dcd8080cc91/Microsoft.Synchronization.Data.SqlServerCe.dll


----------------------------------------

System.Data.SqlServerCe

   组件版本:3.5.1.0

    Win32版本:3.5.8080.0

   程式码基底:
file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Data.SqlServerCe/3.5.1.0__89845dcd8080cc91/System.Data.SqlServerCe.dll


---- ------------------------------------


 


任何人都可以帮忙解决这个问题吗?


谢谢! 

解决方案

您的设备中的'磁盘'上是否还有剩余空间?错误消息清楚地表明磁盘上没有足够的空间。你可以清除设备盘吗?


如果你使用的是仿真器,可能是设置很低。然后你可以在网上找到一些帮助来增加尺寸


(例如http://stackoverflow.com/questions/821720/increasing-windows-mobile-5-emulator-storage)


I have followed a sample from microsoft msdn site for building a device application on vs 2008 that connects to SQL Server 2005.

http://msdn.microsoft.com/en-us/library/cc488004(v=vs.90).aspx

I have followed and downloaded all the prerequisites, but when I try to run (F5/debug) the application I always got the "disk sapce not enough" error.

If i set my project platform as "Windows Mobile 5.0 Pocket PC SDK", the error would be:

Deployment and/or registration failed with error: 0x8973190e. Error writing file '\Windows\NETCFv35.wm.ARMV4I.cab'. Error 0x80070070: There is not enough space on the disk.

And if I set my project platform as "Windows Mobile 5.0 Smartphone SDK", the error would be:

Deployment and/or registration failed with error: 0x8973190e. Error writing file 'system.deployment.dll'. Error 0x80070070: There is not enough space on the disk.

-----------------------------------------------------------------------------------

I have searched on the web for a while and the suggested problem are: some assembly refernces are pointed to 'desktop' version, while they suppose to be pointed to 'compact framework' version. 

But, I have checked all the references in both my server(WCF) and client projects, they all pointed to 'compact framework' references.  I have noticed that after I added the localDataCache sync, there are some dll being added to my 'bin/Debug' folder:

System.Data.OracleClient.dll
System.Data.SqlServerCe.dll
System.EnterpriseServices.dll
System.EnterpriseServices.Wrapper.dll
System.Transactions.dll
System.Web.dll

I have no idea how they got there and don't know where they point to.

2. Another strange thing I found out is that:

I opened up [myProject].exe file under 'bin/Debug',  the refences point to the location different than that under my Project/Reference/:

************** Exception Text **************
System.ArgumentNullException: values cannot be null。
Reference Name: ServerSyncProvider
   at Microsoft.Synchronization.SyncAgent.Synchronize()
   at SmartDeviceDB.Form1.sync() at D:\Project\MobilePayment\SmartDeviceDB\SmartDeviceDB\Form1.cs: Line 37
   at SmartDeviceDB.Form1.Form1_Load(Object sender, EventArgs e) at D:\Project\MobilePayment\SmartDeviceDB\SmartDeviceDB\Form1.cs: Line 28
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Exceptions Text **************
mscorlib
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3625 (GDR.050727-3600)
    程式碼基底: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
mscorlib.resources
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3625 (GDR.050727-3600)
    程式碼基底: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SmartDeviceDB
    組件版本: 1.0.0.0
    Win32 版本: 1.0.0.0
    程式碼基底: file:///D:/Project/MobilePayment/SmartDeviceDB/SmartDeviceDB/bin/Debug/SmartDeviceDB.exe
----------------------------------------
System.Windows.Forms
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3623 (GDR.050727-3600)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3624 (GDR.050727-3600)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3082 (QFE.050727-3000)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.DataSetExtensions
    組件版本: 3.5.0.0
    Win32 版本: 3.5.30729.1 built by: SP
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Data.DataSetExtensions/3.5.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
----------------------------------------
System.Core
    組件版本: 3.5.0.0
    Win32 版本: 3.5.30729.1 built by: SP
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms.resources
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHT_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Microsoft.Synchronization.Data
    組件版本: 1.0.0.0
    Win32 版本: 1.0.1208.0
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Synchronization.Data/1.0.0.0__89845dcd8080cc91/Microsoft.Synchronization.Data.dll
----------------------------------------
System.Web.Services
    組件版本: 2.0.0.0
    Win32 版本: 2.0.50727.3053 (netfxsp.050727-3000)
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
Microsoft.Synchronization.Data.SqlServerCe
    組件版本: 3.5.0.0
    Win32 版本: 3.5.8080.0
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Synchronization.Data.SqlServerCe/3.5.0.0__89845dcd8080cc91/Microsoft.Synchronization.Data.SqlServerCe.dll
----------------------------------------
System.Data.SqlServerCe
    組件版本: 3.5.1.0
    Win32 版本: 3.5.8080.0
    程式碼基底: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Data.SqlServerCe/3.5.1.0__89845dcd8080cc91/System.Data.SqlServerCe.dll
----------------------------------------

 

Can anyone help me solve this problem?

Thanks! 

解决方案

Do you have any space left on the 'disk' in your device ? The error message clearly states there is not enough space on the disk. Can you clear the devices disk ?

If you are using an emulator, it might be that the setting is low. Then you can find some help in the net to increase the size

(e.g. http://stackoverflow.com/questions/821720/increasing-windows-mobile-5-emulator-storage)


这篇关于visual studio 2008设备应用程序与数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆