System.Data,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = [英] System.Data,Version=2.0.0.0, Culture=neutral, PublicKeyToken=

查看:66
本文介绍了System.Data,Version = 2.0.0.0,Culture = neutral,PublicKeyToken =的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好...

即时尝试使用Sqlite数据库创建创建Windows移动应用程序但是当我尝试调试它时显示此错误

类型'System.Data.Common.DbCommand'

在未引用的程序集中定义。

您必须添加对程序集'System.Data,
Version = 2.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089'


这是我的代码

hi everyone ...
im trying to create create windows mobile application with Sqlite database but when i try to debug it it show this error
The type 'System.Data.Common.DbCommand'
is defined in an assembly that is not referenced.
You must add a reference to assembly 'System.Data,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

and this is my code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Data.SQLite;
using System.Windows.Forms;


namespace SmartDeviceProject1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SQLiteConnection sqlite_conn;
            SQLiteCommand sqlite_cmd;
            SQLiteDataReader sqlite_datareader;

           
sqlite_conn = new SQLiteConnection("DataSource=Tsdatabase.db;Version=3;New=True;Compress=True;");
         
            sqlite_conn.Open();

            
            sqlite_cmd = sqlite_conn.CreateCommand();

            
            sqlite_cmd.CommandText = "CREATE TABLE Name (id integer primary key, text varchar(100));";
          
            sqlite_cmd.ExecuteNonQuery();

             sqlite_cmd.CommandText = "INSERT INTO Name (id, text) VALUES (1, 'john');";

             sqlite_cmd.ExecuteNonQuery();

             sqlite_cmd.CommandText = "INSERT INTO Name (id, text) VALUES (2, 'john2');";
            
            sqlite_cmd.ExecuteNonQuery();

            
            sqlite_cmd.CommandText = "SELECT * FROM test";

                   sqlite_datareader = sqlite_cmd.ExecuteReader();

                                
            sqlite_conn.Close();
        }
    }
}

推荐答案

那么,是什么阻止你现在添加引用?



右键单击Reference并选择Add Reference ...在出现的窗口中,选择需要引用的程序集。单击确定!



如果现在没有其他问题,您的项目将立即编译。
So, what keeps you from adding the reference now?

Right click Reference and select Add Reference... In the window that comes up, select the assembly that is required to be referenced. Click Ok!

Your project would compile now, if there is no other problem now.


我的问题仍未解决然而:(

所以我在谷歌找到了这个解决方案,但我不知道该怎么做所以请你帮我解释一下plz ,,,,

{在Windows文件夹中有一个名为wceload.exe的实用程序。使用设备的命令提示符安装带有此实用程序的cabs,它应该正确安装它们}



你的帮助将是如此欣赏
my problem is still unsolved at yet :(
so i found this solution in google but i didn't know how to do it so please can you help me with explain it more plz,,,,
{In the Windows folder there is a utility called wceload.exe. Use the device's command prompt to install cabs with this utility, it should install them properly}

your help will be so appreciate


大家好...

经过大量的努力结束后我可以解决我的问题所以有一天它可能会有所帮助别人我把解决方案放在这里,,,

连接你的设备然后打开它并将Wc400这个文件粘贴到智能设备里面

{C:\Program文件(x86)\ Microsros.NET \ SDK \CompactFramework \v2.0 \ WindowsCE \wce400}

并打开你的设备安装Wc4 00完成了:
hi everyone ...
after a lot lot off effort at end i could solve my problem so one day may it be helpful for someone i gone put the solution here ,,,
connect your device and open it and paste "Wc400" this file inside the smart device anywhere
{C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400}
and open your device install "Wc400" its done :)


这篇关于System.Data,Version = 2.0.0.0,Culture = neutral,PublicKeyToken =的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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