智能设备上的数据库问题
我在智能设备上开发软件,用的是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;