| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1073 人关注过本帖
标题:智能设备上的数据库问题
只看楼主 加入收藏
亦上心
Rank: 1
等 级:新手上路
帖 子:43
专家分:0
注 册:2009-7-2
结帖率:100%
收藏
 问题点数:0 回复次数:1 
智能设备上的数据库问题
我在智能设备上开发软件,用的是SQL2008,我直接在新建数据库,然后再DataGrid里DataSource添加数据源,然后就运行,会在系统自动产生的程序里出现错误,而在正常WinForm上就不会出现,Mobile上就会出现,而且这些代码是VS自动生成的,
        private void InitConnection() {
            this._connection = new System.Data.SqlClient.SqlConnection();
            this._connection.ConnectionString = "Data Source=192.168.8.2;Initial Catalog=smartSchedule;Persist Security Info=True;" +
                "User ID=sa;Password=Aa123456;";
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void InitCommandCollection() {
            this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
            this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
            this._commandCollection[0].Connection = this.Connection;
            this._commandCollection[0].CommandText = "SELECT 序号, 组件名, 条件序号, ERP品号 FROM dbo.bom类定义";
            this._commandCollection[0].CommandType = System.
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [(, true)]
        public virtual int Fill(smartScheduleDataSet.bom类定义DataTable dataTable) {
            this.Adapter.SelectCommand = [0];
            if ((this.ClearBeforeFill == true)) {
                dataTable.Clear();
            }
            int returnValue = this.Adapter.Fill(dataTable);   //出现sqlexcepection
            return returnValue;
搜索更多相关主题的帖子: 设备 智能 数据库 
2009-11-15 16:46
jedypjd
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:蒙面侠
威 望:9
帖 子:1096
专家分:4969
注 册:2009-7-27
收藏
得分:0 
智能设备上用的是精简版的.net framework ,只有PC上的1/4大小,所以PC上能跑的智能设备上未必能跑
看看是什么错吧;或者建工程时候建智能设备的工程

天涯无岁月,歧路有风尘,百年浑似醉,是非一片云
2009-11-15 17:12
快速回复:智能设备上的数据库问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011992 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved